SlideShare a Scribd company logo
Java EE and Spring Framework ShootoutRohit Kelapure IBM Advisory Software Engineer, http://wasdynacache.blogspot.com/Reza RahmanIndependent Consultant, Author, Java EE Expert http://www.rahmannet.net/Presentation can be downloaded from http://db.tt/1q9us2JH
Important DisclaimersTHE 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 LICENSORS2
Copyright and Trademarks© IBM Corporation 2011. All Rights Reserved. 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.shtml3
Outline	Evolution of Java EE and SpringJava EE 6  & Spring 3.0, 3.1 highlightsSpring 3.1 feature comparison with Java EE 6CDI and Spring ecosystemSpring  and Java EE coexistenceConclusion4
J2EE Java EE  Specifications* Introduced in spec.
Evolution of J2EEJava EE6 (Dec 09)New specs (JAX-RS, CDI, Bean Validation)Prune dead woodEJB 2.x, JAX-RPC, JAXR, JEE App. Deploy, JEE App mgmt.Extensibility Easy Framework Pluggability (web fragments & CDI Extensions)Enhanced ease of developmentPOJO annotation based Servlets, Asynchronous processing (Servlet 3.0 & EJB 3.1)EJB 3.1EJB-in-WAR, No-interface view, Singleton, EJB-lite, TimersContextual Dependency Injection (CDI)RESTful servicesPortable JNDI namesJSF2.0Facelets, built-in-AJAX, Skins, Annotations, Resource handlingSimplified Navigation, Easier custom components, View & Page scopesBookmarkable pages, Project Stage, Expanded event modelJPA 2.0Mapping enhancements, JPAQL, Criteria Query API, Pessimistic lockingProfiles  reduce platform size  Web Profile 12 specsVendor supportWebSphere AS 8 JBOSS AS 7 Oracle WebLogic 11g Glassfish 36
JSR 299  Contexts and Dependency Injection (CDI)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 specificationsAssists in unifying the Bean modelWell defined contexts, the ability to bind beans statefully to them & manage their lifecycle.Introduces an event notification system to decouple producers & consumersUses interceptors to foster loose coupling Extend behavior with type safe interceptor bindingsRefines interceptors into decorators for finer grained controlIntegrates with the Unified EL to bridge JSFEnables use of EJB 3.0 components as JSF managed beansIntroduces an SPI to extend JEE – Roll your own JEE7!Not only an API but also a SPIRich ecosystem of CDI extensionsAdds the Web conversation contextSpring does NOT provide support for CDI7
Evolution of Spring  [ 1.0, 2.0, 2.5, 3.0, 3.1]8
Spring Framework9Lightweight dependency injection Aspect orientedLayered application & container frameworkWell defined modules on top of the core containerNOT an all-or-nothing solution
Birds Eye View10
Java EE  vs. Spring Framework Features/APIs Overview11
Java EE vs. Spring Business Component12
Spring XML for Business Component Injection13
Spring XML for Business Component Injection14
Spring  Java Based Configuration15
Spring  Java Based Configuration16
Java EE Interceptor vs. Spring Aspects17
Java EE vs. Spring Injection18
Java EE vs. Spring Injection – Spring configuration19
Facelet Component20JSF 2 vs. Spring MVC Front Controller
21JSF 2 vs. Spring MVC Front ControllerFacelet
22JSF 2 vs. Spring MVC Front ControllerEntityJSF Event  Handler
JSF 2 vs. Spring MVC23Spring MVC JSP
Spring MVC Configuration24
Spring Controller25
Spring MVC web.xml configuration26
Java EE vs. Spring Scheduling27
Java EE vs. Spring Scheduling28
Java EE vs. Spring Messaging29
Spring  JMS  Configuration30
Spring Message Producer31
Java EE Message Producer & JMS Abstraction32
Java EE Message Producer & JMS Abstraction33
Hacking the Java EE Platform - CDI ExtensionsActivated by dropping jars on the application classpathLoaded by the java.util.ServiceLoader SPIIntegrate with container through container lifecycle events  byRegister additional beans, interceptors and decoratorsInjecting dependencies into its own objectsIntroduce custom scope with backing contextAugment or override bean annotation-based metadata with other source Tools/utilities, extending Java EE, integration with Java EE APIs, integrating with non-standard APIs, making Java EE features available in non-Java EE 34
Spring Ecosystem35
CDI Ecosystem Snapshot36RuntimesImplementationsPortable ExtensionsWeldCanDITools
Spring & Java EE CoexistenceIntegration with Java EE APIs Spring beans can be injected into JSF Managed BeansSpring beans can be referenced in EL with no JSF Backing beansSpring JmsTemplate can be used on top of raw JMS API for convenienceSpring Listeners similar to EJB MDBs especially JCA rather than JMS listenersHibernate validator standardized as Bean Validation (JSR 303) Spring 3 supports excellent bi-directional integration with EJBsCDI and Spring Integration through the Spring Bridge to CDINative support for Java EEJava EE5 and Java EE6 annotations supported by SpringSpring can use JPA / Hibernate nativelyApplication server integrationDataSourcescan use application server QoS like pooling, transactions, statement caching, debugging, monitoring and security37
Java EE coexistence with Spring38
Birds Eye View39

