Null Object Refactoring
page 1 of 5
Published: 14 May 2007
Abstract
This article will give an overview of the Introduce Null Object refactoring. The Null Object makes it easier to specify a null value in a business system, and this article will show you how.
by Brian Mains
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 32180/ 58

Introduction

Martin Fowler wrote a book called "Refactoring: Improving the Design of Existing Code," and in the book he discusses the "Introduce Null Object" refactoring. Instead of assigning a null value to a reference-type property, a nullable object can be used to represent a null value, instead of directly assigning a null value itself. This makes it easier to reference and you do not have to worry about getting a null exception when using the property. Here is how it works.


View Entire Article

User Comments

Title: good write-up   
Name: HoyaSaxa93
Date: 2007-05-15 3:26:44 PM
Comment:
good examples of factoring / backing into null objects






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2017 ASPAlliance.com  |  Page Processed at 2017-04-23 9:51:21 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search