Ruby On Rails - Philosophy and Design

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:

    When a bachelor of philosophy from the Antilles refuses to apply for certification as a teacher on the grounds of his color I say that philosophy has never saved anyone. When someone else strives and strains to prove to me that black men are as intelligent as white men I say that intelligence has never saved anyone: and that is true, for, if philosophy and intelligence are invoked to proclaim the equality of men, they have also been employed to justify the extermination of men.
    Frantz Fanon (1925–1961)

    What is rational is actual and what is actual is rational. On this conviction the plain man like the philosopher takes his stand, and from it philosophy starts in its study of the universe of mind as well as the universe of nature.
    Georg Wilhelm Friedrich Hegel (1770–1831)

    Humility is often only the putting on of a submissiveness by which men hope to bring other people to submit to them; it is a more calculated sort of pride, which debases itself with a design of being exalted; and though this vice transform itself into a thousand several shapes, yet the disguise is never more effectual nor more capable of deceiving the world than when concealed under a form of humility.
    François, Duc De La Rochefoucauld (1613–1680)