Java Reference
In-Depth Information
delivery
address
Address
street 1
street 2
city
state
zip
Payment
Information
payment
information
payment
information
0..1
delivery
address
0..1
0..1
0..1
Coupon
code
validFrom
validTo
PendingOrder
Order
selected
restaurant
Date deliveryTime
Date deliveryTime
line items
selected
restaurant
Restaurant
line items
name
serviceArea:Set < String >
0..1
*
+
PendingOrder
LineItem
opening hours
OrderLineItem
quantity
quantity
*
menu items {Ordered }
TimeRange
+
dayofWeek
openingTime
closingTime
MenuItem
menu item
1
name
description
price
menu item
Figure 3.3 The initial domain model for the Food to Go application, consisting of classes, their
attributes, and associations
So how to do we go about determining the responsibilities and collaborations?
Many topics have been written about OO design that describe a variety of tech-
niques ranging from the more formal, UML -based responsibility driven design
[Wirfs-Brock 2002] to the less formal, code-based test-driven development [Beck
2002]. In this chapter I am going to describe my favorite approach, which consists
of the following steps:
Identify the requests that the application must handle by analyzing the
requirements (use case, or story) or UI design.
1
Determine the interface (types and methods) that the domain model
must expose in order to enable the presentation tier and the business
tier's façades to handle those requests.
2
 
Search WWH ::




Custom Search