[TYPO3-mvc] [INFO] How-to do AJAX with Extbase

Bastian Waidelich bastian at typo3.org
Mon Aug 3 14:52:05 CEST 2009


Robert Lemke wrote:

Hi,

> Of course it's a matter of taste and somewhat depends on the situation 
> but I'd prefer "GenreController::indexAction" over 
> "FooController::genresAction".

I agree. My experience (disclaimer: I'm no DDD expert):
When I wrote my first MVC extensions I started creating controllers 
based on their functionality (like listController, detailsController).
The reason was: 1. I did not know it better and 2. lib/div does not 
allow to switch USER/USER_INT per action (my detailsController was USER, 
listController USER_INT)

As a result I ended up with some kind of "main" controller that was 
responsible of too many things (listAction, downloadAction, 
downloadImageAction, ...) growing and growing and finally ending up in a 
little mess ;)

In the meantime I absolutely prefer to have "model based" controllers, 
because:
- separation of concerns is clearer, and you find things much easier
- reusability is better as most of the controllers consist the same main 
actions
- if more controllers share the same functionality, you can still create 
a common base controller

Bastian


More information about the TYPO3-project-typo3v4mvc mailing list