After spending too much time on directory and view script shifting to align an 'older' Zend Framework application to the very useful ViewRenderer Action Helper of the follow-up releases I crafted a single Phing buildfile to stick to the recommended conventions and to have a nearly 'one-button' setup solution for any upcoming projects.
There are already some solutions available ranging from prepacked application skeletons to programmatically creators. Of course this is a rude violation of the DRY principle, but you are welcome to read about the basic features the Phing based solution has to offer for now.
- Phing2.3.0beta1, because of its new and usefull SvnCheckoutTask
- VersionControl_SVN a PEAR package which the SvnCheckoutTask depends on
- Optional GetTask a custom Phing task I blogged about earlier
- Building a default or modular application directory structure
- Generating Controller, Model and View skeletons
- Php linting/validation of generated skeletons
- Customizable Controller, Model and bootstrap templates
- Retrieval of a specific Zend Framework version via svn or get
- Bootstrap file generation
- Modular targets to generate and add Models and Controllers skeletons belated
- Couple Model generation with basic database table creating and seeding
- Zend_Db, Zend_Registry and Zend_Log setup
- Alignment to Zend_Application proposal, when it's moved into core
After having all requirements aboard it only comes down to the following two steps:
- Run the buildfile in the targeted directory
- Set the document root to the applications html directory e.g. by using Apaches VirtualHost capabilities
Although it's tested and I put some thoughts in it, any feedback about detected flaws and additional improvements are highly appreciated.