Writing Effective Use Cases by Alistair Cockburn
This book is almost entirely concerned with technique. As such unless you, personally, are going to be reading or writing Use Cases, then you probably do not want to read this book — it’ll bore the pants off you.
Having said that, if you are directly involved in Use Case work, this is a vital addition to your bookshelf. You’ll gain more from the book if you have written Use Cases previously, but if you haven’t you will still get a lot out of it.
The author first states a number of things I wish I had known when I first started using Use Cases seriously as part of system documentation. First - there are many different kinds of use case, and you need to decide which kind you are writing. Second - you need a template. A lot of the work I do using Use Cases is initially for requirements discovery - it forms part of the requirements documentation but is in the author’s words “casual” as opposed to “full dress”.
The author presents a full-dress template, and boy is it full-dress. I’m going to use a few of these things, but certainly not all of them. The casual version has no structure at all, except for English grammar. Normally the actor and extensions are provided by the modelling tool. Later in the book he goes through the different uses for a Use Case (hah) and shows a few different templates for the different purposes. My normal template is very similar to the one he recommends for Requirements Elicitation, which makes sense. We are a high-communication team, so we don’t need to go into much more detail than that often - we capture detail straight into code.
The modelling tools issue is a difficult one. You can have pretty UML diagrams using the Jacobson notation, but it’s the content of the Use Case that matters, not the graphics. In many ways I think modelling tools distract from Use Cases with their ellipses and stick men. The author clearly prefers text-only tools for producing Use Cases, and I can quite see his point, certainly having used Rational Rose a few years ago, which had horrendous support for Use Cases. That said, I personally find the diagrams to be a useful way of visualising groups of Use Cases and I’ll continue to use (MagicDraw)[http://www.magicdraw.com] (which I think is excellent incidentally).
One of the things the author says that rings very true for me is about Failure Handling. This is so important, I’ve started thinking it’s almost the most important thing in a Use Case. If you don’t consider failures early, you end up considering them far, far too late. Even if you only write a one paragraph use case, have a Failure section, and think about how the case can fail. You will not regret it.
The author describes quite well what the bits of a use case are, and why you might want them. He goes through several different ways of describing them, and this is clearly targeted at people with no experience with Use Cases at all. He presents a whole number of practical tips, far too numerous to go through here, that deal with the practicalities of writing use cases. That makes this a useful reference work too, when stuck with a problem of structuring or expression.
The author introduces some of this own icons that identify various aspects of scope. This is an interesting idea, and does help with the problem that you often end up with the same Use Case written several times for different levels of system scope. I’m not sure if i’d use his icons, to be honest, but I’ll certainly be more explicit about scope, after seeing how well it seems to work for his examples.
One of the great benefits of this book is the plethora of examples, many dealing with corner cases and confusing aspects in Use Cases, and this section is no exception with good examples for different levels of scope and for multi-system designs, with useful tips on how to approach these issues.
This is a really excellent book about a surprisingly difficult subject. The utility of Use Cases is often detracted from because of the difficulty people have in producing them, but using this book should seriously improve the quality of any Use Cases you produce.