07975 997026 enquiries@ harpanet.com
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.
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.
This first stage directs where ZF looks for its Models, Views and Controllers within a Modular structure.
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.
With the default project structure set up, you have to decide how to manage the ZF Libraries.
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
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!