Philosophy and Design
Ruby on Rails is intended to emphasize Convention over Configuration (CoC), and the rapid development principle of Don't Repeat Yourself (DRY).
"Convention over Configuration" means a developer only needs to specify unconventional aspects of the application. For example, if there is a class Sale in the model, the corresponding table in the database is called sales by default. It is only if one deviates from this convention, such as calling the table "products sold", that the developer needs to write code regarding these names. Generally, Ruby on Rails conventions lead to less code and less repetition.
"Don't repeat yourself" means that information is located in a single, unambiguous place. For example, using the ActiveRecord module of Rails, the developer does not need to specify database column names in class definitions. Instead, Ruby on Rails can retrieve this information from the database based on the class name.
"Fat models, skinny controllers" means that most of the application logic should be placed within the model while leaving the controller as light as possible.
Read more about this topic: Ruby On Rails
Famous quotes containing the words philosophy and, philosophy and/or design:
“How does Nature deify us with a few and cheap elements! Give me health and a day, and I will make the pomp of emperors ridiculous. The dawn is my Assyria; the sun-set and moon-rise my Paphos, and unimaginable realms of faerie; broad noon shall be my England of the senses and the understanding; the night shall be my Germany of mystic philosophy and dreams.”
—Ralph Waldo Emerson (18031882)
“One of the main things that interfere with our joy is the belief that if we try hard enough, read the right books, follow the right advice, and buy the right things, we could be perfect parents. If we are good enough as parents, our children will be perfect too.... Unfortunately, what comes from trying to live out this philosophy is not perfect children but worried parents.”
—Lawrence Kutner (20th century)
“You can make as good a design out of an American turkey as a Japanese out of his native stork.”
—For the State of Illinois, U.S. public relief program (1935-1943)