Php

Zend Framework Doctrine Model Autoloader

There have been several tutorials outlining how to autoload Doctrine Models using the Zend_Loader_Autoloader. However, none of these have permitted Zend / PEAR style naming conventions for models. I prefer to use these conventions because, although it makes my model names longer, the “name-spacing” gives a certain degree of organization and order to the application.

Epguides.com Zend Framework API

Lately I have been writing Service API’s for Zext, my Zend Framework library extension. I plan on publishing some of the more useful ones over the next couple of months on my blog. The first of the series is the Epguides.com API.

Building a PHP Publish / Subscribe System

First post in a while. I have been busy working on some large application and finishing up my Computing Science Degree. Now that the piece of paper is safely secured above my fireplace, I’ve been trying to find time to do a new post.

I have been building a large application and one of the requirements is to trigger a certain action when an event happens. For example, trigger the sending of an alert email when a database row is updated. Some programmers may be tempted to simply hard-code this functionality into the model class, however this doesn’t give very strict class encapsulation, and can quickly become un-maintainable.

Per Module Zend_Layout

Sometimes when you are building a web application, you want to use different layouts for different parts of the site. For example, in a content management system, you may want one layout for normal users and another, completely different layout for site administrators.

Cache-Control with Zend Framework

Today I was optimizing a site that uses heavy PHP and Ajax. I wanted to reduce the amount of data that was being sent from the server. To put this in perspective, if there were no cache hits in a page load there would be a total of 755 KB pulled down over 123 requests.