J2EE Vs Spring
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:
- Java EE industry approved standard API based framework
- IT is predominantly based on annotation and CDI
- JFC MVC framework for web development
- JPA implementation to process DB operation
- JTA API with implementation
- EJB container and POJO based implementation
- Oracle license
Spring:
- Based on IOC and AOP
- Based on XML configuration (now they are leveraging annotation)
- Uses Spring DAO framework (based on Template design patter) to connect to database
- Provide abstraction layer to support various JTA implementation vendor
- Ingrate with various Java vendor to support different capabilities such easily integrate with struts etc
- Provide end to end platform to build web application achieving loose coupling using DI and AOP
- Open source license
-----------------------------------------------------
Java EE:
- A Sun/Oracle standard that app server vendors conform to
- Based on Enterprise Java Beans
- Implemented by many vendors: BEA/Oracle, WebSphere, JBOSS, Glassfish, etc.
Spring:
- Not a standard; it's the brainchild of Rod Johnson and implemented by Spring/VMWare.
- Not based on Enterprise Java Beans; it's a POJO model. Can manage EJBs if you wish to use them, but not required.
- 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.
----------------------------------------------------------------
Ref: Stackoverflow
Comments
Post a Comment