I knew there was a reason why I avoided learning UML....

ziggy on 2004-10-07T05:56:37

UML always seemed like a waste of time to me. I have an allergic reaction to the kinds of large, big-budget, mega-staffed, long-term projects where UML fits. And I'll just sidestep the question of which UML are you using. ;-)

That said, I'm in the midst of an interesting project at work. I'm using XOTcl in AOLServer, which pulls the design in a direction that's quite different from what you would find in apache/mod_perl. Basically, a whole mess of code is loaded into an interpreter at startup, and that interpreter is cloned (via memcpy) to provide the necessary state for worker threads to respond to a request. Furthermore, closures are missing, lexical scopes are kinda there/kinda not, and object finalization/destruction doesn't occur automagically at end-of-scope (it all piles up until end-of-thread).

But there are some interesting features that XOTcl offers: mixin classes, and per-object methods (like binding an unbound method to an object in Ruby). And the whole define-the-world-and-clone model feels more like Smalltalk's "live objects" mindset than the "dead code" model used by C/C++/Java/etc. In fact, XOTcl+AOLServer naturally lends itself to thinking about "live objects", where the system constructs a mess of singletons at startup, which send messages back-and-forth to each other to get stuff done. (This is due to the fact that creating temporary objects has a rather nasty side effect, since discarded objects are not automatically freed.)

In an informal design review today, I had to describe this system, which uses many concepts that XOTcl borrows from hither and yon, none of which are found in C++/Java. And my review partner is a C++ programmer from wayback, so this presents a mild handicap.

In a project such as this, there are two classic organizing principles used to structure the codebase: a big pile of functions (like any standard C, Fortran, Tcl, etc. project), or a forest of classes (as projects in C++, Java, C#, etc. tend evolve into). But with XOTcl, there's another model: the smalltalk-style "live object soup".

All of which brings us to a problem. How do you model a mixture of classes, mixins (at the class- and object-level), inheritance relationships, interface specifications, per-object methods and composition-through-delegation using UML? If some form of UML is your primary means of conceptualizing software design, then concepts like these are outside your field of vision.


Tools

KLB on 2004-10-09T00:04:13

The main idea is you believe drawing a diagram or two will help you communicate your ideas.

UML a lot of notations, lot of diagrams etc...

Some UML tools are pretty flexible and complex (we need more free tools thought)

Just use the notation creatively, in what is sometimes called free hand modeling.

It's not like that many ppl learned UML and that you will confuse them by using the notation differently.

Thinking about modeling software systems using diagramic notation can really make you a better programmer I believe

I like how Scott Ambler think of modeling, I can recommend that you read more about what he have to say. Even thought I sometimes feel that he and the clan (Marting Fowler and the likes ...) are very commercial. Modeling is their business, it's how they bring food on the table. So they can over do it at times. But still if you have the time, they can bring interesting discussion and point of views.

Re:Tools

ziggy on 2004-10-18T01:49:37

The main idea is you believe drawing a diagram or two will help you communicate your ideas.
Right. And UML is a codification of a common set of graphic idioms to communicate how to build and use C++/Java systems. It falls down when you use coding techniques outside the capabilities of those languages (like real macros, live objects, mixins, and per-object methods).

It's not that these concepts are impossible to diagram, or difficult to communicate. It's that there is no way to accurately or adequately describe these concepts in UML, just like there is no word in English to describe what taste umami really describes.

So how did it go?

systems on 2005-03-09T13:37:28

I know, it's been a while, but that post of yours really interests me, I dig aolserver, uml and xotcl even more so, I would suggest that you check ORM (object role modeling)

But anyway, how did it do, did you like the work experience with XOTcl or was it a pain, please say as much as you can :)