Page 1 of 1

Design directory file name of module

Posted: Sat Jun 25, 2011 2:52 am
by coolesting
Hi, everyone.
Recently, i design a lightweight framework that involves the directory structure of module,
i have two schemes, i don't know which is the best, anybody could give me some advise,
thanks guys.

First approach , as the following ,

acl
++module.install
++module.view
++module.admin
user
++module.install
++module.view
....
post
++module.install
++module.view
....


and second approach,
acl
++acl.install
++acl.view
++acl.admin
user
++user.install
++user.view
....
post
++post.install
....

Personally, i think the first one has advantage when including file , like this
"include_once 'module_name/module.view'; ", it is not necessary to consider more situation,
such as we don't worry about the path in file included when changing the module name.
but the second approach maybe has more readable to the developer.

Re: Design directory file name of module

Posted: Sat Jun 25, 2011 2:52 pm
by Christopher
Neither in my opinion. I would prefer just "include_once 'module_name/view'; " where the class inside the file uses PEAR naming conventions.