Null Object Refactoring

Here is a nice article on Null Object Refactoring, a process where you create a null representation of an object for use when you want to treat the object as null, rather than passing around a truely null object.

This is one of Fowlers refactoring suggestions from his book: Refactoring: Improving the Design of Existing Code and on his site: http://www.refactoring.com/catalog/introduceNullObject.html

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s