Technology and Graphics

Insider

Archives

Use Cases

I’ve just finished reading Writing Effectiv eUse Cases by Cockburn. What a tome for what I think should be a fairly intuative process. A Use Case is simply a process which is fleshed out in step for with some possible alternatives and what to do if exceptions happen.

Of course, that’s a fairly simplistic view but most BA’s will have written their share of Use Cases as part of their job. They are important documents and there can be many encased between the covers of a requirement document.

I think the trick is to keep in mind the target audience. There are now hard rules for writing a use case, probably the only important ones are that they reflect accurately what should happen in the process and they can be understood by the implementation team.

The basic components of a use case are usually the same;

  • Description
  • Actors (The people or tings which are involved)
  • A starting state
  • An ending state
  • A step by step list outlining the normal events
  • Any alternatives are also show as a step by step
  • And what to do if there is an exception which is not covered by the normal or alternative list of events or flow.

Checl my version of the hello world of Use Cases, mailing something;

This is a fairly simple case and you can point out any of a number of deficiencies, and that’s ok, use cases should be iterative.

Here we go;

Description

  • Mail an item from Sydney to Perth

Intial state

  • The item is in Sydney

End state

  • The item is in Perth

Actors

  • The mailboy
  • The deliveryman

Normal Flow

  1. The mailpoy weighs the item.
  2. The item weighs less than or is equal to 200 grams
  3. The mailboy puts a stamp on the item
  4. The mailboy puts the item in the mailbox
  5. The deliverymangets the item
  6. The deliverymanchecks the stamp
  7. The deliveryman flys to Perth
  8. The deliveryman drops the item off

Alternative flow 1

  1. The mailpoy weighs the item.
  2. The items weighgs more than 200 grams
  3. The mailboy puts two stamps on the item
  4. The mailboy puts the item in the mailbox
  5. The deliverymangets the item
  6. The deliverymanchecks the stamp
  7. The deliveryman flys to Perth
  8. The deliveryman drops the item off

We could add more alternative flows here but you get the idea

Exception

  • The deliveryman checks the item and there is no stamp – Return the item

Again, we could add plenty of exceptions here but you get the idea.

The point is that a use case can be simple or complex for the same task. The use case above clearly doesn’t cover every scenario but it does convey te case in a simple easy to understand language. That language may change. The case might be written by a technical BA for a Scrum team and may be geared mor towards making an easy transition to a user story.

E-Shop with OpenCart

HatchNET will launch an e-shop site called mall90. The sites will be easy to set up and preconfigured for Australian users. At a bargain price of $16.50 per month you get emails, a shopping cart, tutorials, a blog and your own domain name. There is no fixed term so you can stay with us for as long as you want and pull out with no obligation at anytime.

Watch this space, the launch is coming at the end of October 2010 and the first month will be on us.

Welcome to HatchNET

HatchNET are a general IT consultancy. We work on an itinerant basis in Sydney or Melbourne for periods as short as 1 day.

  • General BA work requirements documentation and  use cases.
  • Existing technology documentation including systems, databases and networks.
  • Network administration on *NIX systems including email and website administration, DNS, Apache and other *AMP type technologies.
  • Short programming projects in Java, PHP, VB.NET, Powerbuilder, Sybase and MySQL
  • Open source consulting and conversion to open source from proprietary systems.

Contact us via email sales@hatchnet.com.au

Popular Topics