01.01.2015 Views

UML Weekend Crash Course™ - To Parent Directory

UML Weekend Crash Course™ - To Parent Directory

UML Weekend Crash Course™ - To Parent Directory

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

72<br />

Saturday Morning<br />

You reply that you want to withdraw from your primary checking account.<br />

The system then asks you how much you want to withdraw.<br />

You say that you want $47.<br />

The system gives you a nasty error message saying it can’t handle that number<br />

(because it’s not a multiple of 20) and you need to try again.<br />

Then you say you want $4,700.<br />

The system again complains that you can’t take that much money out in a 48-hour<br />

period.<br />

“Okay, okay! Give me $100,” you tell the system.<br />

Now the system is happy and it gives you the money and a receipt.<br />

When goals remain separate from implementation, you can evolve systems whose interface<br />

designs remain stable while their implementations take advantage of ever-improving user<br />

interface technologies. This conversation could just as easily have happened with any manufacturer’s<br />

ATM even if it held different cash denominations (10’s versus 20’s), connected<br />

directly to a bank, or connected via a nationwide network. Also, you begin to see that some<br />

of the steps don’t necessarily have to happen in the sequence presented here. The goal of the<br />

dialog is to uncover just what really needs to happen and what variations could be valid.<br />

Even ATM interface designs vary. Have you ever seen an ATM designed for blind people<br />

It performs the exact same conversation but with a different user interface. My home banking<br />

software accomplishes essentially the same function, too, but with still a different<br />

design for the interface. The system asks all the questions at once and I provide all the<br />

answers at once. Same design, different interface.<br />

Use Case termination<br />

Although there is usually only one triggering event to start a Use Case, there are often<br />

many ways to end one. You can pretty much count on some kind of normal termination<br />

where everything goes as planned and you get the result you anticipated. But things do go<br />

wrong. This could mean shutting down the Use Case with an error message, rolling back a<br />

transaction, or simply canceling. Each termination mechanism has to be addressed in the<br />

dialog.<br />

The list of termination options is a bit redundant with the dialog, but just as was the<br />

case with pre-conditions, this redundancy provides some good checks and balances.<br />

Post-conditions<br />

Post-conditions describe a state of the system that must be true when the Use Case ends. You<br />

may never know what comes after the Use Case terminates, so you must guarantee that the<br />

system is in a stable state when it does end. In fact, some people use the term guarantee for<br />

just this reason. You guarantee certain things to be true when this Use Case completes its<br />

job. You might, for instance, guarantee to give the user a receipt at the end of the transaction,<br />

whether it succeeded or failed. You might promise to notify the user of the result<br />

of an attempted save to the database.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!