My instinct was to publish a post comparing Spring Framework to Java EE. However, I realized that I needed to dispel outdated misconceptions about framework first. I did this through a series of posts that dispelled these outdated misconceptions in the form of rules. Here is a summary of the rules I came up with. I don’t know that I will ever publish a proper comparison of Spring Framework and Java EE, but I hope that if someone else does that they follow these rules.
Java EE, not J2EE.
The J2EE 1.4 specification was released in 2003.
The Java EE 5 specification was released in 2006.
The Java EE 6 specification was released in 2009.
The Java EE 7 specification was released in 2013.
There are a number of components in Spring Framework.
There are a number of technologies in Java EE.
There is more to the Spring Framework than dependency injection.
There is more to Java EE than Enterprise JavaBeans.
Spring Framework is no longer lightweight, by default.
Java EE is no longer heavyweight, by default.
It’s like an all you can eat restaurant. Whether you are in the mood for Spring Framework or Java EE, you can choose to take advantage of as few or as many features as you want.
Standards are important.
Spring Framework relies on or integrates with 11/15 Java EE Web Profile technologies.
Spring Framework relies on or integrates with 20/38 Java EE Full Profile technologies.
Spring Framework is a modular library.
Java EE application servers are implemented with modular architectures.
It’s like an all you can eat restaurant.
Spring Framework is the Golden Corral (link) of frameworks. It has a little bit of everything. You pick up a plate and place as much as you want to on it. The more you place on your plate, the heavier it gets and you have to walk back to your table with it.
Java EE is the Fogo de Chao (link) of frameworks. It does not have everything, but what it has is great. You don’t have to leave your table. You don’t have to carry your plate. You don’t have to place anything on your plate. If you turn your card green side up, the gauchos will come to your table and ask if you would like some meat. If you do, they will place the meat on your plate for you. If you do not, they will leave. If you turn your card red side up, they will not come to your table.
I prefer the Picanha, the Alcatra, and the Fraldinha.
Java EE applications are not limited to Java EE technologies.
Add PicketLink for security
Add AeroGear for mobile support.
Add Arquillian for integration testing.
Add Spring Framework and Snowdrop (link) if so desired.