[TYPO3-ect] MVC Project: CMEV introduction

Elmar Hinz elmar.DOT.hinz at team.MINUS.red.DOT.net
Wed Mar 8 20:46:40 CET 2006


Christian Welzel schrieb:
> As i understood the JSF (i'm a JSF noobie) the main idea is to build
> a tree of UI objects that represent a specific view. In the normal case
> this tree is build while rendering the output of a view for a request and
> than serialized and saved (on server or client). a subsequent request
> deserializes this tree (restore view phase) and the other phases are
> applied. if any error occures the same tree is rendered again, but this
> time the UI objects contain error descriptions in addition to the data
> entered by the user. This way you can present the user a form a second
> time with messages without writing any code on your own (assuming the usage
> of std validators and stuff).

In TYPO3 the tree of UI objects is called cObject and can configured
with PHP or TypoScript or a combination of both. The mayor problem is
that the TS-Tree is only a virtual tree and steers functions in the
cObject. Unfortunally there is no real tree of PHP objects. Dan Frost
has worked on http://www.object-typoscript.org.uk/ for a while.

I am not very confident with the features the current TS-Forms
provide. But your visions would be best placed in this context I think.

Some guys have collect some ideas for a new library.
http://wiki.typo3.org/index.php/Forms_Library_for_FE_Extensions. That
didn't go very far yet, because this project still is looking for a
project leader.

In general it is good to have a toolkit of forms elements at hand,
that come each with appropriate checks. The idea to stream the view
into the DB and to rebuild it, during the next request is smart,
because with this inter request permanency it comes close to the
behaviour of classical GUIs. I know this technic already since the
last millenium. It isn't so new but good to remember it.

The controller can become very simple without knowing the exact
implementation of the UI tree:

if($View = $this->reconstructView()){
  $View->evaluate();
  if($View->hasErrors()) return $View->render();
}else {

...

}


That is a possible implementation of the CMEV pattern I want to
propose, but not the only one.

Regards

Elmar





































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