r/learnjava • u/2048b • Feb 28 '19
Spring: grown too big, too complicated?
Spring Framework was initially designed in the 2000s as an alternative to Java EE, which was too heavy and complicated.
However, Java EE has improved much since then. Developing an EJB, web app or web service today is not as bad as 15 years ago. They are mostly POJO classes with annotations, EL, JSTL and JSF have made JSP better, and the IDE/ant/maven/gradle today are doing the necessary WAR/EAR packaging well.
Today I pick up a book to learn Spring Framework, and waded painfully through Spring Core IoC, AOP, and then Spring MVC. It seems to me that Spring is no longer as intuitive and simple as when it first started, and has grown into quite a monster itself. Like the original Java EE it aspired to replace.
So my question is whether Spring is still relevant today for new Java enterprise projects (web apps, web services)? I know it's still widely used by enterprises, but I think it's because their software engineers/programmers/developers are using it out of familiarity and to integrate it with other legacy applications built on Spring.
Due to its complexity, does it actually help speed up or improve application development or the developers actually spend more time trying to figure out how to use Spring properly?
What are your thoughts?
2
u/amparee Feb 28 '19
Spring boot helped me to develop different web applications at work. I prefer Spring boot instead of JavaEE. At first view it's complicated because you don't know how to use it. I recommend to develop two apps with this frameworks and see how it works.
For my applications I use:
Angular 2+
Spring boot
Hibernate
Gradle
Java 8+
Git
Docker
Jenkins
7
u/GrapeAte Feb 28 '19
You can pry Spring Boot from my cold, dead hands. Much of the complexity in configuring a Spring context is now handled by Spring Boot.
Spring is a massive framework, but it's broken up into logical components so you learn the bits you need when you need them. There is a lot of magic that happens, especially if you use things like @Async and other AOP bits, but when you're worried about your business code magic is fine.