Section 1.0. Introduction


1.0. Introduction

Since it first appeared in July 2004, Ruby on Rails has revolutionized the process of developing web applications. It has enabled web developers to become much faster and more efficient, allowing for quicker application developmenta critical advantage in these days of "web time." How does Rails do it? There are a few reasons behind Rails' success:


Convention over configuration

Rather than forcing you to configure every aspect of your application, Rails is full of conventions. If you can follow those conventions, you can do away with almost all configuration files and a lot of extra coding. If you can't follow those conventions, you're usually no worse off than you were in your previous environment.


Liberal use of code generation

Rails can write a lot of your code for you. For example, when you need a class to represent a table in your database, you don't have to write most of the methods: Rails looks at the table's definition and creates most of the class for you on the fly. You can mix in many extensions to add special behavior, and when you really need to, you can add your own methods. You'll find that you're writing only a fraction as much code as you did with other web frameworks.


Don't repeat yourself (DRY)

DRY is a slogan you'll hear frequently. With Rails, you need to code behavior only once; you never (well, almost never) have to write similar code in two different places. Why is this important? Not because you type less, but because you're less likely to make mistakes by modifying one chunk of code, and not another.

David Heinemeier Hansson and the other Ruby on Rails core developers have learned from the mistakes of other web application frameworks and taken a huge step forward. Rather than provide an extremely complex platform that can solve every problem out of the box if you can only understand it, Rails solves a very simple problem extremely well. With that solution under your belt, you'll find that it's a lot easier to work up to the hard problems. It's often easier, in fact, to solve the hard problem for yourself with Rails than to understand some other platform's solution. Want to find out whether Rails is everything it's cracked up to be? Don't wait; try it. If you're not a Ruby developer yet, don't worry; you only need to know a limited amount of Ruby to use Rails. I'd be willing to bet that you'll want to learn more, though.




Rails Cookbook
Rails Cookbook (Cookbooks (OReilly))
ISBN: 0596527314
EAN: 2147483647
Year: 2007
Pages: 250
Authors: Rob Orsini

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net