|View Helper Pattern
- The system creates presentation content, which
requires processing of dynamic
- Changes occur often in the presentation tier and are
difficult to manage when
business logic and presentation logic are interwoven.
- This makes systems
- Less flexible
- Less reusable
- Less resilient
- Reduces modularity
- Business data assimilation requirements are
- Embedding business logic in the view causes
- It is desirable to promote a clean separation of
labor by having different roles of
Software developer and Web production team member
- One view is used to respond to a particular
- A view contains only the formatting code
- Business processing responsibilities are delegated to
implemented as JavaBeans or custom tags.
- Helpers store the view’s intermediate data model
- Object requesting generation of the view.
- Represents and displays information to the client.
- Information that is used in a dynamic display is
retrieved from a model.
- Helpers support views by encapsulating and adapting
a model for use in display.
- Responsible for helping a view or controller
complete its processing.
- Responsible for gathering data required by view and
storing this intermediate model.
- Also referred to as ValueBean sometimes.
- Typically implemented as JavaBeans and custom tags.
- Another name for the helper
- Responsible for holding intermediate model state
for use by a view.
- Business Service
- Role that is fulfilled by the service the client is
seeking to access.
- Service is accessed via a Business delegate.
- Role of Business delegate is to provide control and
protection for the business service.
- JSP View Strategy
- The view component is implemented as a JSP page
- Servlet View Strategy
- The view component is implemented as a Servlet
- JavaBean Helper Strategy
- Helper is implemented as a JavaBean
- JavaBeans are easily constructed and integrated
into a JSP environment
- Custom Tag Helper Strategy
- The Helper is implemented as a custom tag
(JSP 1.1 onwards only)
- Business Delegate Helper Strategy
- Helper components often make distributed
invocations to the business tier.
- Helper invokes a business service without knowing
details about its physical
- implementation and distribution
- May be implemented as a JavaBean
- Improves Application Partitioning, Reuse and
- Improves Role Separation
- Business Delegate
- Delegate hides from the client the underlying
details of looking up and accessing the
- Also provide intermediate caching to
reduce network traffic
- Dispatcher view and Service to Worker
- Combines Front Controller and View Helper with a
- Front Controller