Fog Creek Software
Discussion Board




Object diagram

Can I draw a class diagram with objects in it?

John Brown
Sunday, July 11, 2004

No.

Cubist
Sunday, July 11, 2004

Why does everyone with diagramming questions on this board never specify the methodology they are using to diagram X?  Is it just a given that there is only one Holy Method of drawing a class diagram?

muppet from forums.madebymonkeys.net
Monday, July 12, 2004

You can, but make sure you use a pencil or similar drawing tool.

Wayne
Monday, July 12, 2004

"Is it just a given that there is only one Holy Method of drawing a class diagram?"

Probably not, but I'm willing to bet that on all of them objects are contraindicated.

Now, you might be able to justify classes on an object (er, state) diagram, as providers of static methods, but objects on a class diagram? Even asking the question makes me twitchy.

Philo

Philo
Monday, July 12, 2004

Do you find yourself wanting to include objects on your class diagram?  Under what circumstances?

Ged Byrne
Monday, July 12, 2004

You don't put objects on your *class* diagrams.
But you can put classes on your objects diagrams so that you can show calls to static methods and things belonging to the class only.

Philippe
Monday, July 12, 2004

You  know what? if you wanna draw objects on your class diagrams, go ahead and do it! All these methodologies are just someone's opinion and I think people in general treat them with way too much respect.

Sure there are reasons why doing this is probably going to be a bad idea in most cases, but if you can't see this without trying it then perhaps you should try it and find out? perhaps you'll discover that it is possible and worthwhile after all to diagram consistently with objects aswell. Or perhaps not.

Matt
Monday, July 12, 2004

"Sure there are reasons why doing this is probably going to be a bad idea in most cases..."

Like when it comes time to write the code. I'd be interested in seeing an implementation of doing it.

Tom H
Monday, July 12, 2004

I draw bunnies on object diagrams and kittens on class diagrams.

a2800276
Monday, July 12, 2004

This one I can solve.  Watch my BA in fine art now, kids:
1) take pen.
2) draw a box.
3) write "object" in it (without the quotes).

... and that's why I get paid the "big bucks".

sir_flexalot
Monday, July 12, 2004

What magical standard method of class/object diagramming do you all use that has all these fanciful rules and conventions?  I just pop open Visio and start drawing boxes and circles with arrows between.

muppet from madebymonkeys.net
Monday, July 12, 2004

Surely any type of diagram that helps a person to understand what they're doing better is a good idea?!

Paper and pencil (and eraser) always work well for me ... or a product called Inspiration if I'm feeling more organised (see www.inspiration.com - don't be put off by the fact that it's aimed at schools!). Visio is OK too but can be too structured.

Miranda (UK)
Monday, July 12, 2004

*  Recent Topics

*  Fog Creek Home