300 likes | 667 Views
Spring: Roadmap. Rod Johnson Interface21 Cork, September 6, 2005. Topics. Where does Spring fit into the evolution of J2SE and J2EE? Roadmap summary for Spring 1.3 and 1.4. Spring and EJB3. JSR-220 Expert Group is delivering Java Persistence API 1.0 (JPA)
E N D
Spring:Roadmap Rod Johnson Interface21 Cork, September 6, 2005
Topics • Where does Spring fit into the evolution of J2SE and J2EE? • Roadmap summary for Spring 1.3 and 1.4
Spring and EJB3 • JSR-220 Expert Group is delivering • Java Persistence API 1.0 (JPA) • EJB 3.0 addendum to EJB 2.1 specification • Until recently these were contained in the one document • However, they are distinct, and JPA is designed to be usable outside an EJB container, even outside a J2EE environment • Decoupling between EJB and persistence is welcome • Persistence should be independent of environment
Spring and Java Persistence API 1.0 • Oracle are developing the JSR-220 Reference Implementation, which will be based on the TopLink O/R mapping product • We will be releasing an integration that places JPA within Spring’s data access abstraction • Enables use of JPA in any environment • Enables mixing of JPA, JDBC, iBATIS etc. • Facilitates migration from Hibernate or other present persistence APIs • Promotes appropriate architectural layering using the new API
Java Persistence API: Impact? • Likely to have significant impact in 2006 • All major players involved • Hibernate • Oracle (TopLink) • SolarMetric (Kodo JDO) • Versant (Open Access JDO and tooling) • API and model seems solid, although probably requires some refinement from latest public draft
Where does this leave EJB 3.0? • EJB 3.0 is a cosmetic overhaul of the EJB programming model • Largely concerns session and message bean model • Essentially the same model under the covers • Does not address important gaps in the spec, such as startup actions • EJB 3.0 containers must be backward compatible • Effectively rules out new players
EJB 3.0 and Spring • Do they compete? • Not really • EJB 3.0 offers a basic Dependency Injection and interception capability • Spring provides the most full-featured DI implementation available, and a complete AOP solution ranging from its own proxy-based framework through close integration with AspectJ • Using Spring does not prevent the use of EJB 3.0 or vice versa • Users can choose to use Spring to supplement the DI capabilities of EJB 3.0
EJB 3.0 and Spring: Summary • Spring will fully support the Java Persistence API 1.0 (formerly part of EJB 3.0) • Spring will interoperate with EJB 3.0 session beans and message beans, as it does with EJB 1.x and 2.x • Spring will probably provide services to assist in developing EJB 3.0 components • Spring may even process some EJB 3.0 annotations • Transaction annotations? • Spring offers far more features than EJB 3.0 in a far wider range of environments • Even offers the same model on .NET, with the release of Spring.NET 1.0 • Identical IoC and AOP model
EJB 3.0 • EJB 3.0 is an improvement on EJB 2.0, but fails to address many core EJB flaws • Not a full-featured IoC/Dependency Injection solution • Essentially reactive, rather than exhibiting leadership • The majority of criticisms of the EJB model in J2EE without EJB remain valid • Developing sophisticated applications with EJB 3.0 is likely to require either using Spring to supplement EJB 3.0, building in-house infrastructure, or using proprietary extensions from the EJB vendor • All the features Spring offers that EJB 3.0 doesn’t were added to Spring for a reason: • Users needed them
EJB 3.0 and Spring: Summary • Spring is an application framework • Independent of application server infrastructure but capable of interoperating with it • Can evolve at an independent rate • Can be upgraded without need to upgrade application server • Preserves widest choice for deployment • Tomcat or other servlet container • Integration test • Standalone application
Standards vs Open Source • Interesting question, especially with Apache License • Standardization is less important in the age of the POJO • Application code is largely decoupled from the framework • Open source is more agile, more responsive to users • Open source has demonstrated effective leadership in this space • Standardization more important for wire protocols and lower level building blocks
Spring and J2EE • BEA partnership • BEA are certifying Spring (and other open source frameworks) on WebLogic • BEA are partnering with Interface21 to provide Spring support on WebLogic • Makes it clear that there is no conflict between J2EE and Spring • JavaOne keynote by Mark Carges (BEA CTO) made it clear that BEA recognize open source innovation • We are also talking to other major vendors
The Spring Roadmap • Mission: • Continue vigorous innovation in POJO-based middleware • We anticipate that Spring’s technical lead over EJB 3.0 will grow, rather than narrow • Remember that EJB 3.0 is presently a long way short of Spring 1.0 in terms of features • Many significant new features planned
The Spring Roadmap • Integrate with Java Persistence API 1.0 • Will release preview shortly after release of Reference Implementation • We anticipate that users will gradually migrate to the new API from Hibernate, TopLink and other proprietary persistence APIs • This integration will be available in any application server • …even outside an application server
The Spring Roadmap: 1.3 (1) • October • Portlet support • Enhanced JSP tag library • Core support for Spring Web Flow • Support for JMS message receipt without MDBs • Transparent scoping for Spring beans • Per-request • Per-Session • Supports arbitrary scope • Highly testable • Response to customer requests • Does not require changes to core container
The Spring Roadmap: 1.3 (2) public CustomerController implements Controller { private Account account; public void setAccount(Account account) { this.account = account; } public ModelAndView handleRequest( HttpServletRequest request, HttpServletResponse response) { // Work with account instance variable … } Injection of proxy backed by transparent HttpSession lookup
Spring Web Flow • Currently mature • Powerful, higher level of abstraction than traditional MVC frameworks • Enables reuse of entire web interactions • Final release due in October
The Spring Roadmap: Spring 1.4 • Early 2006 • Note: Some of these features may be subject to change • Closer integration with AspectJ • Spring AOP will be able to use AspectJ pointcut expression language • Rests on work done in AspectJ as well as Spring execution(* *.getSpouse()) execution(void *.set*(String))
The Spring Roadmap: 1.4 - AspectJ integration • Why does Spring/AspectJ integration matter? • AspectJ is the de facto standard solution for full-blown AOP • Mature, well thought out, well documented • Robust • Excellent tool support (AJDT) • Will simplify XML configuration of Spring AOP • As AspectJ hits the mainstream, Spring users will be ideally placed • AspectJ lead Adrian Colyer has just resigned from IBM to join Interface21
The Spring Roadmap: 1.4 - XML • More flexible and extensive XML parsing • Allows use of namespaces and development of custom XML tags • Ideal for third parties developing Spring components • Will allow for enhanced tool support • Spring will retain 100% backward compatibility • Decoupling between application code and container is key • Significant new features, but no enforced migration • Compare history of EJB…
The Spring Roadmap: 1.4 - XML <j2ee:jndi jndiName="weatherService" /> <myvendor:myWeatherService location="Cork" cacheMillis="30000" /> Simplification of common configuration requirements Vendor-specific tag can define multiple beans
The Spring Roadmap: 1.4 – Java configuration • Java-based configuration option (prototype) • Type safe • Offers full IDE tooling support • Code completion • Refactoring • May offer enhanced modularization • Allows inheritance of configurations • Abstract base class • Production and integration test subclasses • Can be mixed with XML (and properties) configuration, so configuration that should be externalized from Java can still be externalized
The Spring Roadmap • Taking the POJO to new territory • Prototype work based on transparent JavaSpaces remoting • Work with caching vendors such as Tangosol • Investigating integration with Terracotta clustering solution • Spring’s proven model has a lot of potential in yet unexplored areas
The Spring Roadmap: Partnerships • Enhanced integration with WebLogic • Enhanced transaction management • JMX integration • Spring-managed objects can be administered through the WebLogic console • Demoed in BEA keynote at JavaOne • Remoting integration • Failover, transactional capabilities of WebLogic RMI using Spring POJO-based remoting model • Hopefully, integration also with other application servers
Summary • Spring will retain its lead in POJO-based application architecture • Spring will embrace Java Persistence API as a standard API for O/R mapping • EJB 3.0 and Spring will coexist, but EJB 3.0 has little to offer Spring users • Persistence part of JSR-220 work will gain wide adoption • The remainder is far less compelling • Spring 1.3 and 1.4 will introduce significant new features