Writing Use Case extensions

Source: Internet
Author: User

By the time you write your first complete Use Case, you'll realize you're going to have more extensions than use cases. extensions are the primary way that use cases help us uncover the most important, interesting requirements that we might otherwise miss.
So let's talk about how to write a good use case extension. first comes the main success scenarioto understand what an extension is, you must first understand the main success scenario. of all the parts that make up a use case, the main success scenario is
The most central. it describes the interaction between the actor and the system as the actor completes the use case. here's a main success scenario for a use case named create account: system prompts unregistered user for new account information: Full name
Username Password email address unregistered user enters new account information. System validates new account information system sends Account Verification code to unregistered user's email system prompts unregistered user for verification code unregistered
User enters verification code system creates account it's called the main success scenario because it describes what happens when everything goes right. of course, rarely does everything go right, but don't worry about that just yet. incidentally, if there
Is more than one way for a use case to go right, pick the simplest way and make that the main success scenario. we start with the main success scenario because it's the shortest path between zero knowledge and understanding what a use case is about. our readers
Need this base understanding before they can go any further. then come the extensionswe still need to describe how the system shoshould respond when things either do not go right or do go right, but not in the way we described in the main success scenario. we
Call these situations extensions. there are two varieties: exceptions and alternates. exceptions are failure conditions (something went wrong ). alternates are simply a different way for things to go right. we treat them the same, so I'm not sure why I just
Bothered to explain the difference. to create an extension, we need three pieces of information: the condition that caused the extension to happen the steps that will happen when the above condition is true what happens when the steps are complete the extension
Conditionfirst, write the condition. Alistair Cockburn identifies two essential traits for the condition: it must be something that the system can detect and it must be something the system will handle. Why? If we don't limit ourselves to the conditions
System can detect, the possible conditions are endless. and if the system can't detect a condition, we can't do anything about it anyhow. so there's no point in adding it to our requirements. for example, in step 3 of the create account use case, username is
Already in use and email address is already in use are conditions the system can detect. in fact, since we 'd handle both of these conditions in the same way, it will be more effective to collapse them into a single condition: username or email address is already
In use. while conditions like unregistered user mistyped email address or unregistered user enters someone else's email address seem valid at first, it's not something the system can actually detect (How do we know what the user's email address is ?). Now,
If either of these things actually happened, the person who incorrectly received the email might choose to not verify the account in Step 6. that's something we can detect, and it's a condition we 'd want to handle. the extension steps and endingnext, write
The steps that describe what will happen when the condition is true. these are just like any other steps in a use case-they explain the interaction between the actor and the system. for example: 3. a. username or email address is already in use. system Displays
An error message the use case continues at Step 1 finally, you might need to write what happens when the extension is complete. I have done this in step 2, above. after the extension, the use case might end, it might pick up right where it left off, or it
Might continue at another step. if what's going to happen is obvious, you might choose not to explicitly say so-in the name of simplicity and breeven. as I said earlier, you'll quickly find that extensions will outnumber use cases. to find them, consider
Each step of a use case and brainstorm for the things that cocould go wrong or vary. throw out the conditions you can't detect or handle; Combine the conditions that will be handled identically. then describe how your system shoshould handle them. you're now prepared
To uncover and handle requirements you might have otherwise missed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.