The Presentation Layer

Last, but not least, is the presentation layer. As with the data layer, creating the presentation layer is another difficult task, as there are many decisions to be made. Additionally, this layer often has the most constraints upon it: clients have a variety of browsers and versions of browsers, as well as other Internet-capable devices; output may need to be in a specific format; speed of display may be a factor; and so on. In the Forethought application, the presentation layer must be able to serve multiple types of clients, and do it in a way that doesn’t force a lot of duplication of content. JSP, XML, and XSL are all part of the solutions that will be examined for solving this problem.

As I’ll be spending Volume II on the subject of presentation, I’ll leave these details for a later discussion. However, this is not entirely for the sake of another book; it is also to show you that the details of the data and business layers are often completely isolated from the presentation layer. This means that two groups could design these at different times, or you could even develop a set of data stores and business rules without worrying about presentation until later (the approach taken by this book). This method forces you to uncouple these layers, which is critical to good application design. It also allows an easy conversion of an application to a set of web services; since your business layer is not specifically aimed at a web application, it is easy to expose ...

Get Building Java Enterprise Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.