The problems with Java

No I am not going to write an article with the title “the fall of Java” as follow up on my previous post about the book Beyond Java from Bruce Tate. The Java programming environment is clearly showing some cracks as it is coming of age. Bruce argues that new development languages and frameworks like Ruby and Ruby on Rails are good candidates to be the successor.

I do not find the analysis on the problems of Java very thorough in the book. The argument is that Java is unproductive, complicated and has decreased approachability of the language. In other words the learning curve for Java is steep and ever increasing.

My opinion is that the Java platform has failed to get the abstractions right on two key programming models: web interaction and database programming. If you need both for your application Java might not be the right platform. Both servlets and JDBC are too low level and cumbersome to program directly. The EJB2 specification which was created to cure the problems with JDBC was over the top. JSF as an enhancement to servlets introduces a component based model for interaction. Difficult to adopt, the whole community thinks page and request level.

The failure of good support for web programming and database access has given rise to a number of competing frameworks like JDO, Hibernate, iBatis on the database side and Struts, JSF, Tapestry, Velocity and Webwork on the servlet side. All non industry standard and open to religious debate. So going from project to project you need to learn new paradigms.

A second problem related to the framework discussion is the trend to move code away from the place where it is called. This is very much in vogue in the Java community. A lot of frameworks inhibit the style don’t call us we call you. So the framework is controlling. Factories, interfaces, annotations and aspects move the code even further away from the place where you are right now. And a lot of this stuff is happening at runtime, so reading the code is not enough, you have to fully understand a lot of hidden things to understand what is happening.

Don’t get me wrong there are applications where all this added complexity adds value. But it is the vast minority, for most applications a simple MVC and database mapping is enough.

Software development is complex so we need simple environments instead of more complexity.

Advertisements

%d bloggers like this: