7. Jakarta EE and the Spring Framework – Introducing Jakarta EE CDI: Contexts and Dependency Injection for Enterprise Java Development

© Luqman Saeed 2020
Luqman SaeedIntroducing Jakarta EE CDIhttps://doi.org/10.1007/978-1-4842-5642-8_7

7. Jakarta EE and the Spring Framework

Luqman Saeed
(1)
Accra, Ghana
 
A book on Jakarta EE would not be complete without a discussion of the Spring Framework. So what is the Spring Framework?
The Spring Framework is an alternative server-side software development platform for the JVM that runs on a servlet container. It used to be Java-based but you can now develop Spring apps with other JVM-based languages like Kotlin. The Spring Framework came about because of the frustrations developers faced using the earlier versions of Java EE, then called J2EE.
Rod Johnson1 started the project as an alternative platform that was more developer friendly and less arcane than J2EE. In the beginning, the Spring Framework was just an inversion of control (dependency injection) framework. It soon became very popular and has since grown to become a full-stack alternative to Jakarta EE. The Spring Framework intellectual property is owned by Pivotal Inc.
However, as Spring was growing, developers started experiencing pain points that caused them lots of frustrations with the platform2. At the same time that Spring was enjoying all the popularity, Java EE was also evolving with all the feedback it was getting.
The release of Java EE 7 marked a milestone in the history of the platform, because it had almost caught up with the Spring Framework in terms of developer productivity, but had managed to avoid Spring’s pitfalls. Java EE releases have been heavily influenced by the Spring Framework.
Today, Spring as a platform has the Spring Boot framework, a framework I like to call “Little Java EE for Spring”. Spring Boot has been influenced by Java EE's convention over configuration and sensible default philosophies. Both platforms have been very influential of the other.
As a Java developer, you have the choice of using Jakarta EE or the Spring Framework. Neither, for me, is superior to the other. Both platforms have their strengths and weaknesses. Naturally, as the author of a Jakarta EE book, I choose Jakarta EE, but that is because I am excited about its future as an Eclipse Foundation community project, I feel effective using it, and I find it easy to learn and to teach.
You should choose a platform based on its technical merits to you, how easily you can maintain your apps, how much you value backward compatibility, the existing skillset of your development team, and other such metrics. My opinion about the whole Spring vs. Java EE flame wars is that it's just not worth it. They are both excellent platforms that cater to different kinds of developers. Pivotal, the company behind the Spring Framework, is now a member of the Jakarta EE community.
Spring Framework vs. Java EE can be rephrased as Spring Framework and Jakarta EE. You as a developer should pick what is right in your context. As you are reading this book, I am certain you have already decided which you want to go with.