More Related Content

PPTX
SpringBoot with MyBatis, Flyway, QueryDSL
PDF
Solid Principles
PDF
JPA and Hibernate
PPTX
SOLID principles
PDF
Nagios Monitoring Tool Tutorial | Server Monitoring with Nagios | DevOps Trai...
PDF
Microservices with Java, Spring Boot and Spring Cloud
PDF
Intellij idea tutorial
PPTX
ASP.NET MVC Presentation
SpringBoot with MyBatis, Flyway, QueryDSL
Solid Principles
JPA and Hibernate
SOLID principles
Nagios Monitoring Tool Tutorial | Server Monitoring with Nagios | DevOps Trai...
Microservices with Java, Spring Boot and Spring Cloud
Intellij idea tutorial
ASP.NET MVC Presentation

What's hot (20)

PPT
Java Server Faces (JSF) - Basics
PDF
Spring Framework - AOP
PPTX
Design Patterns - General Introduction
PDF
Extending Java EE with CDI and JBoss Forge
PPTX
Spring boot - an introduction
PPTX
Docker Networking Overview
PDF
Introduction to Java 11
PDF
Autoscaling Kubernetes
PDF
Introduction to Docker Compose
PDF
Nest.js Introduction
PPTX
Spring Boot
PPTX
Spring boot Introduction
PDF
Gof design pattern
PDF
DevOps with Ansible
PPTX
Spring Security 5
PPTX
Introduction to Ansible
PDF
CI/CD with Github Actions
PPS
Desarrollo de aplicaciones empresariales con Java EE
ODP
Introduction to Ansible
PDF
Spring Boot
Java Server Faces (JSF) - Basics
Spring Framework - AOP
Design Patterns - General Introduction
Extending Java EE with CDI and JBoss Forge
Spring boot - an introduction
Docker Networking Overview
Introduction to Java 11
Autoscaling Kubernetes
Introduction to Docker Compose
Nest.js Introduction
Spring Boot
Spring boot Introduction
Gof design pattern
DevOps with Ansible
Spring Security 5
Introduction to Ansible
CI/CD with Github Actions
Desarrollo de aplicaciones empresariales con Java EE
Introduction to Ansible
Spring Boot
Ad

Viewers also liked (20)

PPT
Java EE and Spring Side-by-Side
PDF
Microservices - java ee vs spring boot and spring cloud
PDF
JavaOne 2011: Migrating Spring Applications to Java EE 6
PPT
SIBus Tuning for production WebSphere Application Server
PDF
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
PDF
Java EE Revisits GoF Design Patterns
PDF
Java EE 8 Web Frameworks: A Look at JSF vs MVC
PDF
Microservice With Spring Boot and Spring Cloud
PDF
Spring Framework - Core
PDF
Cache Tooling
PPT
Java EE Revisits Design Patterns
PDF
jDays2015 - JavaEE vs. Spring Smackdown
PDF
Java EE 6 & GlassFish 3
PPT
Java EE revisits design patterns
PPTX
Hadoop vs Java Batch Processing JSR 352
PPTX
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
PDF
The Modern Java Web Developer - JavaOne 2013
PPTX
Move from J2EE to Java EE
PPTX
2012 04-09-v2-tdp-1167-cdi-bestpractices-final
Java EE and Spring Side-by-Side
Microservices - java ee vs spring boot and spring cloud
JavaOne 2011: Migrating Spring Applications to Java EE 6
SIBus Tuning for production WebSphere Application Server
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
Java EE Revisits GoF Design Patterns
Java EE 8 Web Frameworks: A Look at JSF vs MVC
Microservice With Spring Boot and Spring Cloud
Spring Framework - Core
Cache Tooling
Java EE Revisits Design Patterns
jDays2015 - JavaEE vs. Spring Smackdown
Java EE 6 & GlassFish 3
Java EE revisits design patterns
Hadoop vs Java Batch Processing JSR 352
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
The Modern Java Web Developer - JavaOne 2013
Move from J2EE to Java EE
2012 04-09-v2-tdp-1167-cdi-bestpractices-final
Ad

