Mar 02

In a reply to a post by Joseph Ottinger at The Server Side, which was talking about a post by Mike Cannon Brookes claiming that 98% of Java Enterprise developers don’t really need JMS and XA. Joseph also mentions says that it …

might explain why relatively simple frameworks such as Rails see many Java Enterprise applications as “low hanging fruit” to capture.

John Murray, a commenter on this post, said what has been on my mind for the last couple of weeks and which I haven’t been able to bring into words. Here’s the quote of his comment:

While we can all quibble on his percentage claim, I heartily agree with the underlying thesis. In 10 years of writing Java and JEE apps I have only had to enter the land of XA and clustering a handful of times.

However, when the moment came that I had to entered that “2%”, I was happy that almost all of the issues that arose from this move had been considered when the JEE specification was written. The learning curve and the adjustements were minimal.


One prime example was an app that I wrote that initially connected to a single database. The client loved the app so much that they wanted to add functionality that required a second database and XA transactions. The second database was of a different vendor as well, so XA was the way to go. All I had to do was to make some minor adjustments to the JDBC driver and my Hibernate implementation and we were good to go. JEE was able to grow with me.

Other frameworks seem to handle the “happy path” requirements of a specific architecture. One app/presentation server, one database. But the thing I always ask is “Does it scale?”. I always ensure that even the most trivial app can scale. I plan on the possibility of clustering, web services, mobile presentation, database changes. How many times have we seen something (be it software, website, physical product) become popular in the beginning but fold under the weight of trying to mass produce it.

If I make something that takes off, I want to be able to cluster the bejesus out of it if it becomes popular. I want to start with a single JBoss server with MySQL. I want the flexability to move it to a Weblogic cluster with Coherence clustered data caching and an Oracle cluster without having to rebuild the entire app. JEE does it for me.

I can’t agree more. I am on my first steps to writing a web application, and I’ve been having a lot of thought about what to write it in. Java is my language of choice, but I am always afraid that my passion for the language shrouds over what’s really “out there”. But that’s just it: Scalability, the flexibility of changing, “programming by configuration rather than by convention” at its best.

And what’s better is, that with EJB 3.0 you start out by writing “by convention” and when you start scaling you write the configuration files, bit by bit, to override these conventions as your application hits off and grows.

98% might “not need it”, but that can be said about most frameworks. But when you Do need it, it’s comforting to know that someone thought about it first, and probably did a hell of a lot better job than you would have done with your project’s limited time frame.

I have a lot more to say about this – I do hope this won’t start some silly language flaming war here.

Related Posts with Thumbnails
Share

Comments are closed.