+ The Oktave Forum » Technical » Engineering » Software Engineering
|-+ Convention over Configuration
Username:
Password:

Pages: [1]
Topic Tools  
Read July 17, 2008, 03:29:27 am #0
sids

Convention over Configuration

When I first started using Ruby on Rails the thing that struck me more than the awesomeness of the framework is its design paradigm of Convention over Configuration (CoC). From the Wikipedia page on the design paradigm:

Quote
Convention over Configuration is a software design paradigm which seeks to decrease the number of decisions that developers need to make, gaining simplicity, but not necessarily losing flexibility.

The phrase essentially means a developer only needs to specify unconventional aspects of the application. For example, if there's 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 one needs to write code regarding these names.

When the convention implemented by the tool you are using matches your desired behavior, you enjoy the benefits without having to write configuration files. When your desired behavior deviates from the implemented convention, then you configure your desired behavior.

This more configuration free approach to programming allows the programmer to work at a higher level of abstraction without actually having to create a layer of abstraction.

Ever since I got introduced to this design paradigm, I have tried to follow similar conventions even when not using rails -- in Perl, Java, UI design etc. and it has paid off really well!

I do notice that Java programmers in particular have a real love for configuration files. What makes it worse is that they usually pick XML files as the format of the configuration files. Eck. Please excuse me if this over-generalization is not well placed.


http://www.grok.in/
"Ignorance killed the cat, curiosity was framed."
Offline  
Pages: [1]
Jump to: