Pessoal,
Alguém sabe explicar qual é a sútil diferença existente entre os padrões DispatcherView e ServiceToWorker?
Estive lendo as blueprints, e percebi que os problemas à serem resolvidos (aplicabilidade) dos dois padrões é idêntica.
http://java.sun.com/blueprints/corej2eepatterns/Patterns/DispatcherView.html
http://java.sun.com/blueprints/corej2eepatterns/Patterns/ServiceToWorker.html
Problem
The problem is a combination of the problems solved by the Front Controller and View Helper patterns in the presentation tier. There is no centralized component for managing access control, content retrieval, or view management, and there is duplicate control code scattered throughout various views. Additionally, business logic and presentation formatting logic are intermingled within these views, making the system less flexible, less reusable, and generally less resilient to change.
Intermingling business logic with view processing also reduces modularity and provides a poor separation of roles among Web production and software development teams.
Forces
*
Authentication and authorization checks are completed per request.
* Scriptlet code within views should be minimized.
* Business logic should be encapsulated in components other than the view.
* Control flow is relatively complex and based on values from dynamic content.
* View management logic is relatively sophisticated, with multiple views potentially mapping to the same request.
Solution
Combine a controller and dispatcher with views and helpers (see "Front Controller" on page 172 and "View Helper" on page 186) to handle client requests and prepare a dynamic presentation as the response. Controllers delegate content retrieval to helpers, which manage the population of the intermediate model for the view. A dispatcher is responsible for view management and navigation and can be encapsulated either within a controller or a separate component.
Até mais,
Jean PIerobom