Hi Dan,

Am 06.11.2008 um 11:03 schrieb Dan:

Isn't the ability to do that one of the biggest reasons for having
namespaces? To avoid having to fill your class names with junk.
The examples are namespaced appropriately, they tell the developer that it's a Helper for Arrays in the MyFramework framework. I shouldn't need to suffix the class name with 'Helper' to reconfirm that, just because the PHP engine
doesn't like it.

we also had lots of classes like "F3\MVC\Controller\Interface",
"F3\MVC\Controller\Default" etc. ("default" is also a reserved word unfortunately).
So we had to rename all these classes and interfaces.

After doing that though, I think it's much better this way. IMO a class name should speak for itself even without namespaces, the namespaces should only put into a
certain context:

"DefaultController" is a default controller.

"F3\FooPackage\Controller\DefaultController" is the default controller of the FooPackage, "F3\BarPackage\Controller\DefaultController" is the default controller of the BarPackage etc.

So, even though I was annoyed having to refactor so much code, I am now happy with
the results.

Cheers,
robert

Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to