I have an application where all its classes are in folder called ./class.

So, for example, I would have ./class/Device.php to host my class, because:
1) class folder holds my application's classes.  It is good to separate my
classes from everything else
2) name of my class is there to differentiate in case I have more than one
class

In a move towards ZF2, I moved the class elsewhere.  Specifically, here:

./module/DeviceModule/src/DeviceModule/Entity/Device.php

The path seems awfully long.  I want to check if I am doing it right.

My understanding is that:
1) module dir is to store any generic module, so it is 'needed'
2) DeviceModule is the name of *my* module, and it is there to differentiate
from any other modules  I may want to create.  So this is also 'needed'.
3) src is there to separate "source code" from "other module stuff" like
HTML, tests, templates.  
4) DeviceModule is there for namespace, in case I have more than one
namespace in my module.  
5) Entity folder is there to store my "entity" classes
6) The name of my class
7) oh wait, there is no 7

Is there indeed the need for all these sub=folders?



--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Refactoring-towards-ZF2-subfolders-tp4661773.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to