After working with Java and then Ruby/Rails my feeling is that there is definitely a huge benefit to "convention over configuration." The benefit is in not having to specify information that the framework can deduce for itself. This saves a lot of time and reduces the amount and complexity of the code you write.
In dealing with technologies such as Struts and Hibernate, you have to write a lot of XML. You have to tell Hibernate about every column and key. Having all that information just be implicit is an huge time saver.
"It seemed to get in the way when dealing with my database and having to make sure everything was named just so, etc."
I guess I'd have to disagree with you on that one. The DB naming convention is pretty simple and logical. In fact, rather than being a burden, I'd say the naming convention is, in itself, a benefit. You see a col called id
and you instantly know exactly what role it's playing in the schema. Or if you see something_id
it's clear at a glance what that column does.
And if you have to use different names, it's possible to do so. You just need to tell Rails you're being unconventional, which you do by adding params in your models.
In Rails, the concept of "DRY" (Don't Repeat Yourself) is closely related to "convention over configuration." I've worked on Struts/Hibernate apps where the same field is declared, mentioned, or otherwise specified in five different places involving four different languages:
- Database (SQL)
- Mapping file (XML)
- DAO (Java)
- Form bean (Java)
- JSP page (HTML)
And that was considered an exceedingly simple architecture. Oh the hours we spent keeping all that in sync.
For non-key fields, Rails pares that down to two places and two languages:
- Database (SQL)
- View (HTML)
Building the app on a set of conventions allows you to avoid repeating yourself unnecessarily.