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

Martin Kutschker masi-no at spam-typo3.org
Tue Jan 12 12:13:44 CET 2010


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