Aug
20
2009

A Modular Directory Structure Quickstart: Create Directory Structure

The following tutorial will consist of creating the following conventional modular directory sturcture and bootstrapping it via Zend_Application 1.8.x.It is broken up over four chapters.

This tutorial assumes one or more of the following:

  • You are familiar with PHP
  • You know Object Oriented Programming.
  • You can setup Apache (mod_rewrite), Virtual Hosts
  • You are familiar with a previous version of Zend Framework
  • You understand how the typical non-Zend_Application bootstrapping works
  • You are familiar with the conventional modular directory structure as per the ZF Documentationas per the ZF Documentation
  • You are having trouble bootstrapping your modular directory structure with Zend_Application
  • You are trying to start a new application using Zend Framework’s Zend_Application component with a modular directory structure
  • You are having trouble setting up Zend_Application’s out-of-box Resource Plugins
  • You are not using Zend_Tool (bin/zf.sh, bin/zf.bat, bin/zf.php)

(Zend_Tool currently does not fully support modules or modular directory structure, even though it is capable of creating modules, any views, actions or controllers created via Zend_Tool will not be created in the modules, but in application/controllers, views, etc. I would not use Zend_Tool anytime soon.)

If some of the above are true, the please keep reading.

I like to have a certain order of operation.  You can incorporate this into your existing application as well, that is when we discuss the .ini configuration directives.

  • Create application Bootstrap
  • Create module Bootstraps
  • Create controllers, actions, layouts, and view scripts.
  • Create config.ini file to setup the following resources:
    • Bootstrap Resource
    • Database Resource
    • Frontcontroller Resouce
    • Layout Resource
    • View Resource
    • Session Resource
    • Autoloader Resource
 bootstrap()
             ->run();
Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Twitter

About the Author:

1 Comment + Add Comment

  • Hey. Good article. thx for that. Check out the website I found on how to make money with facebook.

Leave a comment

Sponsors