[TYPO3-team-core-v5] Check your pending changes...

Bastian Waidelich bastian at typo3.org
Mon Sep 15 10:36:01 CEST 2008


Reply from Robert via email*:

Hi Bastian,

Am 12.09.2008 um 19:46 schrieb Bastian Waidelich:

 > Karsten Dambekalns wrote:
 >
 >> * Stay clear of class names that are PHP keywords.
 >
 > how bad, that "Default" is one of them...

yes, too bad!

 > The view for "defaultAction" can't be resolved anymore.

I'll fix the name resolution parts of the MVC framework today.

 > Default actions could be renamed to "indexAction" - just a quick
 > thought

Hmm, probably. Unfortunately we'd have have to do the same for the 
controller, so we end up with these conventions (1):

F3::MyPackage::Controller::IndexController->indexAction()
F3::MyPacakge::Controller::PagesController->showAction()

etc.
and

F3::MyPackage::View::Index::IndexHTML.php
F3::MyPackage::View::Pages::ShowHTML.php

Or we change the path conventions for the views, which allows us to keep 
the "DefaultController" at least (2):

F3::MyPackage::Controller::DefaultController->indexAction()
F3::MyPacakge::Controller::PagesController->showAction()

etc.
and

F3::MyPackage::View::DefaultIndexHTML
(F3_MyPackage_View_DefaultIndexHTML.php)
F3::MyPackage::View::DefaultIndexJson
(F3_MyPackage_View_DefaultIndexJson.php)
F3::MyPackage::View::PagesShowHTML

If you ask me, I'd go for (2).
What do you think?

And while we're at it: A rather time-consuming change but probably worth 
it would be to change the naming conventions again so that the exception 
for all uppercase abbreviations is not allowed anymore:

(old)  F3::MyPackage::View::Index::IndexHTML
(new)  F3::MyPackage::View::Index::IndexHtml

(old)  $myTYPO3Page
(new)  $myTypo3Page

(old)  HTMLToJSONConverter
(new)  HtmlToJsonConvert

How about that?
robert


--
* Robert, I still don't know whether my newsreader settings are 
incorrect or yours. I'm using Thunderbird with in default setup..


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