Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

5.6. Reduce Boilerplate Code

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


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint