Re: [fw-general] ZF 2 and project structure

2010-09-01 Thread Benjamin
Hello,

I think that one big advantage of zf actually is to be very flexible with
project structure and we have the liberty to choose a hierarchy that fit at
best with our internal logic and development habits.
Depending on project we don't have the same structure. And i like to be able
to map my own namespaces to some root directories.

IMHO, namespaces are a POO matter but project structure is organisation of
files.For example, if the structure fit exactly the namespaces logic, i will
not be able to do :

app/
domain/
entities/
User.php -- namespace Entity;

And that means the end of the project structure flexibility. That's a
choice, but the good one ? I'm not sure, i don't even know, that's why i
bring this question up :)

From there, the problem is that namespaces as they were introduced in PHP
5.3 can't be considered as packages like many other languages.


br,
Benjamin.


2010/8/30 Ralph Schindler ralph.schind...@zend.com

 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.





Re: [fw-general] ZF 2 and project structure

2010-08-30 Thread Hector Virgen
I believe fixing the controller class names was planned for 2.0, but I
could be wrong.

--
*Hector Virgen*
Sr. Web Developer
Walt Disney Parks and Resorts Online
http://www.virgentech.com



On Mon, Aug 30, 2010 at 9:34 AM, dbenjamin bd.web...@gmail.com 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.


 --
 View this message in context:
 http://zend-framework-community.634137.n4.nabble.com/ZF-2-and-project-structure-tp2400401p2400401.html
 Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] ZF 2 and project structure

2010-08-30 Thread Ralph Schindler

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.




Re: [fw-general] ZF 2 and project structure

2010-08-30 Thread Ralph Schindler

Hi Yue,

There is a milestone release of 2.0.  Should you use it?  I would not 
use it for a real application anytime soon..  1.x is still the tried, 
tested, and truely stable release to use for app development.


The API is and will be over the next few milestones a moving target. 
After it has been finalized we'll be working on migration tools and 
compatibility layers.


More info on it here, including the current codebase as well as dev 
milestones and dev documents linked:


http://devzone.zend.com/article/12385

Cheers,
Ralph

On 8/30/10 11:44 AM, Yue Yuanyuan wrote:

do we have the download version of 2.0 now? When could it be available?
If there are big changes, should I continue using 1.x?
Thank you.

On Mon, Aug 30, 2010 at 12:34 PM, dbenjamin bd.web...@gmail.com
mailto:bd.web...@gmail.com 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.


--
View this message in context:

http://zend-framework-community.634137.n4.nabble.com/ZF-2-and-project-structure-tp2400401p2400401.html
Sent from the Zend Framework mailing list archive at Nabble.com.