[TYPO3-50-general] RFC: Short filenames

Nino Martincevic don at zampano.com
Tue Jan 27 11:16:41 CET 2009


Hi Robert,

my $0.02:

As almost anyone of us I got this question some time ago, too.
But if of your paradigms is to develop with "Intention Revealing 
Interfaces", there is no alternative for using good and meaningful names 
also for classes.

Another question aside: You are using namespaces, why you additionally 
use PEAR-like file naming, technical restrictions?

Robert Lemke wrote:
>   F3_FLOW3_MVC_Controller_ActionController.php -> ActionController.php

Code that reads
\Foo\Bar\Buh\Contact(...)->\Foo\Bar\Boo\Dispatcher(...)
is simply not as intention revealing as
BuhContact()->BooDispatch()->andReturn()

>   Con:
> 
>   - doesn't give the full hint on the contents (DefaultController.php ?)

Thou who calls a class that way: Fire him!
;-)

It's equally criminal as to have a ...Manager, ...Handler, ...Process, 
...Service etc. for class names. Except for generic or infastructural 
ones perhaps, but even then they (should) have a meaningful prefix:
e.g. MyDefaultMVCController or MyAppBlogDefaultController.

>   - name conflicts / confusion when single files are deposited 
> temporarily on the desktop or elsewhere

Coding discipline. Almost never happens with good namings (and IR again).

>   - classes can't be found that easily anymore in Eclipse's resource 
> browser which uses filenames (go to "Navigate" > "Open Resource")

Change your editor.
No joke: if a software impedes me at my design work, I throw it our the 
window and better use a text editor.
And if another developer has to work on my code and don't uses Eclipse 
it is even better he sees what happens in the code, not in the editor.

Cheers,
Nino



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