Archive for the ‘PHP’ Category

A PHP secret to understanding Data Mapper Pattern in Fowler’s Patterns of Enterprise Application Architecture (PoEAA)

Tuesday, February 9th, 2010

Here’s a snippet of a Java code example in Fowler’s esteemed  book, Patterns of Enterprise Application Architecture …

How to Unit-Test for Expected Exception Thrown in Simpletest - *The* Answer

Saturday, January 16th, 2010

I keep forgetting how to assert that an Exception is going to be thrown in Simpletest version …

Creating a PHP Subclassed Singleton to Apply Fowler’s “Introduce Null Object” Refactoring

Saturday, January 16th, 2010

I found a need to implement the “Introduce Null Object“ refactoring procedure that is …

PHP - Getting __sleep to return all properties of an object

Monday, January 11th, 2010

If you write a custom __sleep() magic method for a PHP class, you are expected …

Checking if an object has been serialized in PHP

Monday, January 11th, 2010

I had a class that relied upon an object’s spl_object_hash() which the PHP documentation states …

call for new programming language written with refactoring tools in mind

Sunday, December 20th, 2009

i have just read Fowler’s Refactoring book and went looking for a php refactoring tool. Its …

Picking Aggregate Roots - Domain Driven Design

Saturday, October 17th, 2009

I’m steadily thinking more and more in terms of Domain Driven Design.

I had often found …

How to Access Custom Config Settings Within Bootstrap - Zend Framework Application

Tuesday, September 15th, 2009

Ok - so you have a Zend Framework ini file that contains the line:

mycustom.setting ="bar"

…and you want …

Keeping Admin and Public Areas Separate Zend Framework - MVC - ACL versus .htaccess

Friday, May 22nd, 2009

This post started life as a question to Federico regarding his blog post (re-posted …

Where to start? - Beginner Level to Expert PHP Website Developer

Friday, May 15th, 2009

This is a message to my previous self (like how Rimmer went back to tell …