[TYPO3-mvc] Thoughts regarding Extbase-Backend-Module

Bastian Waidelich bastian at typo3.org
Fri Jun 19 10:20:52 CEST 2009


Christian Müller (Kitsunet) wrote:

Hi Christian,

> I do not get it. What is one controller for both targets good for?

Less duplication.

A controller could be anything, but I think it's a good practice to have 
"model based controllers", that is BlogController, PostController 
instead of ListController, SingleViewController etc.
If you need to list posts in the BE and you already have a Controller 
that handles Posts (and might provide some custom post helper functions) 
- wouldn't it be good to reuse it in the backend?
You might even reuse the same actions (depending on the context, you 
would only fetch/store the entities that the current user is allowed to 
see/edit of course).
Even templates could be reused in some cases I guess.

Obviously it depends on the actual requirement and you don't break a law 
if you create specialized controllers for the BE - and probably there 
are situations where it's the only proper way to do so. But apart from 
that I agree to Jochen: recycling where possible.

BTW: If I'm right currently only the translate view helper needs a 
rework in order to work in the BE too.
Additionally following view helpers need to be tweaked as they depend on 
$GLOBALS['TSFE'] atm: image, cObject, uri.mail, link.mail, html, crop & 
form.

All the best
Bastian


More information about the TYPO3-project-typo3v4mvc mailing list