20.02.2013 Views

Connie's Convenience Store - About Peter Coad

Connie's Convenience Store - About Peter Coad

Connie's Convenience Store - About Peter Coad

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Working Out System-Interaction Dynamics with Scenarios Connie’s <strong>Convenience</strong> <strong>Store</strong> 85<br />

Establish responsibility: “who I know.”<br />

An authorization server knows its authorization system.<br />

But what about an authorization system? Does it need to know who its server is?<br />

Not likely.<br />

An object needs to know another object only when:<br />

– “I know that object so others can ask me and I’ll tell them about it.”<br />

(The need to support basic queries is why most object connections are<br />

constrained in both directions.)<br />

– “I know that object so I can send it messages to do some work on my be<br />

half.”<br />

In this case, ask this question: is the system responsible to answer the question:<br />

“For a specific authorization system, what’s its server?” Not really. There’s just one authorization<br />

server in this model. So don’t include a constraint for authorization system<br />

to server; it just doesn’t need to know.<br />

Establish responsibility: “what I do.”<br />

An authorization system knows how to:<br />

– get authorization (payment type, amount ; authorization code).<br />

Add authorization server and its responsibilities to your object model, specifically<br />

to the system interaction component.<br />

Add all of this to your model (Figure 1–59):<br />

AuthorizationServer<br />

getAuthorization<br />

AuthorizationSystem<br />

getAuthorization<br />

Figure 1–59: Authorization server: “what I know; who I know; what I do.”<br />

WORKING OUT SYSTEM-INTERACTION DYNAMICS WITH SCENARIOS<br />

n<br />

Both check and credit objects need help when told to “authorize.” This is where the SI<br />

objects come into play.

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

Saved successfully!

Ooh no, something went wrong!