Interesting you bring this up.

Currently, nothing like this has been decided yet. First we need to get the autoloading strategy in place, then beyond that start working on an MVC (Front Controller, View, Layout, etc) prototype.

Personally, I've started favoring the former of what you suggested:

Application/Controller/Index.php -> Application\Controller\Index

Over the years, I've come to dislike complex mappings and plural names. Plural names don't generally translate well in other languages.. also and the question ultimately becomes if the word is referring to the "collection of things" or the "domain of the things". I've personally favored the latter since it is more explicit, requires no pluralization, and is generally easier to map when mapping is needed.

For example:

  "The user table" vs. "The users table"

  "The Controller directory" vs. "The controllers directory"

It is generally understood that a table is already a collection of rows, and a directory is a collection of files. The name thus referrers to the domain of the collection of things, hence the "user". Also, when users is pluralized, it introduces the question of possessiveness. Singular, IMO, solves all those problems, and keeps a 1-1 conceptual mapping to all of the concepts involved.

I know this could be argued either way, and I am sure people are pretty passionate about the scheme here.

This I'm sure will be discussed more in the near future ;)

My 2c submitted,
-ralph

On 8/30/10 11:34 AM, dbenjamin wrote:

Hello,


I have some question regarding project structure with ZF 2 and the
namespaces.


It seems that with ZF 2 you wish to keep the PEAR conventions where each
part of a namespace corresponds to a node into directory structure. But even
with ZF1, if we look at a default project structure, the ZF autoloader maps
some basic namepaces to directories into the project, so it's not really
PEAR-like, or we should have something like :


Application/

     Controller/

         Index.php<-- class Application_Controller_Index


instead of :


application/

     controllers/

         IndexController.php<-- class IndexController



I was wondering if you planned to keep going that way or planned to propose
a new project structure which fit better with these conventions ?



br,

Benjamin.


Reply via email to