Zend Framework BaseApp Overview

Kevin Vaughan

Zend Framework BaseApp Overview

Basic Application Directory Structure


For starters, below is the basic directory structure of BaseApp. More in-depth documentation (including inline documentation) is in the works for the first version.

./application/modules => Modular directory structure
Each module in the modules directory has a main Module class that extends the BaseApp_Module abstract class. If an implementing BaseApp_Module class exists somewhere within your include_path structure (in any subdirectory), you can reference it as a module entry point in the main BaseApp configuration. The constructor can be used to initialize any module specific settings. Each module should have the standard /controllers, /models, /views directory outlined in the Zend Framework documentation.

./cache => Cache folders for autoloader and Smarty
The cache directory (and subdirectories) are for storing cached information. Specifically, class script locations for the magic __autoload function and compiled Smarty templates are stored in these directories. They should be writable by the web server.

./configurations => Configuration folder
Central repository for configurations. The BaseApp.xml configuration file is stored in here, and contains various location, module and log configuration options.

./html => Document Root for web server
Storage for the .htaccess file and the main index.php script, as well as static resources (images, css, javascripts, etc.). Note that this index.php does an extremely basic startup of the BaseApp as the complexity of the typical "bootstrap" is encapsulated by the main BaseApp class.

./library => Application, Zend and other third party libraries
The BaseApp libraries and other libraries such as Smarty are contained in this folder.

./logs => Application log folder
Like ./cache, a directory for storing logs. The initial configuration has the main application log stored in this directory. The directory should be writable by the web server.
Kevin Vaughan
2007-08-11