IN THIS CHAPTER, I’ll introduce you to Five-Step UML. We’ll work through the whole process from beginning to end, and along the way, I’ll be introducing all the UML notation that you’ll need to understand the relevant diagrams. I’ll also show you how the whole thing works from the point of view of .NET development. By way of examples, I’ll be using lots of diagrams from the Kennel Management System case study, which was introduced at the end of the last chapter. I’m not going to show you everything in exhaustive detail at this stage, however, because we’ll be examining that case study more slowly throughout Part Two of the book. The aim of this chapter is simply to give you an overview of the whole process, a feel for how it all fits together, and a chance to get started with some modeling yourself. So, I’ll begin this chapter with an overview of Five-Step UML to give you the big picture. Next we’ll focus in on the various steps. With each step, I’ll start by showing you the relevant UML notation that you’ll need, then walk through the process, and then we’ll look at some examples from the KMS. Using a ProcessOOAD and UML form a chicken-and-egg paradox: a good OOAD process requires a good notation; but when you study the notation, the most common question is, “Why would I do that?” where that means drawing a particular diagram to show a particular piece of your model. Often, the answer is, “Because we need it for this stage of the process.” The best way to teach UML effectively is to teach a software development process. And that’s when the groaning begins: Oh, no, not another process! What’s Wrong with Process?Why is it that programmers and process don’t mix well? Here are some of the common perceptions:
Whether these perceptions are true or not—and there’s some element of truth in each of them—they certainly make it harder to teach or learn process. The Answer: Five-Step UMLIn order to learn UML, then, we’ll start with Five-Step UML, a lightweight OOAD process that specifically addresses the common perceptions about process:
Now I don’t want to mislead you: Five-Step UML isn’t a full-featured OOAD process suitable for the development of complex systems. It has none of the management, testing, documentation, and review features that you expect from a complete process. It’s only a learning tool, a skeletal process suitable for learning UML, and not much more. Or Is It . . . ? I’m a fan of processes for complex system development. I think you should encourage your team to adopt more than Five-Step UML. But perhaps your team is particularly averse to process. Perhaps after looking at Five-Step UML, they may see it as the maximum process they’re willing to implement. Is that bad? Not necessarily. According to Scott W. Ambler, “Agile Modeling (AM) is a chaordic, practice-based methodology for effective modeling and documentation of software-based systems.” 1 Ambler’s book describes lightweight modeling practices that might be characterized as “just enough”: just enough modeling and just enough process to get the job done. Five-Step UML is compatible with many of the Core Practices of Agile Modeling:
As Ambler says, “AM is not a prescriptive process. In other words, it doesn’t define detailed procedures for how to create a given type of model; instead it provides advice for how to be effective as a modeler.” Similarly, you might apply Five-Step UML as a modeling strategy inside of a larger process, whether it be a prescriptive process like the Unified Process or an agile process like Extreme Programming or Scrum. 1. Scott W. Ambler, Agile Modeling: Effective Practices for eXtreme Programming and the Unified Process (John Wiley & Sons, 2002) Chapter 2
Five-Step UML is also an example of what I call Model-Driven Development, in which the models become the central artifacts of the process, the central repository of all that is known about the system. In this chapter, I’ll walk you through the complete process of Five-Step UML, but I won’t go into a lot of detail or tie together all the tasks outside of modeling, architecture, design, and coding. Later in the book, in Chapters 6 through 11, we’ll go though each step in more detail and see how you can tie the models to management, testing, and documentation tasks. The Five Steps are as follows:
“But What I Know Doesn’t Fit These Steps . . . ” What happens when you learn something or know something that doesn’t “fit” your current step in Five-Step UML? Suppose your requirements tell you beyond a doubt that you’ll need a Web server, a DB server, and a firewall box? You can’t model that as a set of use cases. In that case, read the first guideline in Chapter 3, Do What Works. These steps and the order they are in form a useful set of guidelines, not a rigid set of rules. You can either read ahead in Five-Step UML to find the right way to handle the information; or you can simply write it down and set it aside, then revisit it until you find a step where you learn how to model the information. Do What Works usually implies “update the model and draw the diagrams that fit what you know.” But right now, you’re just learning UML, so you can’t be expected to know how to model every piece of information. Just write it down and move along. I’ll talk about this idea in more detail in the next chapter, along with a whole bunch of pragmatic guidelines to help you find your way through the modeling maze.
blog comments powered by Disqus |
|
|
|
|
|
|
|