[TYPO3-mvc] Which logic belongs to the controller?

Michael Knoll mimi at kaktusteam.de
Tue Jan 12 22:05:22 CET 2010


Hi Masi,

I have kind of the same question, and perhaps a solution for it. Think 
about a PDF rendering process that envolves - let's say XML generation 
and some transforming. It would be nice, if one could change the view 
for each controller and each action via TS.

This possibility has been implemented in pt_mvc from Fabrizio Branca and 
we really use it a lot. I hope it can be implemented in ExtBase in the 
next version.

@Sebastian K & Jochen: What do you think about this feater? It could be 
a TS parameter that can be set via TS setup or Flexform and it could be 
overwritten automatically if Flexform is set. Should I open up a feature 
request on FORGE for it?

Greetings

Michael




Martin Kutschker schrieb:
> Hi!
> 
> The MVC pattern puts business logic (that is not intrinsic to the models themselves) into the
> controller. Now the controller base class of ExtBase is built to accept parameters from an HTTP request.
> 
> But how about other scenarios? I'm thinking of CLI scripts, SOAP servers etc. The former would need
> a different controller to get the parameters from the command line (or the environment). The latter
> would need to parse the SOAP body (after a specialized dispatcher found the right controller by
> parsing the SOAP header).
> 
> So one part of the tasks is to get the parameters. These are different. The other parts are
> verifying the parameters and making the models do something, so a data can be passed on to the views.
> 
> Which brings up the question of choosing views. All examples can probably be implemented with FLUID,
> But what about those where it is not possible? Can the controller choose the view? Or do I need
> different controllers for each "type" of view?
> 
> Masi


More information about the TYPO3-project-typo3v4mvc mailing list