开发者

Difference between Java EE and Spring framework [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 9 years ago.

开发者_C百科 Improve this question

I am striving to know the difference between Java EE and Spring Framework. Could anyone please help me on this.


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


Java EE:

  1. A Sun/Oracle standard that app server vendors conform to
  2. Based on Enterprise Java Beans
  3. Implemented by many vendors: BEA/Oracle, WebSphere, JBOSS, Glassfish, etc.

Spring:

  1. Not a standard; it's the brainchild of Rod Johnson and implemented by Spring/VMWare.
  2. Not based on Enterprise Java Beans; it's a POJO model. Can manage EJBs if you wish to use them, but not required.
  3. Not implemented by any vendor other than Spring.

EJB 3.1 has taken a great deal from Spring. Now it includes dependency injection, a form of aspects, and JPA. EJB 3.1 is much closer to Spring than EJB 2.0 was.


I provided an overview of Java EE here Frameworks for Layering reusable Architectures

This also contains a small comparison with Spring, which might be relevant for this question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