This session compares the Spring and Java EE stacks in terms of Web frameworks. It re-examines the motivations behind the Spring framework and explores the emergence of the Java EE programming model to meet the challenges posed. The presentation provides insight into when Spring and/or Java EE is appropriate for a building Web applications and if they can coexist.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY.
WHILST EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.
ALL PERFORMANCE DATA INCLUDED IN THIS PRESENTATION HAVE BEEN GATHERED IN A CONTROLLED ENVIRONMENT. YOUR OWN TEST RESULTS MAY VARY BASED ON HARDWARE, SOFTWARE OR INFRASTRUCTURE DIFFERENCES.
ALL DATA INCLUDED IN THIS PRESENTATION ARE MEANT TO BE USED ONLY AS A GUIDE.
IN ADDITION, THE INFORMATION CONTAINED IN THIS PRESENTATION IS BASED ON IBM’S CURRENT PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM, WITHOUT NOTICE.
IBM AND ITS AFFILIATED COMPANIES SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION.
NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, OR SHALL HAVE THE EFFECT OF:
- CREATING ANY WARRANT OR REPRESENTATION FROM IBM, ITS AFFILIATED COMPANIES OR ITS OR THEIR SUPPLIERS AND/OR LICENSORS
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corp., and registered in many jurisdictions worldwide.
Other product and service names might be trademarks of IBM or other companies.
A current list of IBM trademarks is available on the Web – see the IBM “Copyright and trademark information” page at URL: www.ibm.com/legal/copytrade.shtml
Adds dependency injection to JEE and makes it type-safe.
Hollywood principle - Don’t call us, we will call you
No hard coded dependencies on other specifications
Assists in unifying the Bean model
Well defined contexts, the ability to bind beans statefully to them & manage their lifecycle.
Introduces an event notification system to decouple producers & consumers
Uses interceptors to foster loose coupling – Extend behavior with type safe interceptor bindings– Refines interceptors into decorators for finer grained control
Integrates with the Unified EL to bridge JSF– Enables use of EJB 3.0 components as JSF managed beans
Introduces an SPI to extend JEE – Roll your own JEE7!– Not only an API but also a SPI– Rich ecosystem of CDI extensions
Integration with Java EE APIs – Spring beans can be injected into JSF Managed Beans– Spring beans can be referenced in EL with no JSF Backing beans– Spring JmsTemplate can be used on top of raw JMS API for convenience– Spring Listeners similar to EJB MDBs especially JCA rather than JMS listeners– Hibernate validator standardized as Bean Validation (JSR 303) – Spring 3 supports excellent bi-directional integration with EJBs– CDI and Spring Integration through the Spring Bridge to CDI
Native support for Java EE– Java EE5 and Java EE6 annotations supported by Spring– Spring can use JPA / Hibernate natively
Application server integration– DataSources can use application server QoS like pooling, transactions,
statement caching, debugging, monitoring and security
Migrating Spring to Java EE – https://github.com/paulbakker/migrating-spring-to-javaee– http://ocpsoft.com/java/spring-to-java-ee-a-migration-guide-cdi-jsf-jpa-jta-ejb/
CDI- Spring Bridge– http://rick-hightower.blogspot.com/2011/04/cdi-and-spring-living-in-harmony.html– http://niklasschlimm.blogspot.com/2011/08/jsr-299-cdi-interceptors-for-spring.html– http://niklasschlimm.blogspot.com/2011/08/jsr-299-cdi-decorators-for-spring-beans.html
Best practices integrating Spring with WebSphere Application Server– http://www.ibm.com/developerworks/websphere/techjournal/0609_alcott/0609_alcott.htm
What’s new in Spring 3.1 http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/htmlsingle/spring-framework-reference.html#new-in-3.1