O'Reilly logo

Ruby on Rails For Dummies® by

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

Chapter 16. Ten Pivotal Ruby on Rails Concepts

In This Chapter

  • What's so good about Ruby on Rails

  • What Ruby on Rails contributes to database applications

  • What makes Ruby on Rails an effective tool

If you wake me up at three in the morning and ask me for the ten most important Ruby on Rails concepts, I'll probably start with Don't Repeat Yourself and Convention over Configuration. Then I'll have to think a bit. After a few minutes, I'll remember four more concepts, recite them to you, and look around to make sure the cat hasn't gotten out, the basement isn't flooded, and that no one left the freezer door open overnight.

With those concerns out of the way, I'll think of two more concepts. And eventually (after reviewing tomorrow's tasks in my mind) I'll recite two more, for a total of ten.

I'll go back to sleep mumbling one question to myself. “Why don't I write all ten of those concepts in one place? If I do, the reader doesn't have to wake me at three in the morning.”

So I'll add one item to the list of things I plan to do tomorrow.

Don't Repeat Yourself (DRY)

Any particular piece of information about an application should be housed in only one place. The information should not be replicated throughout the application. Duplication of information is inefficient and error‐prone. With a piece of information in one part of an application, all other parts of the application should consult that one, authoritative part of the code.

For more of my DRY humor, see Chapters 1, 8, and 9.

Convention over ...

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