Difference between Java EE and Spring framework

Java EE is an standard, official, specification for a full featured Enterprise Application Framework stack. Includes stuff like Object-Relational Mapping, Security, Web Applications, database connectivity, transactions...

On top of Java EE specifications there are JavaEE implementations/application servers like: JBoss, Glassfish, WebSphere, Weblogic.

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


Java EE:

  1. Java EE industry approved standard API based framework
  2. It is predominantly based on annotations and CDI
  3. JFC MVC framework for web development
  4. JPA specification to process DB operation
  5. JTA API with implementation
  6. EJB container and POJO based implementation
  7. Oracle license

Spring:

  1. Based on IOC and AOP
  2. Based on XML configuration (now they are leveraging annotation)
  3. Uses Spring DAO framework (based on Template design pattern) to connect to database
  4. Provides abstraction layer to support various JTA implementation vendor
  5. Integrates with various Java vendors to support different capabilities such as struts etc
  6. Provides an end-to-end platform to build web application achieving loose coupling using DI and AOP
  7. Open source license