O'Reilly logo

Ruby on Rails® for Microsoft Developers by Antonio Cangiano

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

2.4. Understanding Rails' Main Principles

The Rails culture has adopted many of the good principles that derive from the world of Extreme Programming (XP) and the Agile movement in general. For example, though Rails doesn't force you to adopt Test-Driven Development (TDD), this is a popular practice in the Rails community. Also, Rails integrates, simplifies, and promotes testing. As briefly mentioned in the first chapter, YAGNI (You Ain't Gonna Need It) is also a principle that's been largely adopted by the community. There are, however, two mantras that characterize the Rails way of doing development above anything else: "Convention over Configuration" and "Don't Repeat Yourself (DRY)."

It can be said that Rails' strength comes from three components that fit together organically: the framework itself, its Agile philosophies and principles, and finally, the Ruby language. These Agile mantras are so important that it's worth spending some time to analyze them further; the next chapter takes care of providing you with all the essential Ruby skills that you'll need to understand and write Rails applications.

2.4.1. Convention over Configuration

Back in 2004, before Rails had garnered the popularity that it enjoys today, a nine-minute demo by David Heinemeier Hansson was recorded and placed online. The application he showcased was quick and simple: a bare-bones blog. Today, a second version (for Rails 1.0) is available online at http://rubyonrails.org/screencasts and, as you'll see ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required