Practices
  Home arrow Practices arrow Page 7 - Design with ArgoUML
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
IBM Rational Software Development Conference
 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? 
PRACTICES

Design with ArgoUML
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 31
    2005-08-25

    Table of Contents:
  • Design with ArgoUML
  • The Unified Modeling Language
  • Model-Driven Architecture and the UML
  • Design Roadmap
  • The Editing Pane
  • Drawing Diagrams in ArgoUML
  • Object Modeling Using Archetypes and Color in UML
  • Adding Modeling Elements to the Class Diagram
  • Assigning Archetypes and Creating Associations
  • Use Case Modeling
  • Refining Use Cases with Sequence Diagrams

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb 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

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Design with ArgoUML - Object Modeling Using Archetypes and Color in UML
    (Page 7 of 11 )

    An insightful and useful technique that hasn’t received the level of recognition it deserves is the use of color, as proposed by Peter Coad in his book Java Modeling in Color with UML: Enterprise Components and Process (Prentice Hall PTR). The color in UML technique hinges on the notion of an archetype, which is a concept similar to the concept of a stereotype in UML with the difference being in the rigidity of the definition and its effect on the target class. An archetype is a way to tag a class as something that more or less adheres to a certain set of characteristics. (This is a looser definition than inheritance for example.) Coad started using 3M Post-it Notes, which come in four colors, pink, yellow, blue, and green, to label model elements. Coad assigns a color to each one of the archetypes or class categories. The addition of color gives you a sense of spatial layering that enables designers to quickly capture both structure and behavior and helps you to see dynamism in an otherwise static class diagram. Coad defined the following four main archetypes and associated them with four colors:

    • Moment-Interval (pink): The moment-interval archetype represents an activity that can be tracked in time, something that occurs at a moment in time or over an interval of time. Registering for the conference, submitting payment, and browsing sessions are all examples of Moment-Intervals.

       

    • Role (yellow): The role archetype represents the way something participates in a moment-interval, for example, a person can participate in a conference while playing the role of attendee.

       

    • Description (blue): The catalog-entry description archetype represents a value or set of values that can be used to label a set of things. The easiest way to think of the description archetype is to think of information that classifies an entity but that doesn’t define its identity. For example, nationality and immigration status can be considered descriptions for a person while a passport number or green card number will be a part of that person’s identity information.

       

    • Party, place, or thing (green): The party, place, or thing archetype, PPT for short, represents the things that can play a role in the different activities of the system.

       

    The four basic archetypes are interconnected in a way that repeats over and over in models. This pattern in its simplest form entails a PPT playing a role in a moment-interval, which might affect other PPTs. PPT also might have descriptions associated with them. In this pattern physical entities such as PPT never interact directly but instead are participants (as role players) in an activity.

    For example, in the conference attendee example a person (party) is an attendee (role) in the context of a conference (moment-interval). The temporal relationship between the conference and the person is fulfilled by the attended role. This basic pattern is depicted in Figure 2-7.


    NOTE

    In this book the colors for the Coad Archetypes are represented as shades of gray. Visually the power of the technique hinges on the use of color. To see the images in color visithttp://www.ejdoab. com.

    Figure 2-7. Basic relationships between the Coad archetypes

    As you’ll see later in more detail the main formula is to find an activity (moment-interval), find the participants in that activity (roles), and find who or what is playing that role (party, place, or things). You begin by making a list of possible m-i classes that are central to the system in question. Eventually you’ll arrive at a model for which all classes belong to one of the four archetypes. Table 2-4 shows your initial list of m-i candidates. As you can see you started at the highest level and moved toward moments-intervals of finer and finer detail. For example, at the highest level you have the conference as the top m-i class. Conference is an m-i class because it’s something that happens over a period of time and can be tracked for legal and business reasons. You can also see that your four main stakeholders are roles played by either a person or an organization of some kind.


    NOTE

    In their book Java Modeling in Color with UML: Enterprise Components and Process, Coad et al use an archetype called a moment-interval detail, which is also colored pink and labeled with the stereotype mi-detail. Moment-interval details are classes that hold information about a moment-interval class. They are usually associated with a moment-interval via aggregation. In this book we don’t use m-i details for the sake of simplicity.

    Table 2-4. TCMS Candidate Moment-Interval Classes

    Moment-Interval Participants (Roles) Role Player
    Conference Sponsors, Administrator, Person/Organization
     Presenter, Attendee  
    Conference Registration Attendee, Presenter Person
    Conference Track Attendee, Presenter Person
    Schedule Attendee, Presenter Person
    Session Attendee, Presenter Person
    Session Evaluation Attendee Person
    Call for Papers Presenter Person


    The Domain-Neutral Component

    The Domain-Neutral Component The Domain-Neutral Component The Domain-Neutral Component The Domain-Neutral Component The Domain-Neutral Component The Domain-Neutral Component

    A more encompassing set of interconnections between the four basic archetypes is the domain-neutral component (DNC), which is a template built upon the four archetypes based on roles being played by the three different entitylike elements (PPTs): party, place, and thing. This results in a template model with three legs or branches: the party branch, the place branch, and the thing branch. The DNC, as originally introduced by Coad, is shown in Figure 2-8.


    Figure 2-8. The domain-neutral component

    The result is a flexible, semantic-based class diagram template that you can use to build any kind of model. The best part is that it’s remarkably simple to use. You don’t have to fit your model into the DNC, rather, the DNC will guide you to make your model more complete. The trick about using the DNC is an understanding that archetypes are very flexible definitions, and that elements of the DNC template can be dropped out to simplify the model. Basically you start with a very complete model and progressively collapse or drop archetypes as you go along.

    This takes a bit of effort in the beginning because programmers tend to model interactions or temporal relationships between elements as a method in one of the participating elements. The DNC and the four archetypes hinge on the notion of representing these relationships as elements themselves.

    You might be asking yourself where we’re going with all this color stuff. The truth is that it takes a bit of time and a couple of models to begin to grasp the power of the technique. But once it sinks in it will help you produce better, more accurate, and complete models. To an extent it’s a completeness theorem of sorts, especially when it comes to modeling. That’s the main goal of the technique—to make you a better modeler.

    More Practices Articles
    More By Apress Publishing


     

    Buy this book now. This article is taken from chapter two of the book Enterprise Java Development on a Budget, written by Brian Sam-Bodden and Christopher M. Judd (Apress, 2004; ISBN: 1590591259). Check it out at your favorite bookstore today. Buy this book now.

       

    PRACTICES ARTICLES

    - 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
    - Choosing the Right Team
    - Trees
    - Basic Array Searching in C++

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway