Saturday, December 10, 2011

OPTUML: A Slightly Saner UML

Introducing OPTUML. It stands for Owen Paul Thomas's UML. Here, I talk about a difference in OPTUML class diagrams to the whatever other UML standard says is true.

A slightly saner version of UML (1 or 2 - who cares) that rids the developer of the rectangular interface from their class diagrams. That's right, all interfaces now use a circle - they use a larger circle if they list information such as method names. One needn't use a circle that encloses their interface's contents because this is almost impossible to do. One draws their circle large enough to make it clear to the viewer that they are looking at an interface, and reserves philosophical resignation about the dilemma of intersecting lines.

In addition, dashed lines on block-arrows indicating an implements relationship have now been filled in; you know you are implementing an interface when you see a block-arrow that starts at a rectangle and points to a circle instead of a rectangle which, by virtue of the fact that all circles are interfaces and all interfaces are circular in OPTUML, now exclusively means you are extending a class.

A block-arrow that starts at a rectangle and points to a rectangle indicates a class (to which the arrow is pointing) is being extended by the class where the arrow originates. Likewise, a block-arrow that starts at a circle and points to a circle indicates that an interface (to which the arrow is pointing) is being extended by the interface where the arrow originates. Block-arrows originating from circles do not point to rectangles; this is officially naughty.

Abstract and final classes are indicated by an "abstract" or "final" stereotype (in guillemets, which I can't do using greater than and less than signs in HTML, and couldn't be bothered finding the characters in unicode or whatever - curse HTML; curse everything). Abstract classes remain rectangular because they are still classes... in Java at least. I have dismissed multiple inheritance because I am currently programming in Java and find the singular inheritance thing much simpler.

Because interfaces can extend multiple superinterfaces, more than one block-arrow can originate from a circle whereas (because Java says a class cannot extend multiple classes) only one block-arrow can originate from a rectangle. I love OPTUML.

I decree these rules now be adopted by the software development industry at large.
Everything else in OPTUML is sweetness and light, unless I stumble onto something else in UML that gives me the shits!

Make it so.

PS: I don't love Java any more than I am repulsed by multiple inheritance
; these things certainly do not give me a hernia.

PPS: Call me the great revisionist. I think I have stopped now.

No comments:

Post a Comment