Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Is UML Really Necessary? 27

rotifer asks: "A while ago I saw Kent Beck talk at the Java user's group meeting here in Seattle. Someone asked him about UML. He made a derisive noise and sneered that he had come up with a better version called GML, Galactic Modeling Language. He said (and I am paraphrasing here) that GML had three components "Boxes, Arrows and Arrows Pointing to Boxes". I thought this was right on. That seemed to be all the object modeling a person would need, especially when compared to the 808 pages of obtuse documentation that make up UML. But am I missing something here. Do people find UML useful. Or is it just overblown hype? Do you need this fully featured language to design an O-O system? Or are you better off with just boxes and arrows? Also, if you were to teach programming to beginning Java and C++ developers, is it a good idea to start with a course in UML so that new programmers can become familiar with O-O methodology before they start to cut code?"
This discussion has been archived. No new comments can be posted.

Is UML Really Necessary?

Comments Filter:
  • I tend to think of these methodologies as an excuse for sloppy thinking. They tend to force you to solve problems in a particular way which can certainly cramp your style.

    Often tools like Rose also make you concentrate on the wrong things, trying to make a diagram fit onto a single sheet of paper for example. I prefer a pencil and paper (and word processor when I'm done). I also have reservations about how maintainable the design is and how scalable the software (not methodology) is.

    However, a team "thinking" and documenting things in the same way *is* a huge benefit and shouldn't be underestimated. UML is becoming more and more popular (by management mainly) and you'll probably have to learn and use it regardless of whether you like it. May as well get used to it...
  • The article is about UML, not XML.

    If I could draw graphics here, I'd remodel your sentence for you. :-)
  • Umm. You can do UML in Visio.
  • Maybe it would help to add context-sensitive pulldown object type menus to the UML objects in Dia [lysator.liu.se]. Make the objects so only the proper kinds can connect and restrict the selection to relevant types?
  • Boxes, arrows, and arrows-pointing-to-boxes are fine, in that they mean exactly what you mean them to mean. Problems arise when other people think they mean something different. The UML represents the current best-effort of a group of people who thought about the problem of how to describe complex systems with a minimum yet sufficient set of notations. It could work for you and your project - or, if your with a team that all understands your boxes and arrows then stick with it ...
  • State diagrams are occasionally useful - Like most parts of UML you shouldn't feel the need to use use it for all classes. In my last project we had of the order of a hundred business classes, and only six state diagrams. Each state diagram was for a different subclass of our transaction object. Nothing else had an interesting enough lifecycle to warrant one.

  • Somebody gave you hardware prebuild hardware, you lucky bastard we had to make do matches and bits of string and the odd tin can

    And tell that to the kids today and they won't believe you

  • I think enumerating use cases can definately be helpful. Doing an actual use case diagram, you could skip, though.

    Knowing all the actions your system components are expected to support can be useful to get a grasp of your project's scale. I did this before i knew it was called "use cases", so i thought it was cool that there was a name for it (not that i like the name, or anything).
  • Bagh!! I'm not grumpy, I'm angry.

    You are right, however, about only needing to toggle bits on the registers. Back in my day, that's what we used to do. We didn't have these fancy-schmancy mark-up languages and modeling languages. Bagh.

    You don't even need these bloated tools if you just steer clear of OOP programming! Does assembler have an object or a class?

  • I am *forced* to use the UML in my CS class, but unfortunately it was only presented to us in two forms: 1) Class diagrams 2) Finite state automata In my experience, Class diagrams have their uses, but FSA is total bullshit, especially when it is required. It is possible to model the same system with just a loop, a line and two states and about 20 forking nodes. All in all, whatever works for you and your counterparts should be best.
  • My own experience with UML is that class diagrams can be good to illustrate important parts of the system. However it is impractical to use UML rigorously for complete, real-life systems. Also the requirements side of UML (use cases et al) are not really very helpful. I think in many ways javadoc is the best design tool.
  • by Anonymous Coward
    UML has something like 9 different kinds of diagrams (not just boxes and arrows) that each highlight a different aspect of your system. Is it too complex? Probably. Most projets I've been involved in would have only benefitted from a couple kinds of diagrams -- use case, sequence, class diagrams, and possibly activity diagrams. Maybe. I got up to speed with UML with only a few quick-start guides. Not 800+ pages. It's actually pretty easy. Sure, one could suggest using "boxes and arrows", but what do those boxes and arrows *represent*? Inheritence? Implementation? Activation? UML makes clear these "details" for very good reason: The point of such modeling is so everyone understands the system in the same way. Minimize confusion. Another key point of UML is to guide you in thinking about easy to miss, but important aspects of the system early on. Use case diagrams are the prime example of this. "Boxes and arrows" without any reasoning behind them or their use do not help you to achieve this. -JF
  • I'm using Shlaer-Mellor here at work. UML is our reprsentation, and it works great. What makes it work though is we keep the models up to data. In our case this means our tool turns the UML into our header files. So if you want to modify a header file you have to go into the tool and change the model.

    I've never worked with anything else, but others around here have. (booch mostly) They all agree that it didn't work, and the reason is the models got out of date.

    So, UML can work great, but you must make sure that that your models stay up to date. Looking at a graphial chart of a "domain" makes it easy to learn the structure of the program when you are maintaining someone else's program. Make the effort (and it is work that you won't like) to keep your models up and it is great, otherwise it is a waste of time.

    PS, shlaer-Mellor (and our tool) also allows us to go a step further and generate all the code from a 4gl. This works fine for non-time critical stuff, but for the stuff where speed matters don't use it)

  • UML is extremely useful, up to a point. The problem is when programmers become dependent on it. I've worked with programmers that are utterly paralyzed without a full, complete UML-based overview of the project. They're great at UML, but their reliance on it has cost them the ability to think on their feet. It's sad, because UML is supposed to be a tool, not a crutch. But to some programmers, it becomes exactly that.
    ----------
  • You mean I have to learn binary *and* hex?!?
  • I'd recommend the book UML Distilled by Martin Fowler and Kendall Scott. It is a very small book that documents only the most necessary, commonly used parts of UML, rather than the whole thing. I tend to use "fuzzy" UML. I don't worry about the anal-retentive nuances of UML, I just use it to draw some quick & dirty diagrams to figure out what I'm doing.

  • If all you are doing is drawing class diagrams with some inheritance relationships, a few aggregation or association relationships, then yeh, UML is by far overkill. But if you actually have a complex async system, with concurrent events and distributed processing, you'll learn to really appreciate the sequence diagram and the activity diagram.

    Even with class diagrams, if you care about multiplicity and aggregation vs. composition, then you'll appreciate the UML.

    On the other hand, if you are a Cowboy Coder, or if you're as allergic [martinfowler.com] to paper and ink as Kent is, then you'll do fine with napkins and felt-tip pens.

    Far and away the greatest thing about the UML is that it is a widely-used and understood diagramming notation. Your alternate is some weird propriety notation that probably makes no conceptual sense *cough* bliner [varatek.com] *cough* used where it isn't intended, or some strange diagram thrown together in Visio by the graphic-design-impaired system architect with the symbols he thought looked pretty.
  • Having said that, UML is one of the tools in the good O-O programmer's toolbox.
    Absolutely. So is rapid prototyping, which is generally pretty antithetical to the approach taken by most formal OOA/D systems (or formal structured design, etc). They have different uses.
    • If you're building something mission-critical that is well-understood, getting it right the first time is crucial and benefits greatly from detailed design. Building a banking system? UML is a good idea. Bugs lose billions of dollars.
    • If you're doing something researchy or with a poorly defined specification, a few rounds of rapid prototyping can be immensely useful. As a research programmer in user interfaces, I found rapid prototyping to be extremely useful. You don't always know what will work well before hand because much of it is so "squishy" and not amenable to formal analysis.
    Anyone who always uses only one or the other is either handling a narrow category of problems or is making more work for themselves than they need to. Me, I'm lazy.

    It's not a magic bullet that will enable you to solve every problem in a generic fashion that will work all of the time.
    Amen, Brother! So Sayeth Fred Brooks. No particular design tool or methodology or anything is the uniform ideal thing. Sure, it's all Turing-complete, but then a hammer will eventually cut a 2x4 board in half by breaking enough wood. The saw is still a better tool. Model-View-Controller works for some applications, but for others it rots

    Before anyone jumps on me for dissing MVC, try doing a model-view-controller design for intelligent handwriting recognition like on the Newton or Calligrapher. You've got semantic word recognition (my Newt spells better than I do, and I'm a good speller that routinely ignores spell checkers because my writing generally includes more jargon that the checker doesn't know than mistakes), concurrent ink and recognition that removes ink as the words are recognized and replaces it with formatted text. Shoehorn it into MVC and you'll either get one of the MVC components doing all the work or the bandwidth (API size) between the three MVC components is massive, indicating poor encapsulation and suggesting a different approach to the design should be taken (the "spaghetti of callbacks" problem, rampant in most modern UI toolkits).

    At the very least, if one is teaching beginning CS, they should use UML graphs to teach concepts instead of whatever graph notation the professor feels like using.
    By coinky-dink, this is exactly what the CS textbook did that I wrote lo these many years ago. Actually, we used OMT, because it was 1994, and Booch and Rumbaugh were still sparring with each other. I imagine that the students in that class were well-prepared when UML came along - they'd been using a similar notation since they learned to program (this was a first-semester textbook).

  • You don't NEED anything but a hex editor and an instruction set reference card to do anything. ;)

    <voice="grumpy old man">Heh, hex editor! Whatta ya need that for? All you really need is your index finger to toggle the bits into the registers. Next thing you know you be wanting an assembler and a compiler and an IDE. Flim-flam. All that is for the weak.</voice>
    _____________

  • It really hinges on where you want to spend your time, and how to spend it. Do a detailed design, and the development time will be short. Cut your corners on it, and you'll suffer during the development effort. In some projects, though, the complexity of the system would be such that without solid design, you'd be dead without it.
    --
  • I've only used UML a few times, so more experience practitioners may have different experiences, but I'm not a big fan. Firstly there is the ambiguity of UML - not necessarily the ambiguity of the language it's self - but in the way people interpret it. I can't really show a client a use-case diagram and ask them if it's correct, and each developer you show a diagram to seems to have a slightly different interpretation of how the system should function. I know this problem arises with any form of communication but the simplicity of boxes and arrows coupled with the familiarity of written communication would probably result in less ambiguity and confusion. Secondly, the UML tool I've used (Visio Enterprise) was really crap. Here's some of the reasons the people over at Wiki consider UML Harmful [c2.com]
  • I've shortcutted this articled and decided not to posted here.

    Don't forget the generalized nature of UML. I work in Systems Engineering where we see plenty of box-and-arrow drawings. Most of them don't make any sense when you are unsure if they refer to Hardware or software. Do they refer to materials flow, data flow, network traffic, or parameter flow?

    UML provides a standard which is very useful in these types of problems. I've always been a fan of very specific details at the cost of readability. In a complicated system, e.g. a f-18 jet's cockpit, you need to be specific. Lives are at stake.

  • As one of the founders of Extreme Programming(XP)Kent Beck's comments are right in line with his methodology. Keep it simple is one of their mantras. For many of the projects I would consider appropriate for XP, a few boxes and arrows are probably sufficient. For projects beyond the scope of XP (e.g. very complex, multiple organizations collaborating) I think UML is almost required.

    What UML brings to the table is a standard way of documenting complex models and systems. If you sit in a room with 10 people and spend a day drawing a system with boxes and arrows, everyone in that room will understand the diagram. If you send that diagram to another company or organization intending to collaborate on implementation, odds are they won't find it so useful.

    On the other hand, if those same 10 people are solely responsible for implementation and they spend 3 days arguing about correct UML usage, they've just wasted a lot of time.

    Think about the right tool for the job and be wary of anyone who tells you their solution will always be the best solution.

  • by Mr T ( 21709 ) on Thursday April 05, 2001 @10:01AM (#313133) Homepage
    First off, it's probably the best modeling language to date. Far superior to Booch or OMT. It can be complex to master it but within 15 minutes a complete novice can read a UML diagram and get the gest of it.

    Secondly, if you're only doing high level modelng then GML is fine. Napkins are probably good documents for this too, or perhaps the back of an envelope. One of the fundamental assumptions to UML is that there is a group or a team doing the work and so the diagrams are designed to transmit a very large amount of information. A full and complete UML diagram specifies how the code is to be implemented, it's a complete design, member variables and functions are all listed and all you have to do is fill in the blanks. This is a big deal, you can give such a design to any coder and he should be able to implement it.

    This all hinges on the value of design which is a dying art in many ways. Sure you want to get good code fast and you will probably end up rewriting things but there are still times and places for good solid design. I've seen a couple projects when one or two people built a full UML design doc and spent a couple months doing it and then a team of 10 people implemented the code in days. I think we all see ourselves as software designers as much as developers and that's not the most attractive way to work but there is still a time and a place for it.

  • by cmowire ( 254489 ) on Thursday April 05, 2001 @09:08AM (#313134) Homepage
    You don't NEED anything but a hex editor and an instruction set reference card to do anything. ;)

    Having said that, UML is one of the tools in the good O-O programmer's toolbox. I don't use it right now because I haven't had a chance to learn it fully. But based on my perusal of the spec, it's quite useful as a structured method of laying out how a system works. That's also because I prefer to not use a tool until I know what I'm doing with it.

    It's not a magic bullet that will enable you to solve every problem in a generic fashion that will work all of the time.

    At the very least, if one is teaching beginning CS, they should use UML graphs to teach concepts instead of whatever graph notation the professor feels like using. That way, people will be comfortable with UML if they encounter it later on.
  • by His name cannot be s ( 16831 ) on Thursday April 05, 2001 @09:11AM (#313135) Journal
    UML is overblown garbage.

    Now, I've been working with UML for several years now, and I've always found that it is a bit two um, "wordy" ( but with graphics ;) I've been in design sessions where people started getting confused whent there was the wrong type of link drawn on the board, or other such nonsense, and UML isn't quite helping. It's making the art of software development much more complicated that it has to be.
    It really appears that most devlopers tend to obsess about it.
    Years ago, A group of developers I worked with came up with what, at the time we called "modified booch notation". Really it's very similar to GML, but without the boxes.(people would draw the clouds/boxes, an the text wouldn't fit, so we eliminated the boxes and just wrote the text.). With all the bright developers I worked with, this turned out to be great. Everyone was understanding the entire model, very quickly. (no UML->brain thunking... :)

    I would not heistate to say that UML makes new developers afraid, and doesn't assist in the absorbtion of information any faster than GML.

    ... you can deposit my 2cents via paypal.....
  • by Snowfox ( 34467 ) <snowfox@[ ]wfox.net ['sno' in gap]> on Thursday April 05, 2001 @08:33AM (#313136) Homepage

    UML is more than boxes and arrows showing inheritance. Derivation, composition and aggregation are all distinct concepts, and having those immediately visible instantly clarifies a design. UML-based sequence diagrams clarify the structure of a project up front, getting the rationale behind a project's structure in your (and others') heads straight off. Normally it takes a lot more hands-on time with code to really grok a project the way UML helps you to do.

    Seeing relevant data and methods there on the page also helps in rethinking the flow and arrangement of data. And good data arrangement is the most significant bit of optimization a project can have, and even a simple UML editor implementation like you get with dia can help you make positive sweeping changes before you've written a line of code.

    Using UML, we've successfully shortcutted a lot of iterative design, and our prototype code tends to look very similar to our final code.

    ---
    My opinions are mine.

"Protozoa are small, and bacteria are small, but viruses are smaller than the both put together."

Working...