Innovative Computer Solutions,
Development & Technical Support

07975 997026 • enquiries[delete-me]@[delete-me]harpanet.com

User Tools

Site Tools


programming:php:zend-framework:index

Zend Framework

Zend Framework Modular Structure Step 3 - Forms

Bootstrap

The new ZF autoloader is already configured to look for forms within module folders, we just need to tell it that we are using a modular structure. This is done in the Bootstrap file for each module.

Zend Framework Modular Structure Step 2 - Layouts

Although it is not created by the zf command line tool, the default location for Zend Framework Layout files is in \wamp\www\PROJECT NAME\application\layouts (ie. \wamp\www\square\application\layouts) which is clearly not within our required Modular structure.

I'd prefer it to be located in \wamp\www\square\application\modules\default\layouts but apparently this isn't how ZF would like it to work.

Zend-Framework Modular Structure Step 1 - MVC

This first stage directs where ZF looks for its Models, Views and Controllers within a Modular structure.

Zend Framework - A Modular Structure Comparison

The ZF default structure bundles everything together in one place, ensuring as little code duplication as possible and making it relatively easy to find what you want, but as your project grows the number of files in each folder becomes unweildly in my view. There are other ways of Choosing Your Zend Framework Application Layout but I prefer the more segmented, logical and neater approach of Modules.

Zend Framework - Choice 1 - ZF Libraries

With the default project structure set up, you have to decide how to manage the ZF Libraries.

Getting Started #2 - Zend Framework - Structure Unzipped

First off, you need a working environment.

I set mine up in WAMP on Windows Vista. There's a great post from alstanto on the ZF Manual website (Zend Framework in WAMP) describing this type of setup, although my particular setup was slightly different in terms of wamp/zend folder locations: I have WAMP installed in c:\wamp and Zend Framework 1.11.7 unzipped into c:\wamp\ZendFramework-1.11.7

Getting Started #1 - Zend Framework - Making it Work

I decided it was about time I got started with Zend Framework (henceforth ZF), and with a bit of haggling managed to purchase the Zend Framework: A Beginner's Guide' book (henceforth ZFBG) - I wanted something I could scribble on while working on screen!

programming/php/zend-framework/index.txt · Last modified: 07/03/2014 09:10 by harpanet