Similar to Java EE vs Spring Framework (20)

PPT
Spring Framework
PPT
Spring ppt
PPT
Jetspeed-2 Overview
PPTX
Spring Framework Rohit
PPTX
SpringBootCompleteBootcamp.pptx
PDF
Spring Framework Tutorial | VirtualNuggets
PDF
Spring boot vs spring framework razor sharp web applications
ODP
JBoss AS7 OSDC 2011
PPT
Java J2EE
PPTX
Introduction to Spring Framework
PDF
Ejb notes
PDF
Spring presentecion isil
PDF
Spring presentecion isil
PPTX
J2ee seminar
PDF
Securing JSF Applications Against the OWASP Top Ten
ODP
Spring framework
PPTX
2024-09-10 Jacksonville JUG Java on Azure with AI
PDF
PDF
Spring Boot
DOCX
Project report for final year project
Spring Framework
Spring ppt
Jetspeed-2 Overview
Spring Framework Rohit
SpringBootCompleteBootcamp.pptx
Spring Framework Tutorial | VirtualNuggets
Spring boot vs spring framework razor sharp web applications
JBoss AS7 OSDC 2011
Java J2EE
Introduction to Spring Framework
Ejb notes
Spring presentecion isil
Spring presentecion isil
J2ee seminar
Securing JSF Applications Against the OWASP Top Ten
Spring framework
2024-09-10 Jacksonville JUG Java on Azure with AI
Spring Boot
Project report for final year project

More from Rohit Kelapure (20)

PDF
API First or Events First: Is it a Binary Choice?
PDF
External should that be a microservice
PDF
Should That Be a Microservice ?
PPTX
Travelers 360 degree health assessment of microservices on the pivotal platform
PDF
SpringOne Platform 2018 Recap in 5 minutes
PDF
Migrate Heroku & OpenShift Applications to IBM BlueMix
PDF
Liberty Buildpack: Designed for Extension - Integrating your services in Blue...
PDF
A Deep Dive into the Liberty Buildpack on IBM BlueMix
PDF
Liberty dynacache ffw_iea_ste
PDF
1812 icap-v1.3 0430
PDF
Dynacache in WebSphere Portal Server
PPT
Classloader leak detection in websphere application server
PDF
2012 04-06-v2-tdp-1163-java e-evsspringshootout-final
PPTX
2012 04-09-v2-tdp-1167-cdi-bestpractices-final
DOC
Web sphere application server performance tuning workshop
PPT
Performance tuningtoolkitintroduction
PDF
IBM Health Center Details
PPTX
Debugging java deployments_2
ODP
Caching technology comparison
PPT
First Failure Data Capture for your enterprise application with WebSphere App...
API First or Events First: Is it a Binary Choice?
External should that be a microservice
Should That Be a Microservice ?
Travelers 360 degree health assessment of microservices on the pivotal platform
SpringOne Platform 2018 Recap in 5 minutes
Migrate Heroku & OpenShift Applications to IBM BlueMix
Liberty Buildpack: Designed for Extension - Integrating your services in Blue...
A Deep Dive into the Liberty Buildpack on IBM BlueMix
Liberty dynacache ffw_iea_ste
1812 icap-v1.3 0430
Dynacache in WebSphere Portal Server
Classloader leak detection in websphere application server
2012 04-06-v2-tdp-1163-java e-evsspringshootout-final
2012 04-09-v2-tdp-1167-cdi-bestpractices-final
Web sphere application server performance tuning workshop
Performance tuningtoolkitintroduction
IBM Health Center Details
Debugging java deployments_2
Caching technology comparison
First Failure Data Capture for your enterprise application with WebSphere App...

Recently uploaded (20)

PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Electronic commerce courselecture one. Pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPT
Teaching material agriculture food technology
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Modernizing your data center with Dell and AMD
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Encapsulation theory and applications.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Electronic commerce courselecture one. Pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Teaching material agriculture food technology
The Rise and Fall of 3GPP – Time for a Sabbatical?
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Modernizing your data center with Dell and AMD
Advanced methodologies resolving dimensionality complications for autism neur...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Encapsulation theory and applications.pdf
NewMind AI Weekly Chronicles - August'25 Week I
MYSQL Presentation for SQL database connectivity
Per capita expenditure prediction using model stacking based on satellite ima...
Machine learning based COVID-19 study performance prediction
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
20250228 LYD VKU AI Blended-Learning.pptx

