Java EE is mature. You can write a full enterprise application by purely using Java EE API's.

I remember the day when Spring framework was the dominant framework in the Java EE world (and many started saying goodbye to their little frameworks such as Apache Struts 1.x). Granted, it introduced features that is now integrated in Java EE framework (i.e., dependency injection) but I was too hesitant to jump onto the bandwagon for various reasons:

  • "Many" was jumping onto the Spring framework. My sole answer to this was that one day Java EE framework will be matured and there is no need to download MBs of jars to make a simple application (case in point).
  • Certification, certification, certification: Don't you just hate it when a new product is out on the market and you need to get yourself certified to be known as an expert of that product? There are various frameworks out there that can do the same functionality as the other, so it's a matter of taste and preference. (You may ask, am I Java certified? Not yet!).
  • Jack of all trade: I am always told that Spring does "everything". Generally, I have yet to see an application that uses every feature of Spring.
I am not shooting down Spring framework, in fact I have used it myself and I use it due to its simplicity in getting written code to run (i.e, you see productive results in quicker time than when using Java EE API's). This can be greatly attributed to Spring template helper classes and very little (if not, no) configuration required. The problem I had was that my simple web app was over 13MBs bundled WAR file because of various Spring dependencies jars. Also, I was one of the rebellious people who said that Java EE will mature and when it'll mature, I will be amongst the first to embrace it and move on. Now, I can tell you that my current web application (which has no dependencies on any Apache modules, Spring modules, etc. and just pure Java EE API's) is less than 6MB's WAR file. The other are web frameworks bundled such as Twitter Bootstrap 3.x, Font-Awesome, WooThemes FlexSlider, etc. (it'll soon be replaced by it's CDN URL, so the size of the WAR file will drop).

To understand what I mean, see the Fifty Features of Java EE 7 in 50 minutes.


Will Spring framework die? I am not sure. Spring has its relevance and it's used and relevant in most businesses today. In fact, they've aligned their framework to work with Java EE API's (except dependency injection, it's a nightmare sometimes to use Spring CDI and JavaEE CDI interchangeably). Red Hat had a framework called Seam Framework and they halted its development on Seam3. I used it as well, and I liked it. The Seam team decided to take on a different approach and "merge" themselves with other CDI developers out there to form Apache Deltaspike. And no, it seems Seam won't die.

Back to Java EE maturity, the primary reason for reaching to this conclusion is basically one word: COMPLIANCE. All containers that says that they're Java EE 7 compliant must satisfy the requirements as stipulated by the Java Platform Enterprise Edition 7 specification. Remember the old days where you had a XML resource and configuration files (like resources.xml for Tomcat, *-ds.xml for JBoss 3.x and later) so that your application could run properly on your application server? Well, by running your enterprise application on a Java EE 7 compliant container, you certainly won't be worrying of dependencies to run certain Java EE API's. Configurations are there, in some cases (e.g., setting up Resources such as Mail Session, JDBC Datasources, etc.) but I have seen that it's very minimal. Prior to this, Spring addressd these issue we faced with the dreaded configuration and time wasted on getting a simple enterprise application to deploy. Nowadays, the Spring container conforms to Java Platform Enterprise Edition 7 specification in order to be Java EE 7 compliant "application" container. My question is this: Why add another abstraction layer on the application container if the application container can fulfill the same task with the same specification the layer utilizes?

Yes, Java EE is now mature to compete with the likes of Spring framework & I believe that we can write a full enterprise application by simply using Java EE API's. In fact, I have already started.

What are your thoughts? Let me know in the comment below.

Adieux!

Comments