Java Reference
In-Depth Information
In chapter 11, you will learn about the different ways to implement this use case.
The Send Orders to Restaurant use case
Dick is responsible for implementing the Send Orders to Restaurant use case:
X minutes before the scheduled delivery time, the system either emails or faxes
the order to the restaurant.
The business logic for this use case is fairly simple. Dick determines that he can
implement this use case using a single database transaction, which finds the
orders that need to be sent, sends them to the restaurant, and updates the orders.
He also decides that even though the business logic is simple, it fits with the exist-
ing domain model. Table 2.5 summarizes his decisions.
Table 2.5
Dick's decisions
Strategy
Decision
Rationale
Business logic organization
Domain Model pattern
Even though the business logic is simple, it
fits with the existing domain model.
Database access
JDO
Using the Domain Model pattern.
Concurrency
Optimistic locking
The use case updates orders, which consist
of shared data in a single transaction.
Offline concurrency
None
The use case is a single transaction.
Dick forgets that the Order class needs to use an offline locking pattern.
Chapter 12 looks at the different ways of implementing this use case.
The Acknowledge Order use case
Harry is responsible for implementing the Acknowledge Order use case:
The system displays an order that has been sent to the restaurant. The restau-
rant's order taker accepts or rejects the order. The system displays a confirma-
tion page. The restaurant's order taker confirms that he or she accepts or rejects
the order. The system changes the state of the order to “ ACCEPTED ” or
REJECTED .”
 
 
 
Search WWH ::




Custom Search