Chapter 16. The Sample Application

In previous chapters, we have discussed lightweight architectures and technologies for each architectural layer. In this chapter, we will show how to put them together into a typical J2EE web application.

The sample application is an implementation of the familiar J2EE Pet Store requirements. Although the Pet Store is somewhat hackneyed, there is an undeniable advantage in taking a familiar problem as an illustration of the consequences of different architectural and implementation approaches. So we've chosen practicality over originality.

Instead of starting from scratch, we took as our starting point Clinton Begin's iBATIS JPetStore 3.1, an open-source alternative to the Sun J2EE BluePrints Java Pet Store. Begin's JPetStore was motivated by a desire to illustrate a simpler, more appropriate architecture than that of the original Sun Java Pet Store, which was widely, and deservedly, criticized for poor performance and over-engineering.

We believe that our version of JPetStore represents a significant improvement over the iBATIS JPetStore. Comparing our version with the iBATIS version is straightforward, because we've stayed as close to the original as possible, to show how the architecture we advocate can be introduced in a relatively straightforward refactoring. However, there's no need to refer to the original JPetStore unless you are interested in the comparison. Our JPetStore stands on its own, illustrating a typical Spring web application. ...

Get Expert One-on-One™ J2EE™ Development without EJB™ now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.