Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
With “stateless” frameworks, there is an artificial gap between the web presentation layer and business logic layer of the application. The web presentation layer is always “stateful” with access to the HTTP session object. The business layer, however, is “stateless” and has to wipe the slate clean after each service request. As a result, you need all kinds of “wrapper objects” to move data from one layer to the next. For instance, you often need to explicitly wrap objects for the following occasions.
To transport complex database query results (the DTOs, which we discussed earlier)
To build data objects into display components (i.e., to build JSF DataModel components)
To propagate exceptions (e.g., data validation errors, transaction errors, etc.) from the business layer to the presentation layer