|
|||
|
Hi,
Im currently in the early stages of setting up a zf based site. I want to put out a question about where to store different classes. I have object classes (eg a user class with getters and setters), I have factory classes for instantiating the object classes and I have database classes for accessing the database. What Im wondering is where to save these files? Do they all belong in the models folder, or do just the database classes belong there? I also have a library folder containing the zend framework and my own personal library for the project. Do the object classes and factorys belong in the library folder too? Thanks for the direction ![]() |
|
|||
|
I personally try to reserve the library for code that is generic enough to work for any module. Inside my models directories are mostly classes that extend Zend_Db_Table_Abstract, or my custom version thereof. I think the models directories are also appropriate places to put classes that help facilitate communication between controllers, but still specific to that particular module.
Most of the above assumes you use the traditional modular layout... |
![]() |
| Thread Tools | |
| Display Modes | |
|
|