[TYPO3-mvc] opposite to initializeAction

Sebastian Kurfürst sebastian at typo3.org
Tue Jun 15 16:51:48 CEST 2010


Hi Patrik,

> another question:
> 
> Is there a action which is called AFTER the main action method and BEFORE
> rendering the view?
Nope, as implicitely, the last line of a controller is:
return $this->view->render();

If your controller returns something, then the view is never called.

However, I'd suggest that you look at the ActionController, especially
at processRequest, and then you'll see if you need to override some of
these methods to implement the desired behavior.

> And is there a method like beforeSave?
Nope, as the saving occurs lazily after the response has already been
sent to the client. What do you need such a method for?

> I worked with CakePHP a lot. This PHP-Framework is simular to FLOW3 because
> it is also based on Ruby. And in CakePHP there were such nice methods.
Ehrm, FLOW3 is *not* at all based on Ruby / Rails ;-) Of course, some of
us know rails as well and some ideas come from them, but I'd say that
Rails and FLOW3 are conceptually quite fundamentally different:
Rails uses ActiveRecord for Persistence, while FLOW3 uses the "Domain
Object" pattern. Additionally, FLOW3/Extbase uses a concept called "Unit
of Work" for updating records in the DB, while there are "save"-methods
on the objects in Rails, for example.
Also, Rails has no support whatsoever for the concepts of Domain-Driven
Design (example: Entities and Value Objects), while Extbase/FLOW3 is
built around them.

Greets, Sebastian
PS: I think Rails is a nice framework as well, it just has considerably
different design goals than Extbase/FLOW3.


More information about the TYPO3-project-typo3v4mvc mailing list