DEV Community

Cover image for Spring Learning Path
Samarth Gupta
Samarth Gupta

Posted on • Updated on

Spring Learning Path

Java is a confusing world.

As a newcomer to Java, have these questions ever popped up in your mind?

  • What is J2SE?
  • Okay, I understand J2SE but what is J2EE?
  • What is JSF now?
  • What is JNDI and what is JNI?
  • What is EJBs now?
  • What is JMS?
  • What is JSR?
  • What's JPA?
  • and more...

If these questions does boggle your mind sometimes(well, it certainly did to me), you're in the right place. Today I am going to oversimplify Spring learning path for you. This will clarify how Java progressed through time and how Spring came as a de-facto standard in industry. This will also clarify what should you learn in Java world, certainly you can't learn it all. JAVA IS HUGE.

I will be going through pointers to explain it easily:

J2SE
  • Core Java + Concurrency API + Collection API = Java Standard Edition (J2SE)
J2EE
  • Then comes Java Enterprise Edition (J2EE) which has a set of enterprise features used to develop full-fledged enterprise java applications.

  • Servlet, JSP, JSF, EJB, JMS, JNDI, JDBC, JavaMail, JTS, JTA, JCA, these all are enterprise features and comes under J2EE.

  • J2EE is just some abstract and standardised specifications (APIs) and their implementation is provided by the respective Application Server. Examples of Application Servers are Glassfish, JBoss, Liberty, WebSphere, etc.

  • These abstract specifications are defined using JSR (Java Specification Request) and are implemented by Reference Implementation, for eg. JPA is a JSR and Hibernate is a Reference implementation i.e. JPA defines all annotations and methods signatures & a reference implementation implements underlying code for it. Think interface & class.

Web Server vs Application Server vs Web Container
  • Web servers just serve static content, Application servers provide dynamic content with other functionality like managing EJB pool, facilitating distributed transaction, facilitating application lookup over JNDI, application security, and others. Web containers are just Servlet containers that are only responsible for generating HTML by executing JSP and Servlet on the server-side.
Spring is here
  • Spring is another alternative to J2EE for creating Enterprise applications in Java.

  • Spring is a framework doing lots of the stuff on the J2EE specifications, but in its own form. They don't follow J2EE specifications and APIs for that. But they do include a web framework, transaction management, security, and several other solutions that J2EE offers.

Spring Learning Plan
  • So start with Spring Core which is relevant to CDI in J2EE. This will teach you dependency injection & inversion of control.

  • Then move on to Spring-Web/MVC which is equivalent to Servlet/JSPs in J2EE but with more features & support.

  • Then move on to several Spring Modules which provides different functionality of J2EE.

Important Spring Modules:

Spring-AOP: Provides cross cutting concerns
Spring-JDBC: Provides JdbcTemplate which removes boilerplate code from JDBC
Spring-ORM: Provides HibernateTemplate which does the same in ORM world
Spring-JMS: Provides messaging.

  • After you're done with this and know how spring works, it's time to start learning Springboot, Springboot is opinionated framework and does most of the configuration for you.

That's it, this is the oversimplification of Spring Learning Path. If you're a curious Spring learner, I have a new tutorial series coming up to learn spring from scratch. Follow to know more. Comment in case you've any doubts.

Discussion (0)