[TYPO3-50-general] RFC: Short filenames

Nino Martincevic don at zampano.com
Tue Jan 27 17:58:17 CET 2009


Hi Denyer!

>I can't speak in depth about the implications of the naming choices on
>the DDD philosophy as I haven't fully understood it yet. 

My comments had no direct reference to DDD, that's unimportant.

>However the
>point Thomas makes above, about the filename almost identically
>copying the path structure, really resonated with me. The way the
>files are named at the moment would allow them to (almost) survive in
>one directory-less pool of code.
...
>Afterall, if the file Default.php exists in Shop/Classes/Controller/
>does that not imply that it is, well, the default controller for the
>shop class? :) If it isn't, then someone careless put the file in the
>wrong place!

No, it implies that someone told you to use the convention Shop/Classes/Controller/ to store your files into. My incredible cool GroceryShop example would have to live there - and worse propably would force me to rename the class  to something like Fw_Shop_Classes_Controller_GroceryShop, urgh...

>Of course, then you get into the debate of what does that filename
>mean if you view it out of context, EG if you send the file to someone
>or refer to it in documentation... Long filenames remove that

The files are not "out of context", they are the context - a GroceryShop is a class GroceryShop, a file PurchaseOrder is a class for purchasing orders and a ProductIsOutOfStockSpecification is a...., 

In fact your example is the opposite of it.
You are right saying that the path in such naming conventions gives you the context. 
But what I'm saying is: something external (framework, conventions, technology) determines your context, not your domain (model) - or better: not what you really wanted to develop, your client or the problem you try to solve does it. 
Choose another framework or scheme and you have a problem.
Happy renaming!


More information about the TYPO3-project-5_0-general mailing list