Top Stories
|
How to avoid the model quagmire18 Dec 2007 06:02 Part one: Analysis paralysisOne of the goals behind UML is to help stamp out ambiguity in specifications and designs. This is a good and noble goal, but UML is nobbled by its own nobility. Booch, Rumbaugh and Jacobson, who donned matching aprons and cooked up UML, baked in some pretty subtle constructs to distinguish between even subtler concepts that - in theory - let you produce precise, unambiguous models. As you'd imagine, this has led to some fraught debates over the interpretation of these subtle modeling elements. Last time, I delved into the equally fraught debate on whether program methods should have single or multiple return points, and - as many readers correctly noted - the answer is: "Who cares? Clearer code and getting the job done are much more important." And so it is with UML. All too often I've seen analysts and developers get bogged down in unnecessary details: an ailment generally known as analysis paralysis. This is not to disparage UML itself: it's perfectly fine for the job at hand. But whatever you're using it for, it's a means to an end, not the end goal. What follows are some answers to the more common questions that bog people down, offered in the hope these will save you from some serious hours stapled to a whiteboard in the company meeting room. Q: These use cases seem related - we should connect them. Shall we use <<includes>> or <<extends>> stereotypes?
Q: These domain classes are related - we should join them up. Shall it be an aggregation, composition or association type of pointy line?
Composition is a bit trickier, as the container class is responsible for the contained class's lifecycle. Simplifying things a bit, it'll look something like this:
But if you're looking at a domain model and not the detailed design, it definitely doesn't matter. The type of relationship is only relevant much later on, and by then the one to choose should be obvious. Q: Which direction should the arrows go in on my robustness diagram?
Q: How do I get my diagramming tool to split up the "focus of control" rectangles on my sequence diagram?
That's all fine as far as it goes, but how do you know when a particular nuance is inconsequential and when it's an important item to specify? That's for next time, when I'll describe some handy ways of spotting the subtle, and not-so-subtle, symptoms of analysis paralysis on your project.® Matt Stephens has co-authored Use Case Driven Object Modeling with UML: Theory and Practice, which illustrates how to step nimbly from use cases to code while avoiding the dreaded analysis paralysis. 7 comments posted — Comment period finished Use Good toolsPosted: 09:53 18th December 2007 I'll tell you already ...Posted: 09:55 18th December 2007 I've said it before....Posted: 13:23 18th December 2007 UML class diagrams are almost uselessPosted: 15:56 18th December 2007 It seems to mePosted: 08:13 19th December 2007
Track this type of story as a custom Atom/RSS feed or by email. Related storiesRead, test, don't repeat - how to avoid code complexity (5 May 2008)
|
Breaking Hardware News
San Francisco City Council regained access to its own computer network today after Mayor Gavin Newsom convinced network administrator Terry Childs to give them the passwords.
Newsletter |