Wednesday, April 08, 2009

Convention over Configuration

Now a days most of the developers are dependent on different frameworks for developing applications. These frameworks mainly depends on different configuration parameters. Some frameworks need multiple configuration files, each with many settings. These provide information specific to each project, ranging from URLs to mappings between classes and database tables. A large number of configuration files with lots of parameters is often an indicator of an unnecessarily complex application design. Writing everything in XML for configuring a robust application can be minimized by introducing a comparatively new concept "Convention over Configuration".
Convention over configuration is a design philosophy and technique that seeks to apply defaults that can be implied from the structure of the code instead of requiring explicit code. The idea is to simplify development by allowing the developer to worry only about the unconventional parts of the application and architecture. Many modern frameworks use a convention over configuration approach. A few such frameworks include: Spring, Ruby on Rails, EJB, JSF, Stripes, Kohana PHP, Grails, Grok, Zend Framework, Pylons, CakePHP, symfony, Maven, ASP.NET MVC etc.