Java EE vs Spring Framework

  • 1. Java EE and Spring Framework ShootoutRohit Kelapure IBM Advisory Software Engineer, http://wasdynacache.blogspot.com/Reza RahmanIndependent Consultant, Author, Java EE Expert http://www.rahmannet.net/Presentation can be downloaded from http://db.tt/1q9us2JH
  • 2. Important DisclaimersTHE 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 LICENSORS2
  • 3. Copyright and Trademarks© IBM Corporation 2011. All Rights Reserved. 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.shtml3
  • 4. Outline Evolution of Java EE and SpringJava EE 6 & Spring 3.0, 3.1 highlightsSpring 3.1 feature comparison with Java EE 6CDI and Spring ecosystemSpring and Java EE coexistenceConclusion4
  • 5. J2EE Java EE Specifications* Introduced in spec.
  • 6. Evolution of J2EEJava EE6 (Dec 09)New specs (JAX-RS, CDI, Bean Validation)Prune dead woodEJB 2.x, JAX-RPC, JAXR, JEE App. Deploy, JEE App mgmt.Extensibility Easy Framework Pluggability (web fragments & CDI Extensions)Enhanced ease of developmentPOJO annotation based Servlets, Asynchronous processing (Servlet 3.0 & EJB 3.1)EJB 3.1EJB-in-WAR, No-interface view, Singleton, EJB-lite, TimersContextual Dependency Injection (CDI)RESTful servicesPortable JNDI namesJSF2.0Facelets, built-in-AJAX, Skins, Annotations, Resource handlingSimplified Navigation, Easier custom components, View & Page scopesBookmarkable pages, Project Stage, Expanded event modelJPA 2.0Mapping enhancements, JPAQL, Criteria Query API, Pessimistic lockingProfiles reduce platform size Web Profile 12 specsVendor supportWebSphere AS 8 JBOSS AS 7 Oracle WebLogic 11g Glassfish 36
  • 7. JSR 299 Contexts and Dependency Injection (CDI)Adds dependency injection to JEE and makes it type-safe.
  • 8. Hollywood principle - Don’t call us, we will call you
  • 9. No hard coded dependencies on other specificationsAssists in unifying the Bean modelWell defined contexts, the ability to bind beans statefully to them & manage their lifecycle.Introduces an event notification system to decouple producers & consumersUses interceptors to foster loose coupling Extend behavior with type safe interceptor bindingsRefines interceptors into decorators for finer grained controlIntegrates with the Unified EL to bridge JSFEnables use of EJB 3.0 components as JSF managed beansIntroduces an SPI to extend JEE – Roll your own JEE7!Not only an API but also a SPIRich ecosystem of CDI extensionsAdds the Web conversation contextSpring does NOT provide support for CDI7
  • 10. Evolution of Spring [ 1.0, 2.0, 2.5, 3.0, 3.1]8
  • 11. Spring Framework9Lightweight dependency injection Aspect orientedLayered application & container frameworkWell defined modules on top of the core containerNOT an all-or-nothing solution
  • 13. Java EE vs. Spring Framework Features/APIs Overview11
  • 14. Java EE vs. Spring Business Component12
  • 15. Spring XML for Business Component Injection13
  • 16. Spring XML for Business Component Injection14
  • 17. Spring Java Based Configuration15
  • 18. Spring Java Based Configuration16
  • 19. Java EE Interceptor vs. Spring Aspects17
  • 20. Java EE vs. Spring Injection18
  • 21. Java EE vs. Spring Injection – Spring configuration19
  • 22. Facelet Component20JSF 2 vs. Spring MVC Front Controller
  • 23. 21JSF 2 vs. Spring MVC Front ControllerFacelet
  • 24. 22JSF 2 vs. Spring MVC Front ControllerEntityJSF Event Handler
  • 25. JSF 2 vs. Spring MVC23Spring MVC JSP
  • 28. Spring MVC web.xml configuration26
  • 29. Java EE vs. Spring Scheduling27
  • 30. Java EE vs. Spring Scheduling28
  • 31. Java EE vs. Spring Messaging29
  • 32. Spring JMS Configuration30
  • 34. Java EE Message Producer & JMS Abstraction32
  • 35. Java EE Message Producer & JMS Abstraction33
  • 36. Hacking the Java EE Platform - CDI ExtensionsActivated by dropping jars on the application classpathLoaded by the java.util.ServiceLoader SPIIntegrate with container through container lifecycle events byRegister additional beans, interceptors and decoratorsInjecting dependencies into its own objectsIntroduce custom scope with backing contextAugment or override bean annotation-based metadata with other source Tools/utilities, extending Java EE, integration with Java EE APIs, integrating with non-standard APIs, making Java EE features available in non-Java EE 34
  • 39. Spring & Java EE CoexistenceIntegration with Java EE APIs Spring beans can be injected into JSF Managed BeansSpring beans can be referenced in EL with no JSF Backing beansSpring JmsTemplate can be used on top of raw JMS API for convenienceSpring Listeners similar to EJB MDBs especially JCA rather than JMS listenersHibernate validator standardized as Bean Validation (JSR 303) Spring 3 supports excellent bi-directional integration with EJBsCDI and Spring Integration through the Spring Bridge to CDINative support for Java EEJava EE5 and Java EE6 annotations supported by SpringSpring can use JPA / Hibernate nativelyApplication server integrationDataSourcescan use application server QoS like pooling, transactions, statement caching, debugging, monitoring and security37
  • 40. Java EE coexistence with Spring38
  • 42. ReferencesEvolution of Java EE http://en.wikipedia.org/wiki/Java_EE_version_historyJava EE 6 Tutorial http://download.oracle.com/javaee/6/tutorial/doc/Spring Docs http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/Spring Projects http://www.springsource.org/projectsMiscellaneous CDI Extensions https://github.com/softwaremill/softwaremill-commonMigrating Spring to Java EE https://github.com/paulbakker/migrating-spring-to-javaeehttp://ocpsoft.com/java/spring-to-java-ee-a-migration-guide-cdi-jsf-jpa-jta-ejb/CDI- Spring Bridgehttp://rick-hightower.blogspot.com/2011/04/cdi-and-spring-living-in-harmony.htmlhttp://niklasschlimm.blogspot.com/2011/08/jsr-299-cdi-interceptors-for-spring.htmlhttp://niklasschlimm.blogspot.com/2011/08/jsr-299-cdi-decorators-for-spring-beans.htmlBest practices integrating Spring with WebSphere Application Serverhttp://www.ibm.com/developerworks/websphere/techjournal/0609_alcott/0609_alcott.htmWhat’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.140
  • 43. References continued SEAM 3 http://seamframework.org/Seam3CODI http://myfaces.apache.org/extensions/cdi/Weld http://seamframework.org/WeldCanDIhttp://www.caucho.com/resin/candi/OpenWebBeanshttp://openwebbeans.apache.org/owb/index.html41

