== Timoteo Ponce's blog ==

On Conventions

jee rails configuration convention java
A while ago I listened about Ruby on Rails on a podcast (FLOSS Weekly-episode), in that conversation I heard many of the concepts that later on I would find in books, frameworks and projects.

But among all design decisions mentioned there, Convention Over Configuration was the one that triggered something in my head.

In a short summary COC is a principle that describe a work approach in which most decisions in are defined by conventions and not by manual setups, such as URL-mapping in a web application, see Rails RESTFul URLs.

Under my personal context (mainly Java and JVM-based development) over the years this trend has been used more and more, and I couldn't agree more. Frameworks are the main target for this, things like JEE-6/7, ORMs like Hibernate and Dependency Injection frameworks like Spring must define a 'default' way to work.

Although it is really useful to have more than one alternative to do something, it becomes really hard to start with any of those frameworks. The greatest advantage (in my opinion) of some of the more trending frameworks like Rails or Django is the learning curve, very easy to learn, very easy to start, very easy to be productive.

JEE in all its flavors and Hibernate are not the case for it (in my opinion), there is no standard nor default way of doing things. And because of that a big part of the development community has migrated to another option. It is very important for us as developers to be consistent, and the change has to start on the framework-makers, and JEE must be the starting point since there are so many applications based on it.

So, how would JEE become a better alternative?:
  • Define a default build tool and stick with it
  • Define proper libraries in the repositories, no more broken APIs
  • Create a non-extensive guide with the basics to do a web application
  • Define a default open source deployment server
  • Provide a default architecture such as MVC

Some progress on it has been achieved with Maven archetypes and things like AppFuse, but I think we are still a little behind Rails in that matter, although, it's improving.