Practices
  Home arrow Practices arrow Finishing the System`s Outlines
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
PRACTICES

Finishing the System`s Outlines
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 1
    2008-05-22


    Table of Contents:
  • Finishing the System`s Outlines
  • Abstracting
  • Not Just a String
  • Constant Avoidance
  • Prototypes Are Worth a Thousand Words

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Finishing the System`s Outlines
    ( Page 1 of 5 )

    This second part of a two-part article completes our coverage of how to talk to a client so that you are both on the same page when designing a system and understanding what it will be required to do. It is excerpted from Prefactoring, written by Ken Pugh (O'Reilly; ISBN: 596008740). Copyright © 2007 O'Reilly Media, Inc. All rights reserved. Used with permission from the publisher. Available from booksellers or direct from O'Reilly Media.

    Clumping

    When Sam described his customers in detail, he mentioned that he needed to keep track of each customer's home address, including street, city, state, and Zip Code, as well as credit card billing address, including street, city, state, and Zip Code.

    I asked him, "Do both of those addresses contain the same information?"

    He replied affirmatively.

    I said, "Then let's just describe the combination as an Address. That way, you don't have to keep mentioning all the parts unless there is something different about them."

    "OK," he answered.

    We clumped the data into a class, as follows:

      class Address
          {
          String line1;
          String line2;
          String city;
          String state;
          String zip;
          }

    At this point, we simply clump the related data, even though we have not assigned any behavior to the class. This data object helps in abstraction and in cutting down parameter lists. Even though the class contains only data at this point, we might be able to assign responsibility to it later on.*

    Clumping and lumping look similar, but they have distinctly different meanings. Clumping involves combining a set of attributes into a single named concept. The attributes should form a cohesive whole. Lumping involves using a single name for two different concepts. Clumping is an abstraction technique, which makes for an efficient description of a set of data. Lumping can hide relevant distinctions between concepts.

    CLUMP DATA SO THAT THERE IS LESS TO THINK ABOUT

    Clumping data cuts down on the number of concepts that have to be kept in mind.



     
     
    >>> More Practices Articles          >>> More By O'Reilly Media
     

       

    PRACTICES ARTICLES

    - More Techniques for Finding Things
    - Finding Things
    - Finishing the System`s Outlines
    - The System in So Many Words
    - Basic Data Types and Calculations
    - What`s the Address? Pointers
    - Design with ArgoUML
    - Pragmatic Guidelines: Diagrams That Work
    - Five-Step UML: OOAD for Short Attention Span...
    - Five-Step UML: OOAD for Short Attention Span...
    - Introducing UML: Object-Oriented Analysis an...
    - Class and Object Diagrams
    - Class Relationships
    - Classes
    - Basic Ideas





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek