A place to discuss how to transition from Use Cases to Object Model
"Classical Use Case Thinking" has the major domain classes appear as a result of Refactoring use cases.
Another way to think of it: mapping from Use Case to Object Model is more about packages than classes. Functional partitioning comes first, thereafter come class considerations.
Use Case -> Packages <-> Class Interfaces <-> Class Implementations
So then what's the most efficient mechanism to map your intial use cases into packages? Another type of diagram? I've always struggled with going directly from use cases to sequence diagrams, perhaps this is the missing link I've been looking for? -- Rox
Rox... one thing that I do, and I think this came from KevinMcNiesh and also Scott Ambler is to go from Use Case to CRC Cards to Class Diagram to Sequence Diagram. How can you draw the object messages and colaborations from a Use Case? A use case doesn't describe the classes, responsibilities and colaborations?
There is a great white paper from Scott Ambler www.ambysoft.com that describes the UML process, and he adds a few modeling techniques into his sequence that aren't really UML... CRc Cards being one of them. I am also going to get some of his books. I have learned ALOT since I found his site. -- Bob Archer
I've tried this approach with CRc Cards and I'm also familiar with the excellent white paper you mention from Scott Ambler. But here's my beef... I can model my use cases classes into class diagrams, and then wizard them into real classes, much quicker than I can sit and write out CRc Cards that end up scribbled and coffee stained, and eventually get transposed into classes anyway. It feels more productive this way, and I like to call these post-use-case class diagrams my draft classes. Then I try to define my sequence diagrams from these draft classes and enhance/extend them. But it never fails, when I actually start coding I pretty much blow my sequence diagrams out the window and seem to see things in a better/different light. Now I haven't ponied up the bucks for Rational Rose yet, I use Visual Modeler and I'm still hoping to someday have the time to make my own Visio Automation tools for VFP. But my own personal grail is to find a way to develop effective sequence diagrams initially, so that I don't have to spin my wheels so hard when it comes time to make things happen in my VCX's. (sigh) Or maybe I'm just a hopeless code jockey ;) -- Rox
Well, what's not so important is the form that the CRC info takes place on as is the CRC 'session.' This is a time where everyone 'becomes' a class and scenerios are acted out with a 'ball' being the process indicator which is tossed from class (person) to class as collaborations are processed. As you work through these sessions you are generally creating your 'sequence' which you diagram/record and you can see how it works. Will you still not find things to change when you actually implement these designs? Sure you will find changes to be made... just make sure to modify your diagrams to match your implementation. -- Bob Archer
Very good point Bob. So in my case, I use a class diagram instead of an index card as a tool for my CRC Session, and obviously if my preference is to stick with UML techniques then I need to improve the quality of the work produced from my CRC Session. I would be curious as to what other developers do, aside from CRc Cards, to facilitate this phase of design and make the transition from use cases to sequence diagrams. -- Rox
I'm just starting out with UML (Feb. 2001) and I have found that working on two levels helps a lot in the process. Let me clarify: at a high level I deal with the issues that my client is likely to understand and comment about, and at a low level I deal with the technicalities of the system I'm designing.
In terms of the transition from Use Case to actual code, I make use of Activity Diagrams which help my client see the process as I envision it and give me immediate feedback (I have noticed that most people will find it very easy to understand an Activity Diagram, whereas Sequence Diagrams are not as obvious). Then, when I actually sit down to write code I might go straight from my Use Case and Activity Diagrams to code and/or Sequence Diagrams or I might do my own more detailed (i.e. technical) diagrams and start coding and/or creating Sequence Diagrams from there. - Alex Wieder
See Use Cases And Sequence Diagrams
Contributors: Steven Black, Bob Archer, Rox, Alex Wieder
Category Class Design
( Topic last updated: 2005.12.29 12:56:19 PM )