I have created this ZF Conventional Directory Structure – similar to this . Basically, it is a tar.gz file of the directory structure. Provided that you have all the prerequisites for Zend Framework, it should run right away after you extract the file. It contains the following:
- A bootstrap file
- A sample plugin
- A view helper
- Error stuff-thingy
- Zend_Form example (updated)
- Zend_Layout example (upated)
You can download it here.
It contains the ZF1.5 RC1 release.
- With the exception of user created library code, application related code (as it relates to the domain model, controllers and views) is in one specific location.
- Can take advantage of a library installed globally on a system (like PEAR)
- As opposed to a Classical layout, focus on code containment is at the main directory level, thus creating a wider directory structure at the top most level.
- Application directory in this layout means ‘the code responsible for the direct duties of carrying out application specific actions’.
- Library directory in this layout are librarys of code that carry out a specific and common pattern of duties, usually not related to the specifics of an application, but related to the carrying out of common tasks.
- Tmp, or ‘variable’ directory, exists to aid the application in its duties that may require the use of a filesystem to create tmp files like session files, cache files or view compiles.
- When an available option, this is the suggested format of the Zend Framework.
- Using the most common or most encouraged format aids future developers (that might inherit or use your software) by reducing thier time getting up to speed.
- Wider top level of directories. If your perception of application directory is not limited to the site specific files and includes libraries and system (tmp) files.
- Harder to move top files into an Embedded structure (within the htdocs directory) as each concrete directory must be secured against web readability, and routes by the same name as concrete directories cannot exist (easily).
- Certain applications might require custom (or extended) libraries, in that case, it is important to note that you not distinguish between 3rd Party libraries and user generated libraries. Library code is simply, regardless of source, library code.