Practices
  Home arrow Practices arrow Page 8 - Five-Step UML: OOAD for Short Attention Spans - Design, Repeat
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? 
PRACTICES

Five-Step UML: OOAD for Short Attention Spans - Design, Repeat
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 9
    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:
      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


    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
     

       

    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 1 Hosted by Hostway
    Stay green...Green IT