[Solar-talk] Toward a Standard Project Structure
Jeff Moore
jeff at mashery.com
Fri Feb 29 15:08:40 CST 2008
Hi,
I just wanted to point out that the current autoloading mapping might
need to be reconsidered in light of namespaces.
Does the Solar class belong inside a Solar namespace? If so, the file
(Solar.php) would most likely go inside the Solar directory and
Solar::start() becomes Solar::Solar::start();
Consider Solar_View. With namespaces, will this become Solar::View?
Now Consider Solar_View_Helper. Is this:
Solar_View::Helper or Solar::View_Helper?
If Solar_View_Helper should be Solar_View::Helper, then Solar_View
should be Solar_View::View.
I'm calling things like Solar::Solar and Solar_View::View the
"Namespace stutter," which ironically makes names longer when they use
namespaces. Perhaps not what the people who thought namespaces would
deliver them from the lengthy class names of the PEAR convention had
in mind? Still, I think its the right thing to do, that the "main"
class should be inside the namespace.
Now whether Solar would be distributed as one namespace or many
(Solar_View::, Solar_Controller::, etc), I don't know.
Maybe for BC namespaces will be shunned entirely?
Just some thoughts,
Jeff
On Feb 29, 2008, at 6:49 AM, Paul M Jones wrote:
> Solar.php # ln -s ../source/solar/Solar.php
> Solar/ # ln -s ../source/solar/Solar
More information about the Solar-talk
mailing list