PHP ZendFramework 1.9.2

We have started down the path of developing the What’s On website using the ZendFramework. The main reason for this is to understand the strengths of the framework as opposed to standard PHP development.

The first phase was to take the Quickstart as provided by Zend and set up the environment to allow it to run on the system. We did this on the IBM ‘i’ initially but had so many problems with the set up we decided to move it off to the Linux platform until we had it running then migrate it back to the IBM ‘i’. That’s one of the strengths of the language, we know we can develop it on one platform and migrate it to another with little effort.

Unfortunately the Quickstart is full of challenges which would turn any newcomer off. We had to recompile the PHP product 4 times to get all of the modules installed that the Quickstart depended on. Even after all of this we found errors in the code supplied which confused us at first especially as the error page would never show any error information. Eventually we gave up on the Quickstart, the last error was pointing into the ZendFramework code stating dual sessions were being started! That was the last straw, Zend should at least provide a sample which works on any PHP install. Our advice is to skip the Quickstart and build out your own project you will only frustrate yourself trying to fathom out why its not working.

We also decided to build our own Quickstart, the What’s On website is a community site which provides the general public with events running in the local area. It allows the public to enter event information for free which we list for others to see. We recently redesigned the entire site and are testing and building it out at the moment. This new development gives us the chance to see what the ZendFramework provides as we develop the site side by side. The initial page looks good and after some poking around we now understand how the parts fit together (debug will do that for you) and hope this will enable us to develop the new site using the right techniques. It took us about 2 hours to get the site up and displaying the first page. This included the configuration of the virtualhost and the directory structure required for the MVC framework.

We hope to post some of the findings as we move through the development of the new site, we have already replaced a number of functions we built by Framework classes.. The biggest challenge we had was setting up the CSS to get the image files as we struggled to understand where the path was as the page was built.

Chris…