If you have been following my blog, you will see that my posts typically center around Frameworks, particularly, Java Frameworks. I have worked with a variety of them. Each of them have their own pros and cons. Looking at my posts, a friend asked me, why so many?? He comes from .Net world, where you hear about .Net framework (may be more versions of it) so naturally he asks, why don’t you just have one Java framework.
For one, I said, .Net is largely proprietary (though it was made Open Source in 2014) where as Java is Open Source. Early on, there were a lot of players in the Java market – Sun, IBM, Oracle, BEA etc. Even Microsoft had their own version of JVM initially. With too many cooks in the market, you will see lot more flavors of Java frameworks coming out. But then, with all the consolidations happening lately in the industry, you may see less and less of that. For e.g., Oracle bought Sun, BEA, Tuxedo leading to consolidation of Glassfish, Oracle App Server and Weblogic. This may happen to the Frameworks as well.
Java went through minimal changes in the interim, as newer languages with more modern features got developed for JVM. If Java had Lambda expression earlier, we might not have seen Groovy/Grails. Similarly, Java EE’s complications made Spring and other DI frameworks more lucrative.
Java (JDK) framework from Sun (now Oracle) is a generic framework and contains several base classes that you can inherit from to make a Java application. Initially, there was JFC – Java foundation classes (like MFC from Microsoft, PFC from Powersoft) etc. They extended the language features in a standardized way and came with the language installation. Eventually, as the platform grew, now we see JDBC for database access (also JPA for object based Persistence), AWT and Swing for GUI, Servlet, Applet etc. Collectively the Java framework is now referred to as JDK. Even this has 3 flavors – Java SE – Standard, Java EE – Enterprise Edition that includes Server side Java, Java ME – Mobile edition.
Several containers were built to run Java VM, so the server side technology grew. The applications started slowing down as the size and number grew. Several new projects, lot of them Open Source from Apache, re-invented Java frameworks in many different ways. When the JSP technology was heavily used, Struts came out. When J2EE became so complex, Spring and other frameworks came out with DI/IOC to simplify container technology.
Mean time, since EJB specification was too complex to implement entity beans, ORM (Object-Relation Mapping) packages like Hibernate came out. Post Spring and Hibernate, what used to EJB specification led way to simplification of the Persistence libraries and led way to JPA.
Apart from these Apache has a ton of frameworks or API for various applications – for e.g., Apache Axis to do web services etc.
Apart from these, there are lot more new Frameworks for Java – like Play, Wicket, Groovy/Grails, Vaadin etc. They all came out at different points to attempt to address issues in Java or JVM, but with Java 8 absorbing some of those features, we may see some frameworks fade away. For e.g., with Java 8 supporting Lambda expressions may make Groovy’s closures redundant. There are already questions about Groovy Language.