[TYPO3-mvc] Backend Dispatcher available!
Bastian Waidelich
bastian at typo3.org
Wed Aug 5 22:27:55 CEST 2009
Xavier Perseguers wrote:
Hi Xavier,
> Would be great to have a look to
> http://forge.typo3.org/issues/show/3995. Code was cleaned-up and a minor
> bug was fixed.
I'll test this in action ASAP. For now only some nitpicking:
Classes/BackendDispatcher.php:
line 79:
$dispatcherParams = t3lib_div::_GP($argumentPrefix);
should be
$dispatcherParams = t3lib_div::_GPmerged($argumentPrefix);
to be in sync with Extbase's future dispatcher ;)
lines 116 - 119, 152 - 154:
I don't get it!?
lines 1 - 170:
true/false => TRUE/FALSE
Classes/MVC/Web/Routing/URIBuilder.php:
line 172:
return t3lib_div::linkThisUrl($typolinkConfiguration['parameter'],
$parameters);
Nice... After 10 years with TYPO3 I still keep discovering new methods
in t3lib_div ;)
But is this really working? linkThisUrl() expects an URL and
$typolinkConfiguration['parameter'] would mostly contain the target PID, no?
And last but not least: The methods are reallly large. That has a few
serious disadvantages:
- The code is less readable and comprehensible
- If you want to use your own implementation by extending the
dispatcher, you have to copy a whole lot of code even though you might
only want to change a minor thing.. And we hate duplicated code ;)
- Its much more difficult to create unit tests
Whenever you separate blocks of code by space and comments that's a good
indication that you might extract the block into it's own protected method.
Don't get me wrong here, I don't want to sound fussy and I think it's
really great, that you're pushing this! Can't wait to use Extbase/Fluid
for backend modules...
Bastian
More information about the TYPO3-project-typo3v4mvc
mailing list