A web developer's blog. PHP, MySQL, CakePHP, Zend Framework, Wordpress, Code Igniter, Django, Python, CSS, Javascript, jQuery, Knockout.js, and other web development topics.

Zend Framework Conventional Directory Structure Download

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.

Pros

  • 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.

Cons

  • 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.
This entry was posted in General and tagged . Bookmark the permalink.

One Response to Zend Framework Conventional Directory Structure Download

  1. Pingback: Zend Framework: Zend_Form Webinar | eKini: Web Developer Blog

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>