[TYPO3-ect] MVC Project: CMEV introduction

Elmar Hinz elmar.DOT.hinz at team.MINUS.red.DOT.net
Tue Mar 7 05:24:03 CET 2006


Christian Welzel schrieb:
> 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.
> 

Hello Christian,

first let me thank you for hinting to the specification. TYPO3 has to
done to much invention of it's own and to less learned from others in
the past. We should start to look around.

JSF Request Processing Lifecycle is a good description and
visualization of the lifecycle every webprogrammer is familiar with.
It gives names to the stations of the lifecycle, so that communiction
can be based on this. It also discribes the 2 sources of errors during
the server side lifecycle and how they are handled to one response.

I don't agree with the model of the 2 phases Faces Request and Faces
Response. 2 phases are ok so far but I would place the Update Model
Values into the first phase. I do think of a Store Phase and a Load
Phase. Only if the Store Phase was sucessfull a new Load Phase can be
started. If the Store Phase fails the same form is displayed again.

If the new Load Phase is started by a redirect or as response to the
same request isn't so important for this. The advantage of a redirect
seems to be the prevention of an accidental reload.


Java Server Faces:                         Ect Phases Proposal:

-----------------------                    -----------------------
Faces Request:                              Store Phase:
-----------------------                    -----------------------

Restore View                                Get piVars

Apply Request Values                        Switch Action

Process Validations                         Process Validations

-----------------------
Faces Response:                            void
-----------------------

Update Model Values                        Update Model Values


                                           Redirection (new action)

                                           -----------------------
void                                        Load Phase:
                                           -----------------------

                                           Get piVars

                                           Switch Action

Invoke Application                         Invoke Application

Render Response                            Render Response






Regards

Elmar
























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