With the release of Zend Framework version 1.6.1, comes a new Quickstart guide on the framework.zend.com website. This quickstart builds on all the great quickstart material provided by Aldemar Bernal, Bradley Holt, & Wil Sinclair on the wiki.
Over the past few weeks, myself and Matthew have gone back and forth on building a simple Guestbook application that would demonstrate what we think a 1.6 ZF application should look like if it were to be created from scratch.
As with most applications, most of the the structure this quickstart application we are suggesting is indeed subjective. We anticipate it will cause some discussions over architecture and best practices design, but then again, that is the point after all.
So, what does it highlight?
- Zend_Controller & Zend_View – These elements are brought in from the original quickstart from the wiki. This includes building action controllers, views and also highlights error controller usage.
- Zend_Config & Zend_Registry – Considering you will be building an application that will need to move from development to staging to production, we should have a config file that will support this process. Also, we will demonstrate the usage of an application registry.
- Zend_Layout – Headers? Footers? Navigation? – That is where Zend_Layout shines when it comes to removing the common page elements from your view scripts. View scripts should be concise and only include information and logic about the action controller calling said view script.
- And the biggie: Zend_Db_Table & The Model – In this simple guestbook example, we have built a simple Table Module based model for handling guestbook entries. For data access, this model will utilize Zend_Db_Table to access the guestbook entries table.
The quickstart is located at http://framework.zend.com/docs/quickstart/ and you can download the application (which is about 80% comments for your reading enjoyment), on the first page.
So, go download, read, build the application. Once you get a good handle on this quickstart, we will have a few addendums demonstrating new addons and features to this base quickstart application. Already planned is an addendum where I will walk through building this same model as a Domain Model using Zend’s Db_Table for data access.