1.5. View Helper

View Helper encourages the separation of formatting-related code from other business logic. It suggests using Helper components to encapsulate logic relating to initiating content retrieval, validation, and adapting and formatting the model. The View component is then left to encapsulate the presentation formatting. Helper components typically delegate to the business services via a Business Delegate or an Application Service, while a View may be composed of multiple subcomponents to create its template. The View Helper pattern separates the processing logic from the view.

UML representation


Benefits

The following is a benefit of using the View Helper pattern:
  • Separates logic from the view

When to Use

You should use the View Helper pattern to:
  • Encapsulate view-processing logic
Comments