Alan Cameron Wills - UML for Agile development

I work on Visual Studio, which has extensible tools for modeling in UML. Before joining Microsoft I was a consultant in UML. So I'm interested in hearing from and talking to people who use UML.

  • Understanding the customers

    UML is great for clarifying requirements. It really helps to clarify your ideas and iron out inconsistencies what your users are asking for. The most effective way of doing that of course is to write the software, put it in front of your customer, and say "Is that what you meant?" Often the biggest problem is to get your various stakeholders to agree what they want. (Skills in diplomacy are required here, which not all developers major in.)

    That's why it's best to arrange your project so that you deliver something visible at regular intervals, preferably starting with the aspects that are the least clear. At the heart of the agile approach is talking to your customers and getting regular feedback on what you're doing for them.

    Often, though, even the most extreme programmer can take a while to come up with a spike that can show enough to your customers to flush out the most important potential misunderstandings.

    Models help with that - you can spend an afternoon modeling and sketching and come up with a heap of interesting questions and answers. So I tend to think of models as the earliest spike. I like to do it at the start of each iteration, when we're discussing what we're going to do in the next iteration with the customer or business stakeholders.

    Activity diagrams and state charts are often useful - they focus discussion on what people do, what happens next, what the different possibilities are at each juncture.

    But I've always found class diagrams the most useful. They depict the fundamental concepts and relationships in the business - really, the vocabulary used to describe everything else. Most software development starts with getting a clear understanding of the domain - the world in which the program works - and it's in the customers' heads where you find it.

    Take the example of a mobile phone company I was involved with in my previous life as a consultant. They were building some new applications to manage the process of installing new base stations, but the developers were having some difficulty getting the people in the operations and engineering divisions to agree the requirements. Right at the bottom of this disagreement, when we'd finally peeled back all the layers, was a difference in terminology. To about half the company, "base station" meant the radio mast and the box of kit wired up to it. To the other half, it meant a radio antenna and the transceiver that drives it. Now, you can have several of the latter in each of the former, and that's where the problem was. Once we'd drawn the following diagram, we could discuss different words to put in the boxes:

    Base Stations

     

  • Writing about UML - my favorite pastime!

    In the days long ago before I joined Microsoft, I was an itinerant consultant in UML.

    I'd wander the countryside with a slide deck, a projector and a cooking pot on my back, gathering small crowds under the shade of a tree to tell them the Good News: about how they could better understand and communicate about their software designs by drawing boxes, lines and stick people on their cave walls; and about how they would, if they did this properly, surely achieve their goals and feed their families. Well - they'd improve the chances a bit, anyway. I asked only a mug of tea and a biscuit in return. (And my standard fee, of course.) It was an ascetic life but a rewarding one, particularly when some youngster would show especial enthusiasm and I would introduce them, by the flickering light of my camp PC, to the arcane beauty of the Object Constraint Language and its virtues in the successful construction of tests; or the subtleties of covalent and contravalent composition among collaborations, and their uses in describing and applying design patterns.

    But there were sorrows too. And the most poignant of these came whenever my followers gathered about me would ask, as they inevitably would, "OK chief, this UML stuff is cool. But what about tools?" And I would have to shake my head with a heavy sigh and reply that alas, there were apps that would help you draw the diagrams, but few that really delivered the goods in terms of what you'd want to do with the drawings once you'd drawn them. And that in consequence, they might as well stick to drawing on the cave walls. (Note: if you wish to do this, please make sure your walls are made of glass, and use dry-wipe pens.)

    And one or two of them, perhaps those who had traveled beyond the bounds of their own village, would sometimes say "Yeah, but we heard you can get these tools where you can reverse engineer your code into diagrams, and then edit the diagrams and transform the diagrams back into code." And I would agree that these tools are indeed of value in showing you the complex interactions between the objects, and to help you visualize the links and dependencies between the classes. But after all, they only give you pictures of what is there in the program text. These tools have no power to abstract the higher design of your code, the grand vision that was in your mind when you wrote it (always assuming you had a grand vision, of course...); they cannot know what you meant when you wrote the code. That meaning has to come from you.

    This is the real strength of UML, properly used: to help you think about and discuss and communicate the crucial aspects of your design in just a handful of skillfully-chosen lines. A bit like a cartoonist drawing the key features of a politician; and not like a camera slavishly recording pixels. Good UML tools don't just do the reverse engineering - they also help you express your big ideas, help you look at them from different angles, and help you turn them into plans, designs, and tests.

    So I'm delighted, now that I'm working for a toolsmith, to be working on modeling tools. And yes, some of the tools are about reverse engineering from code - and they do in fact help you abstract the overall structure. But they are also about using UML to understand your users' needs better, and to help you meet those needs successfully.

    My role is to write the user guides - not just at the mechanical level of what button to push, but also about how to make good use of UML in your project. So in this blog, I'm going to talk about that - and, I hope, hear from you how you use UML - and what you want from our tools.

     

    BTW, I wrote a blog about domain specific languages a few years back.


© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker