I give more points go to the highly respected Ruby on Rails framework for web applications. As I get deeper and deeper into channel development (using Java – yuck!) for our upcoming L****** portal, I have come to a realization. Java is a sandbox. To build an application, I could choose an infinite number of ways to achieve the same result. This isn’t just limited to the application logic created to achieve a result. Infinity also applies to the architecture of the application. I could use OO, or procedural programming. I could use direct database queries, or use an Object Relation Mapping (ORM). I could use the Model, View, Controller architecture, or something arbitrary. In short, there is so little direction in the Java language, that it is very easy to reinvent the wheel. Often not for the better.
Software has continuously been evolving for the better half of a century. Better designs continuously replace older designs incorporating lessons learned. Newer designs provide fail-safes against the pitfalls that all developers run into. So why look at Ruby on Rails to program something in Java? In short, a sandbox is a waste of time. While flexibility should never be underestimated (*cough* ASP.NET) , having structure is just smart. When you look at the structure for Rails, you are looking at the best minds in the industry, implementing the newest technologies (not the old dogs still pushing COBOL).
Why write verbose and repeated code for simple database operations? Rails doesn’t – it uses the ActiveRecord ORM. Java could leverage the same technology with solutions like ActiveObjects. (Not like Hibernate which breaks the mantra of “convention over configuration”).
Java could also make use of MVC design for routing and dispatching requests. L******’ code flow goes from a .class file, to an XSLT transformation request. Outside of XML data processing, this method is lacking. A better solution might be Struts, which mirrors some of the Rails functionality.
As I learn more about Rails, I end up applying more Rails conventions to Java.