Archive for the ‘OOP’ 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 …

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 …

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 …

no PHP error thrown when private property accessed or modified by subclass

Friday, April 24th, 2009

This is another ‘Gotcha’  moment that i want to share with you.

I don’t often declare a PHP …

Can an interface class extend another interface class in PHP

Tuesday, April 14th, 2009

Yes - it can in PHP version 5.2.
(The example code below is also available …

principles of modular website architecture design

Tuesday, March 31st, 2009

This is a collection of links to articles that may be of interest to those who are …