Java Reference
In-Depth Information
Figure 10.5. The layered design of every Java web application ever made. Presentation layer classes, including
controllers, go through transactional services to access persistent data.
The user interface in the standard model is a browser, also known as a lightweight client,
as opposed to a heavyweight (desktop) Java client. The browser presents views to the
user, who occasionally submits information back to the server side. The information goes
through controllers, which are classes that decide where to go, what business logic to in-
voke, and what view to use when the request has been processed.
A key principle of Java web application development is to keep the controllers thin, mean-
ing minimal in the amount of actual processing that they do. Instead, the business logic is
delegated to service classes. The services are needed also as transactional boundaries, be-
cause data access is handled through a set of classes in a data access layer. The data access
classes follow the Data Access Object (DAO) design pattern, which encapsulates [ 10 ] a data
source and transforms entities into database tables and back.
 
Search WWH ::




Custom Search