What do you (especially PHP) guys think about a naming convention for classes in which the class name reflects the path to the file, related to the project directory? e.g:
# /project/Session/Abstract.php
# /project/Session/Database.php
class Session_Database extends Session_Abstract ...
I'm sure you get the idea. I'm also sure some of the pros are obvious.. but what do you think - is it worth it to lengthen class names in order to get pretty nice directory structure which is easy to navigate?
This also allows for a one-liner __autoload( $class ) definition in PHP: str_replace( '_', '/', $class );
I suppose some people will consider such convention to be stupid. I personally like it, but I haven't seen it in use by other people and I am not quite sure if it will work so well in practice.
One of the cons might be that with the removal of include/require calls, all classes are dependent(glued together) on the autoload function, which some might argue, does not comply with their understanding of loose coupling.
The only reference that is known to me so far about such approach is http://softwareengineering.vazexqi.com/files/pattern.html
So, do you have an opinion on this one?