Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

ziggy (25)

ziggy
  (email not shown publicly)
AOL IM: ziggyatpanix (Add Buddy, Send Message)

Journal of ziggy (25)

Thursday October 07, 2004
12:56 AM

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

[ #21229 ]
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.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • by KLB
    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
    • 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 adequate

  • 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 :)