Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

(How) do you use UML?

 
Michael Herrmann
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I would be interested in how (often) and for what tasks (of which size) you use UML, and which types of diagrams you use. Do you model absolutely everything before coding it or do you model only the tricky parts?
How often does it occur that you can't stick to your diagrams and what's the reason if this happens? It is clear to me, that using UML when working in a team is quite essential, so all those questions are aimed at programs you do alone(feel free to post your experiences with a team, though).

Many questions by a curious student who is about to learn and apply UML
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use UML very rarely these days. In practice, I manage to communicate most of my stuff using informal sketches and sort of quasi-UML diagrams (remotely looking like UML's class diagrams and collaboration diagrams).

I never put more details on the "boxes" than an occasional method name here or there. That is, I'm not trying to build the software on paper first. I'm using UML sketches as a tool for communicating -- to others and myself -- about the more essential things, whatever those are at the time.
 
Sathya Srinivasan
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree.

I use 'informal' UML diagrams like Lasse mentioned - sketches on the board that give you a good visual idea about the associations. I find this especially helpful when some association just does not feel right or gel with other objects.

One advice I would give to wanna-be users is not to consider UML as the only way or even the right way to represent a model. Insistence of UML for modeling (as opposed to informal diagrams that convey the same information) will result in spending too much time on getting a pretty picture but will make the developer lose focus.

As UML notations are fairly commonplace and the terms in UML (class diagrams, etc.) are now at least recognized by most developers, the notations themselves can be very helpful in communicating ideas to team members.

But care has to be taken not to get carried away. Don't try to model each and every attribute or each and every method. MDA (Model Driven Architecture) still has a long way to go and tools are not that equipped to generate perfect code from UML diagrams. Till then, if a diagram on the napkin works, take a picture and paste in your design document.
 
Daniel Mayer
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Full agreement.

When I use UML, I use it to communicate a specific concept of existing code, or (more seldom) to brainstorm possible rough designs. If I do the latter, I haven't yet once implemented such a design as-is - I always learned something additional about it while coding it and were able to incorporate that earning into the code. I tend to think of this as a good thing.

You might also want to take a look at http://www.agilemodeling.com/
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By the way, my current project (in which I have a sort of managerish role so I don't get to code nearly as much as I'd like to) we have a big whiteboard in the middle of the floor. The whiteboard is two-sided and flips around. The other side of the whiteboard is for tracking tasks (features, defects, that sort of stuff) and the other is for "model storming" sessions. Beyond what happens on the whiteboard, the team has only one formal model -- a domain model maintained with Rational Rose.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ditto to the above.
 
Svend Rost
Ranch Hand
Posts: 904
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The reason that im responding to this post is due to the
fact that you write
Many questions by a curious student who is about to learn and apply UML

If your a student (as in taking a class about OO UML or something similar) then I would recommend you to follow the UML specifications - I'd like to
recommend Martin Fowlers UML Distilled which is very good. You can,
ofcause, also take a look at www.uml.org.

If your a software developer then it doesn't realy matter how you "draw"
your models of the system your building - what's essential is that others
understand what's happening (which is why UML is great, as it gives developers
a common vocabulary).


Apart from that remark, then I'll "simply" concur with what the other respondents write. The diagrams
that I make are often rather informal because what matter is the meaning
and the structure of the system.
When I use UML I normaly make class diagrams and
interaction diagarms (for essential parts of the system). If your working on a big project you might find that mixing UML with pattern labels (called pattern:role annotation as proposed by Gamma) makes the class diagram more readable and informative.

As another side note, I find CRC cards usefull in the design fase.

/Svend Rost
[ September 20, 2004: Message edited by: Svend Rost ]
 
Scott Ambler
author
Ranch Hand
Posts: 608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might find www.agilemodeling.com/essays/umlDiagrams.htm to be of interest as well as www.agilemodeling.com/style/

As far as sketching goes, my observation is that roughly 90% of all modeling is done on a whiteboard. I really wish people would talk about this more and start to hammer on the academics and the book writers who seem to miss this fact. How many modeling books can you point to which include whiteboard sketches in them, for example? Something is seriously wrong in this industry, IMHO.

- Scott
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Scott Ambler:
How many modeling books can you point to which include whiteboard sketches in them, for example?


Well, Robert Martin's "UML for Java Programmers" at least has 7 references to the term "white board" in the index. It also discusses what diagrams to make persistent and which to throw away; as well as some tips on how to make UML more white board friendly (ever tried to write in italics or to draw dashed lines?).
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most of our modeling is just whiteboarded boxes and arrows, but we've had a number of discussions get complex enough that sequence diagrams of some detail were useful. I fire up Rose for those because it's a pretty fair diagram editor and I can play with different ideas quickly. I do quick & dirty diagrams, no attempt to maintain a master model over time.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic