This excerpt from Joshua Kerievsky's "Refactoring to Java" shows you an alternate technique for introducing a Null Object, rather than that shown in Martin Fowler's "Refactoring" book.
An excerpt on Null Object from <i>Refactoring to Patterns</i>
This excerpt from Joshua Kerievsky's Refactoring to Java shows you an alternate technique for introducing a Null Object, rather than that shown in Martin Fowler's Refactoring book.
We present this excerpt, "Introduce Null Object," from Refactoring to Patterns , by Joshua Kerievsky, copyright 2004. All rights reserved. This excerpt is posted with permission from Addison-Wesley.
This refactoring is one of several presented in a chapter on protection. Kerievsky points out the differences between the techniques and applicability of his version of the refactoring and the one that appears in Martin Fowler's book Refactoring. He has also kindly agreed to host this month's Bookclub discussion on this book.
We are presenting this excerpt as a 160K PDF download: Introduce Null Object .