G'day devs,

for now we limited views to templates in our discussion *but* what I
recommend is more then this templating part of forrest:views. 

forrest:views will change the way we are processing a request. I
designed it after the Dispatcher View J2EE design pattern [1].
"Dispatcher View

Context
System handles web requests. Presentation processing requires generating
a view based on a template and dynamic model.

Problem
Presentation tier changes occur often and are difficult to develop and
maintain, due to the intermingling of business data access logic and
presentation formatting logic. This makes the system less flexible, less
reusable, and generally less resilient to change. 

Portions of the business logic that are mixed with the View deal with
adapting the intermediate model for display while portions deal with
completing processing that is common across multiple requests, such as
logging and authentication. The former might best be encapsulated in a
component that is used by a specific View, while the latter might be
encapsulated in a centralized component.

Intermingling the business and systems logic with the view processing
also reduces modularity and provides a poor separation of roles among
web-production and software development teams.
...

Solution
Combine a Dispatcher with Views and Helpers (see ViewHelper Pattern) to
handle client requests and prepare a dynamic presentation as the
response. A Dispatcher is responsible for view management and
navigation, and can be encapsulated either within a Controller (see
FrontController Pattern), or can be a separate component working in
coordination. ..."[1]

forrest:views is best described by the first graphic on [2]. 

The business helper that we have are best described by our most famous
contract.
<forrest:contract name="content-feeder">
    <forrest:properties contract="content-feeder">
      <forrest:property name="content-feeder"
nugget="get.nugget.feeder">
        <url>/feeds/somefeed.xml</url>
      </forrest:property>
    </forrest:properties>
</forrest:contract>

Which will request parts of the presentation model from the feeder
plugin. This is quite basic for now and we have to extend on it.

The basic idea is that forrest:views will be a dispatcher config for
1) including data to the presentation model 
2) generating dynamic presentation 

Right now we are discussing only 2. I reckon that 1 is a more important
point to discuss. ;-)

[1] http://java.sun.com/j2ee/patterns/DispatcherView.html
[2] http://corej2eepatterns.com/Patterns2ndEd/DispatcherView.htm
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)

Reply via email to