[TYPO3-ect] MVC Project: CMEV introduction

Elmar Hinz elmar.DOT.hinz at team.MINUS.red.DOT.net
Fri Feb 2 15:31:10 CET 2007


Am Mon, 06 Mar 2006 22:10:35 +0100 schrieb Christian Welzel:

> Elmar Hinz wrote:
> 
>> I took some time to think about MVC, especially the question if the
>> checks of form inputs belong to model, controller or view.
> 
>> I call this pattern CMEV for the first: controlled model evaluator view.
> 
> Before inventing the wheel another time, have a look at
> Java Server Faces Specification on
> http://java.sun.com/javaee/javaserverfaces/download.html
> 
> Especially the part "2. Request Processing Lifecycle" is very
> interesting and describes how input data are validated and stored
> into the model.

Hi,

with the demonstation of Bananas 0.0.2 I have implemented the "Lifecyle"
model Christian has suggested a year ago. I is slightly modificated to
match our model of the SPL chain. 

The view (template engine object) is stored into the session. It can be
loaded in form of any SPL object that inherits from tx_lib_object, not
only in form of the template engine. In Bananas I load the data from the
session into the validator object, where they are overwriten by the
incomming parameters and validated. 

If validation fails, data will be displayed with the template engine
again. Else they can be stored into the model or go into the template
engine and into the session again until all of multiple form views have
been processed. 

I also introduce a simple captcha, that can be extended by new tests in
future and redirection like suggested by Ernesto and others. The
redirection is implemented as third "output" method into the link object.

What is still missing is a forms library. Would be really helpfull of
somebody of the core team could implement a central PEAR directory into
TYPO3, so that we can build upon any of the form libraries that are
distributed via the pear installer without the need to reinvent the wheel.

Regards

Elmar















More information about the TYPO3-team-extension-coordination mailing list