Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Codemanship's Code Smell Of The Week - Data Clumps

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
2,524
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jul 15, 2010

When we see fields that always seem to be used together (e.g., passed together as mathod parameters, or used together in methods), this gives a strong indication that these fields really belong in their own class.

Jason Gorman illustrates how to refactor a data clump by extracting a class containing those fields and then moving the behaviour that accesses them into the new class.

Download the source code from http://bit.ly/c6nSIm

For training and coaching in refactoring, TDD and OO design, visit http://www.codemanship.com

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (0)

Sign In or Sign Up now to post a comment!
Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more