Practices
  Home arrow Practices arrow Page 8 - Five-Step UML: OOAD for Short Attentio...
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 
 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

Five-Step UML: OOAD for Short Attention Spans - Design, Repeat
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 7
    2005-08-04

    Table of Contents:
  • Five-Step UML: OOAD for Short Attention Spans - Design, Repeat
  • Step 4: Process in Detail
  • Example
  • Working with User Interfaces
  • Step 5: Repeat
  • Step 5: Process in Detail
  • Creating Activity Diagrams
  • Adding Swimlanes
  • Object Flow States
  • Step 5(a): Process in Detail
  • Step 5(b): And Again?
  • Step 5(c): Repeat (In Reverse)
  • Summary

  • 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

    Five-Step UML: OOAD for Short Attention Spans - Design, Repeat - Adding Swimlanes
    (Page 8 of 13 )

    Adding swimlanes to our Component Activity Diagram for the Get or Add Owner use case (Figure 2-37), we get the Activity Diagram shown in Figure 2-44, where the Owner Info interface is realized in a gateway class, COwnerInfo, which carries out the assigned method.

    Figure 2-44.  Activity Diagram for the Get or Add Owner use case, with swimlanes

    Usually, a gateway class relies upon deeper classes and interfaces to carry out its responsibilities; here, that’s COwnerSet, which does the work of calling into the SQL database.

    Although we could have had COwnerInfo call directly into a SQL database to work with owners, that’s not the wisest implementation. I like to isolate the SQL handling inside wrapper classes, because SQL itself isn’t inherently object-oriented. Mixing SQL’s relational behavior into the design may make matters more confusing.

    Furthermore, I usually have a wrapper class that represents a table or result set, and another class that represents one record in the set. The set class supports lookup, creation, and deletion. The record class supports editing and (perhaps) deleting. Both classes make use of a SQL interface to the database.

    Note how the SQL interface wasn’t previously reflected in our architecture. Depending on our organization rules, this might be a decision that a component team can make on its own, because other teams don’t need to know how the team implements its responsibilities; or it might require the architecture team to add the interface, select a SQL engine, and update the architecture, as shown in Figure 2-45.


    Figure 2-45.  Component Diagram for the Kennel Management System, ninth revision

    Again, the real design process is sloppy and iterative, with a lot of feedback and retracing of steps. Just as architecture influenced requirements, design will influence architecture.


    SQL Code or Stored Procedures?

    Notice the two activities assigned to the SQL interface: Select Owner and Insert Owner. These might correspond to actual SQL Select and Insert and Update statements; or you might make SQL stored procedures to carry out those tasks.

    A stored procedure is a canned set of SQL statements—Select, Insert, Update,

    and a number of other commands—that may be called with parameters and

    that look from outside the database as a single SQL call. (Depending on your

    database engine, a stored procedure may also be compiled and optimized for

    better performance.)

    I prefer to consider these activities as stored procedures (it lets me think of SQL

    more like an interface to a service than like a complex language), but this diagram

    doesn’t actually reflect that. So to make my SQL intentions clearer, I like to use

    two new custom stereotypes for transitions: «SQL» for hard-coded SQL calls,

    and «stored proc» for SQL stored procedure calls. So the diagram in Figure 2-44

    can be revised as shown in Figure 2-46.


    Figure 2-46.  Activity Diagram for the Get or Add Owner use case, with swimlane, second revision

    .............................................................................................

    More Practices Articles
    More By Apress Publishing


     

    Buy this book now. This article is from chapter 2 of UML Applied A .NET Perspective written by Martin L. Shoemaker (Apress, 2004; ISBN: 1590590872). Check it out at your favorite bookstore. 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 5 hosted by Hostway