[TYPO3-team-core-v5] Problem with handling of view classes due to naming/placement scheme

Bastian Waidelich bastian at typo3.org
Wed Apr 22 10:38:20 CEST 2009


Karsten Dambekalns wrote:

Karsten Dambekalns wrote:

Hi Karsten,

>  [...]
> class IndexHTML extends \F3\FLOW3\MVC\View\AbstractView {
>  [...]
> Who spots the error?

me me me! the square brackets...


> Two words: "reserved words"

uhm, yeah..
I still don't understand why namespace segments can't use reserved words.


> * either we ban "Default" only for this case and make it 
> "StandardController"

We could also rename it to "Index" as we did with actions..


> * tell people to always use some descriptive name instead and adjust 
> routing

thats a good plan anyways and we should set an example in the core classes.
OTOH, if there's only one controller in a package, it can be hard or 
even counterproductive to find a better name..


> * change the naming scheme for view so the full controller name used in 
> it, so that the above example ends up being "namespace 
> F3\TYPO3CR\Admin\View\DefaultController;"


I don't know.. IMHO it's a bit confusing to have "Controller" in views 
namespace and filepath.


> * do the above for PHP and HTML to keep things consistent.

yes, I definitely opt for a consistent solution!


> Better ideas (hopefully)

not really, sorry..


 > or at least an opinion

At the moment, I'd prefer to rename "default" to "index" - and I just 
found out, they did the same in ZF. Probably for the same reason.

all the best
Bastian


More information about the TYPO3-team-core-v5 mailing list