Sunday, May 28, 2006

Use Cases

What is a use case?

According to Alistair Cockburn, use case captures a contract between stakeholders of a system about its behavior.

Why use cases are important?

Use cases depict all possible interaction of users with the software system. In any project, capturing use cases is a useful step. It helps us to think in direction of end user’s perspective. We tend to capture significant exceptions conditions in requirements stage itself. It helps development team to understand the system from user perspective. Use case also helps project managers to set milestones and come up with estimations.

User interaction might be very small percentage of total requirements, but all the requirements revolves around user interaction. Consider user interaction as a hub of requirement wheel and the spokes are resulting requirements in all direction. If we can capture most of the user interactions then we can assume that we have captured most of all requirements.

Use cases are not perfect. We write use cases based on current understanding of system and domain knowledge. In all software projects teams’ understanding of domain, requirements and technology improves as time passes. It’s a natural process. Some use cases might sound stupid towards the end of the project, but you need to appreciate that those stupid use cases lead you towards right path. We need to strive to make use cases sufficient.

Reference
I would recommend a book called “Writing Effective Use Cases” by Alistair Cockburn. Author discusses various use cases formats and their applicability in different situations.