My tutorial of utilizing Zend Framework without MVC will be a jQuery rating controller, with ZF used to query the database, spit out the view (the actual stars), and handle rating changes thru Ajax, updating the DB. Though I prefer not to use ZF as an application, I tried to program as close to the MVC structure as possible. If you’re using ZF already, you will see that my way of utilizing it is close to a ZF plugin resource – with some minor changes, you’ll be able to adapt it into the framework in no time at all.
Installing Zend Framework
On your server, add some directories to accomodate ZF, jQuery, and your own PHP files. Assuming that you start from scratch, you need to point your webserver to the „public“ directory, instead of „document root“. This way, one can’t access your lib files, e.g. configs, by URL.
> document root > library > Mylib > Zend > public > images > includes > js > jquery
Anyway, the part missing for our little tutorial is the Star Rating plugin for jQuery. Get it at http://zensoftware.org/archives/483, and put it in your „js“ folder, into a „rating“ subdirectory.
Next up: Bootstrapping ZF