CHAPTER 3: Best Practices in Java EE Web Development 155Service to Worker
The Service to Worker design pattern assembles two patterns, Front Controller and View Helper, into
a microframework with a dispatcher component to utilize the benefits associated with each pattern.
The Service to Worker pattern is a combination of a dispatcher with views and helpers to handle
client requests and to generate dynamic content as the response. The Service to Worker pattern can
be used in an application when the application requires dynamic content generation.
The members of the Service to Worker pattern, as illustrated in Figure 3-17, are as follows:
Front controller
Dispatcher
Helper
View
View helperClientRequestDelegateDispatch
Gather dataget DataFront Controller Dispatcher View Helper View HelperFigure 3-16. Dispatcher View sequence diagram