On Wed, 25 Jun 2008, Joe Kepley wrote:

> >
> > James and I (as well as others through meetings), have been working the
> > past days on the MvcTools component and design. The fruits of this
> > labour are now in SVN[1]. We'd like you to ask to look at this and
> > provide feedback.
> >
> > [1] http://svn.ezcomponents.org/viewvc.cgi/experimental/MvcTools/design/
> >
> 
> Overall, this looks good. A couple of thoughts come to mind on the first
> read-through:
> 
> * Is there a reason for the Dispatcher (from the example in the design) to
> have visibility on the ezcViewHandler class? It might provide cleaner
> separation for the dispatcher to only call the ViewManager and provide the
> request and result objects.

It's purely for testability.

> * At what point are output filters run?

I've clarified this in the design document:

ezcMvcRequestFilter
-------------------

Provides an interface for request filters. Request filters can be used 
to modify the request data before it is used by the controller. They are 
run in the runRequestFilters() method of the ezcMvcController interface. 
This method should be called in the run() method of the controller, 
before the actual logic is applied::

    public function filterRequest( ezcMvcRequest $request );

ezcMvcResultFilter
------------------

Provides an interface for result filters. Filters that implement this 
interface can be run after a controller have run their action. They are 
run in the runResultFilters() method of the ezcMvcController interface. 
This method should be called in the run() method of the controller, 
after the actual logic is applied on the result object::

    public function filterResult( ezcMvcResult $result );

ezcMvcResponseFilter
--------------------

Provides an interface for response filters. Response filters are run 
after the view handlers have created a response from the result by the 
view handler. This can modify the final output stream and headers. They 
are run in the runFilters method of the ezcMvcViewHandler interface::

    public function filterResponse( ezcMvcResponse $response );


regards,
Derick
-- 
Components mailing list
Components@lists.ez.no
http://lists.ez.no/mailman/listinfo/components

Reply via email to