Convention over Configuration In The Persistence Layer Helps Only Green Field Projects

My last post "You shouldn't compare Rails to Java EE 5, or JavaScript/Ruby to the Java language..." caused an interesting discussion in the artima forum. Bill Venners discusses the question whether "Convention Over Configuration" is only interesting for green fields projects.
In general Convention Over Configuration is of course interesting for all projects. In the new Java EE 5 convention over configuration together with dependency injection greatly simplifies the programming model. So already existing resources (JMS, DataSources, JCA), can be injected without the need for additional deployment descriptors. This feature is very useful and powerful for all projects (I will cover it in one of my next posts in detail).
On the other hand using the database as a metadata for UI generation is only useful for green field projects with no exlicit policies for the design and layout of the database (what is very unlikely, at least in bigger companies :-)). Especially this great feature in Ruby On Rails can be only used for new and very agile projects. In case you have already an existing database, it is probably not designed for this purpose, so you have still to override the default and provide your configuration (OR-mapping).

In this case Convention Over Configuration has no advantage and could become even dangerous (in case someone forgets to provide the mapping). If I review my last projects, I had often to deal with existing databases or strange enterprise policies regarding the naming of tables, columns or regarding the normalisation etc.

So just use the right technology for the challenges in your projects - there are still no silver bullets out there :-).

NEW: Online Workhop Effective WebApps without Frameworks is also coming to: MUC Airport.

Airport MUC workshops: Web (SPA, PWAs, Offline, Desktop, Mobile) Applications Essentials and Effective Web Applications. No migrations. #usetheplatform

Podcast: and newsletter:

A book about rethinking Java EE Patterns


Very true indeed. The Rails/Trails/Grails applications only cover an specific niche, JEE aplications cover another and some times both niches overlap in some place.

Posted by Andres Almiray on September 02, 2006 at 03:06 AM CEST #

Hmmm, you're apparently only vaguely familiar with Grails. With Grails you can reuse existing Java classes mapped with Hibernate. You can also create new Java classes, map them with Hibernate to an existing database and use them with Grails.

Grails != Ruby on Rails

Posted by Steven Devijver on September 05, 2006 at 06:52 PM CEST #

It means that Grails will be RoR killer. Ruby and R0R is still nothing to be compared with Java

Posted by pcdinh on September 05, 2006 at 09:22 PM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
Online Workshops
...the last 150 posts
...the last 10 comments