Editor's Notes

  • #6: http://www.ibm.com/developerworks/websphere/library/techarticles/0707_barcia/0707_barcia.htmlhttp://en.wikipedia.org/wiki/Java_EE_version_historyA brief history of J2EE / Java EEBefore J2EE (Mid 1990s)Many competing products, In-house frameworks, Fragmented server side market, real danger of vendor lock-in, expensive solutionsGlory days of J2EE (1999-2003)Release of J2EE 1.2, 1.3 & 1.4Specifying first and then implementingStandardization of server side java enterprise technologiesEnterprise Java gains a reputation of complexityDecline of J2EE (2004- 2008)Projects fail due to flaws in platformRise of open source – Spring Framework, Seam, AspectJ, HibernateMove towards lighter weight solutionsRise of Java EE (2007 - Present)Emphasis on user Component model not just a deployment platformDeveloper productivity & ease of use enhancements Extensibility and right sizingTraps that created complexityDesign by committeeEverything has to be standardizedTools can make complexity acceptableLack of openness to other platforms, sources of ideasLack of developer freedom to hack the platformIvory tower architectureEJB Programming model was the worst offenderNaïve ORM solution & Broken persistence modelIdea that all business objects should be distributedRigid API interfaces, Difficult to unit test, Needed IDE toolingGlutton for XML & boilerplateJSF 1.2 ShortcomingsNo integration with EJBsNo templating support (before 1.2) Transparent to HTTP RequestsDifficult to create custom componentsLacks conversation scope & advanced componentsWeak page oriented supportOverly complex lifecycleJSP & JSF inherent mismatchJava EE pioneers innovations in server-side JavaA widely deployed but much maligned platformSpring, along with Hibernate, brings POJO programming, IoC and testability to the mainstreamJava EE 5 adopts ideas, as well as annotations and convention-over-configurationHibernate standardized into JPA, Spring remains nonstandard but adopts Java EE features to a degreeJava EE 6 matures ideas in Java EE 5 in addition to pruning and profilesCDI, JSF 2, JPA 2, EJB 3.1, Servlet 3, JAX-RS major API changes
  • #8: Context abuse HttpSessionSo many beans so little common groundAddresses long standing challenges with Java EE
  • #9: http://blog.springsource.com/2011/02/11/spring-framework-3-1-m1-released/Bean definition profilesUnified property management through Spring's new Environment abstractionEnhancements to Java-based configuration with @Feature methodsExpanded MVC namespace support and a Java-based configuration equivalentStreaming support and new interception model for the RestTemplate APIComprehensive caching supportNew c: XML namespace for concise configuration of constructor injection
  • #10: Applications developed against commonframework(s)– common programming model– common configuration model• Adapted onto target platform at runtime– using common service abstractions– thread pooling, service lookups, etc• Strict separation between applicationcomponent model and platform services– clear boundaries and separation of responsibilitieshttp://www.springsource.org/aboutThe most complete lightweight container, providing centralized, automated configuration and wiring of your application objects. The container is non-invasive, capable of assembling a complex system from a set of loosely-coupled components (POJOs) in a consistent and transparent fashion. The container brings agility and leverage, and improves application testability and scalability by allowing software components to be first developed and tested in isolation, then scaled up for deployment in any environment (J2SE or J2EE). A common abstraction layer for transaction management, allowing for pluggable transaction managers, and making it easy to demarcate transactions without dealing with low-level issues. Generic strategies for JTA and a single JDBC DataSource are included. In contrast to plain JTA or EJB CMT, Spring's transaction support is not tied to J2EE environments. A JDBC abstraction layer that offers a meaningful exception hierarchy (no more pulling vendor codes out of SQLException), simplifies error handling, and greatly reduces the amount of code you'll need to write. You'll never need to write another finally block to use JDBC again. The JDBC-oriented exceptions comply to Spring's generic DAO exception hierarchy. Integration with Toplink, Hibernate, JDO, and iBATIS SQL Maps: in terms of resource holders, DAO implementation support, and transaction strategies. First-class Hibernate support with lots of IoC convenience features, addressing many typical Hibernate integration issues. All of these comply to Spring's generic transaction and DAO exception hierarchies. AOP functionality, fully integrated into Spring configuration management. You can AOP-enable any object managed by Spring, adding aspects such as declarative transaction management. With Spring, you can have declarative transaction management without EJB... even without JTA, if you're using a single database in Tomcat or another web container without JTA support. A flexible MVC web application framework, built on core Spring functionality. This framework is highly configurable via strategy interfaces, and accommodates multiple view technologies like JSP, Velocity, Tiles, iText, and POI. Note that a Spring middle tier can easily be combined with a web tier based on any other web MVC framework, like Struts, WebWork, or Tapestry.
  • #11: Both are competent middleware stacks with mostly equivalent functionality but very different approachesJava EE provides a well-integrated solution stack that makes sensible default choices for you and minimizes the amount of configuration requiredSpring is a pluggable framework with explicit configuration, fine grained control and wide-variety of integration with overlapping technologiesJava EE is an open standard, while Spring is an open source tool from a commercial vendorCDI and 3rd party Extensions have provided a standard compliant way to hack the Java EE platformSpring framework weakens integration with application server runtime QoS, such as security, workload management, and high availabilitySeveral implementations of Java EE specifications are available whereas Spring has only ONE implementationPace of innovation is faster in the Spring Framework since Spring is Community driven vs Java EE that is driven by the JCP
  • #36: MyFaces CODI is your best friend for CDI based projects.The Apache MyFaces Extensions CDI project (aka CODI) hosts portable extensions for Contexts and Dependency Injection (CDI - JSR 299) for the Java-Platform (SE and EE). CODI is a toolbox for your CDI application (it provides advanced and convenient features e.g. for JSF and Bean-Validation). Like CDI itself CODI is focused on type-safety. It is a modularized and extensible framework. So it's easy to choose the needed parts to facilitate the daily work in your project.The main focus is to provide superior tools which will support you on solving your daily needs of software development with CDI, JSF, BV and JPA. However, you will also find modules which are independent of JSF as well as modules which improve the compatibility with other MyFaces frameworks like MyFacesExtVal. Maybe the most important feature of MyFaces CODI is that it allows you to build a concise and efficient application-architecture.