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.
The following is a benefit of using the View Helper pattern:
- Separates logic from the view
You should use the View Helper pattern to:
- Encapsulate view-processing logic