From J2ee to JavaEE... and beyond - A reference architecture for Java EE 5 Web applications

Abstract

The first well-documented reference architecture for developing Java 2 Enterprise Edition (J2ee) applications was presented by Alur, Crupi and Malks on 2001 in their book "Core J2ee Patters - Best Practices and Design Strategies" (1). The popular book exposed a wide set of common patterns which could be used to design a complete, coherent and reliable infrastructure for Java Enterprise Edition applications.
The architecture presented in this book has been widely adopted over the years in projects all over the world, and has demonstrated to be a viable way to create Web applications.

However, the inherent complexity of this architecture has stimulated a lot developers, open source communities and companies to research alternative ways and tools to build enterprise applications. As a consequence of this research, a lot of new products and open source frameworks were created, among which the most notable are probably the Spring Framework (1) and Hibernate (2). These (and other similar)frameworks brought in the field of Java programming three simple but powerful ideas:
1)POJO components. In most cases, it is possible to write complex components (like services or distributed objects) using just POJOs (Plain Old Java Objects) and giving the infrastructure the responsability to manage them in a trasparent way
2)Dependency injection. It is possible to let a container manage the connections between different components, thus simplifying the development of these components
3)Simplified O-R Mapping. Object-Relational mapping can be applied to POJO objects, with a simple and vendor-neutral API to manage their persistence

The increasing popularity of Spring, Hibernate and other equivalent tools eventually obscurated the popularity of the Java Enterprise Edition platform itself, so that on 2004 was a common practice to develop new J2EE applications without using Enterprise Java Beans, which is probably the most characterizing specification of the platform.

To bring the Java EE Platform back to the popularity of some years before, Sun and the Java Community Process (JCP) decided on 2003 to plan a redesigned and renewed version of the platform (later re-branded with the name Java Enterprise Edition 5); starting from the criticisms received because of the complexity of the previous release and considering all the new ideas introduced by other companies and open source communities, the JCP has finally released, on May 2006, a radically new platform which goal is to simplify the development of enteprise applications while mantaining a complete compatibility with the previous version of the Java Enterprise Edition specification.Developing applications with the redesigned platform isn't just amatter of learning all the new features; in fact, the way itself ofdesigning enterprise applications is going to change.

This presentation, after a brief introduction covering the old J2ee architecture and a typical Spring-Hibernate architecture, explaining both advantages and disadvantages of these solutions, try to delineate a "reference architecture" for developing web applications with Java Enterprise Edition 5, showing how this new design incorporate some of the major advantages of the previous two.The reference architecture presented focus mainly on the development of the business and integration tier of web applications, explaining (using also code examples) how the Enterprise Java Bean 3.0 specification allows developers to create a simple and powerful infrastructure for their applications. As for the presentation layer,
it presents both a standard based-solution (using Java Server Faces or simple JSP/JSTL pages) and a way of integrating Java EE dependency injection in an alternative, custom made, web framework. This last example is particularly useful because it explains how it is possible to use resource injection in non-managed classes, making it possible to extend the Java EE platform in a simple and quick way.

(1) Deepal Alur, John Crupi, Dan Malks, Core J2ee Patters - Best
Practices and Design Strategies, Prentice Hall PTR, 2001 (First
Edition), 2003 (Second Edition)
(2) Spring Framework, http://www.springframework.org
(3) Hibernate, http://www.hibernate.org

Speaker: Filippo Diotalevi

Filippo Diotalevi is a software engineer and technical writer living in Milan, Italy. His field of expertise is the design and development of Java Enterprise applications, with a particular focus on open source infrastructures and frameworks. He is the author of the books "Patterns - Direct Connection for Intra- and Inter-Enteprise" (IBM Redbooks, 2003) and "Java Enterprise Edition 5- Progettazione e Sviluppo di Applicazioni Web" (Hoepli Editore, 2006), as well as the founder of the Java User Group Milano ( http://www.jugmilano.it) and a regular speaker at technical conferences. His website and blog is at http://www.diotalevi.com

Speaker presentation references

A long version of the presentation is available here:
http://www.diotalevi.com/files/FromJ2eeToJavaEE-Milano.pdf

(None)

Adaptavist Theme Builder Powered by Atlassian Confluence