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:
“A writer must always try to have a philosophy and he should also have a psychology and a philology and many other things. Without a philosophy and a psychology and all these various other things he is not really worthy of being called a writer. I agree with Kant and Schopenhauer and Plato and Spinoza and that is quite enough to be called a philosophy. But then of course a philosophy is not the same thing as a style.”
—Gertrude Stein (18741946)
“It is not easy to make our lives respectable by any course of activity. We must repeatedly withdraw into our shells of thought, like the tortoise, somewhat helplessly; yet there is more than philosophy in that.”
—Henry David Thoreau (18171862)
“If I knew for a certainty that a man was coming to my house with the conscious design of doing me good, I should run for my life ... for fear that I should get some of his good done to me,some of its virus mingled with my blood.”
—Henry David Thoreau (18171862)