[TYPO3-ect] Controller for Typo3
Elmar Hinz
elmar.DOT.hinz at team.MINUS.red.DOT.net
Wed Mar 22 21:49:32 CET 2006
>> In my pi1-class I read out the option of the flexform. With a simple
>> switch-statement I get the corresponding process-class and call a
>> general function in this class. The process-class knows, which
>> domain-classes and which application-class it needs for further
>> processing and returns the output of the application-class back to
>> the pi1-class, which simple return it.
>
>
Did you ever need to extend a switch-case by inheritence? I had this
situation last year. I needed to extend it two times. Each time with a
new extension, because the customer wanted new features.
To extend a switch construct means to copy it all and extend it then.
2 times. Then I needed to change something on the original switch. I
had to repeat this in every copy. If I would only have altered it in
the youngest extension the older would break in the moment I remove
the younger for any reason.
With Michaels kind of a controller you can add new actions as often as
you like. But Inheritence is still unflexibel for a controller. If the
main controller is only a dispatching class to subcontrollers, you
gain the ultimate flexibility.
Regards
Elmar
More information about the TYPO3-team-extension-coordination
mailing list