Implementing the Observer Pattern with SplObserver and SplSubject
As PHP applications grow into complex object-oriented systems, developers look to create centralized components to execute repetitive tasks. These include logging, emailing, redirects, and more. The Observer pattern is a commonly used design pattern to hook such components into an [...]
Our Wheels Are Rounder
As web developers we are familiar with the DRY (Don’t Repeat Yourself) principle of programming. Cut & paste is the bane of object-oriented programmers, and we will frequently hear the phrase “Don’t reinvent the wheel”. However, I typically find myself [...]
Flexible Data Display with PDO and HTML_Table_Matrix
Have you ever wanted to set up an application that displays tabular data, and wanted to use the same view for each query? While PHP is excellent for writing small-footprint queries, its ability to be embedded in HTML leaves the [...]
Writing a Cross-Domain Proxy in PHP
Today I encountered a problem that many developers will likely face while building a web application with Ajax, so I wanted to share my experience with it. The Problem: You create a web site with the goal of consuming content [...]
PHP and Javascript Combine with PHP.JS
I wanted to write a quick post about a library one of my co-workers stumbled upon this week. It is called php.js and is a compilation of php functions ported to javascript. That sounds pretty convenient!
Working on a Propel Form Builder…
Tonight I started working on a set of classes that will build forms for Propel objects. While Propel already has implementations of PatForms and HTML_QuickForm, they are both not up-to-date in svn. They both also require Creole for gathering metadata, [...]
Quick PHP Debugging with FirePHP
Recently when browsing past issues of php|architect magazine, I came across mention of a Firefox add-on called FirePHP. For those who have not heard of it, FirePHP is both a Firefox add-on and a PHP library used to send messages [...]