Wednesday, January 14, 2009

Use Cases and UML

Over the last month, I have been putting together pieces of an architecture for the implementation of statistical models for space-time analysis. Today, I want to focus more on overall design and discuss the importance of driving design with use cases. There is an excellent article on this at http://www.ddj.com/architect/184414677 . The idea of developing a GUI prototype to drive the Use Case Model into a sequence digram that can be translated into a domain model and class diagram are the necessary artifacts for deliver well-constructed code. Of course, this is UML modeling. IBM's DevelopersWorks has a good article on "Driving Iterative Development with Use Cases" at http://www.ibm.com/developerworks/rational/library/4029.html and discusses their Rational Unified Process (RUP) which uses the use case approach in Inception, Elaboration, Construction and Transition. In Use Case Driven development, my experience is that interviews, meetings with all stakeholders and functionality in legacy systems serve as the building blocks for development of the use case description. The use case, as a collection of scenarios, is then translated to sequence diagrams that incorporates both elements of architecture and design. White Box tests that focus on the realization of a scenario and black box test based on use case
description can then be set aside as test cases. Another good article from a different perspective looks at mistakes with Use Cases is at http://alumno.ucol.mx/victorc/public_html/fime/docs/TopTenUseCaseMistakes.pdf.

As part of the requirements analysis for UML: we have Use Case, Class, Activity, StateChart diagrams, Business modeling with workflow, Object diagrams, packages and model management. For an example of these, a course on Object Oriented Software Engineering at http://www.cs.jhu.edu/~scott/oose/index.shtml provides many of the details for using UML. I like the patent application reference at
http://www.freepatentsonline.com/y2002/0026364.html under design and textual analysis. Furthermore, there is a good example for an ATM System with Use Cases and Diagrams at http://www.math-cs.gordon.edu/local/courses/cs211/ATMExample/.

This is a good example of building an application from start to finish with UML. Another good resource as part of Scott W. Ambler's Agile Modeling site at http://www.agilemodeling.com/style/useCaseDiagram.htm provides links for Use Case Templates, Agile Architectures and Best Practices- http://www.agilemodeling.com/essays/bestPractices.htm. Of course, by peforming this level of abstraction in an iterative fashion many potential pitfalls and problems can both be avoided and solved before a single line of code is written.

No comments: