Java Reference
In-Depth Information
Forces
• Users need to view dynamic data and different HTML controls in their browsers.
• There needs to be flexible layout support.
Solution
The dynamic data can be displayed using the View Helper design pattern. In the case of
the order management application, I will use JSTL tags to retrieve and display dynamic
data. To render the different controls, you can use the Spring form tags. You can read
more about the Spring form tags at http://static.springframework.org/spring/docs/
2.5.x/reference/view.html#view-jsp-formtaglib .
You can apply the Composite View pattern to include the JSP-based view in a flexible
layout. The layout in the example OMS will be built using Apache Tiles 2. The Spring doc-
umentation provides comprehensive details about the integration with the Tiles layout
framework; you can access it at http://static.springframework.org/spring/docs/2.5.x/
reference/view.html#view-tiles . If you are interested to know more about layouts and the
Tiles framework in general, read all about it at http://tiles.apache.org/ .
Page Controller
Problem
The event generated by each user action needs to be handled outside the front controller.
This will enable the front controller to concentrate on the core task of acting as the single
point of entry into the application and hence conform to SRP. Once the request is
received, the front controller delegates the actual request processing to some other
components. These components should also be responsible for retrieving a model by
invoking the business logic component.
Forces
• Remove the code that invokes business logic in response to user action to reusable
components.
• Identify the reusable components based on the request URL.
• Deploy one reusable component per user action.
 
Search WWH ::




Custom Search