UML Weekend Crash Course™ - To Parent Directory

UML Weekend Crash Course™ - To Parent Directory UML Weekend Crash Course™ - To Parent Directory

crnarupa.singidunum.ac.rs
from crnarupa.singidunum.ac.rs More from this publisher
01.01.2015 Views

Session 25—Modeling the Static View: The Component Diagram 259 receiving.exe purchaseorder.dll Figure 25-6 Step 2: Adding a library component and drawing the dependency 3. Figure 25-7 adds two more resource components. The product.dll component allows the Receiving application to update the product status to received. The inventory.dll component supports checks on the availability of locations where they can put the new product. It then adds the dependency from the Receiving.exe to the product.dll to show that the Receiving.exe needs access to the product.dll, and the dependency from the Receiving.exe to the inventory.dll to show that the Receiving.exe needs access to the inventory.dll in order to update inventory. receiving.exe purchaseorder.dll product.dll inventory.dll Figure 25-7 Step 3: Adding two more resource components and the dependencies 4. Figure 25-8 adds the client application that manages the user interface. The Receiving application provides the PO (or Purchase Order) interface. Figure 25-8 models the interface using the lollipop notation. The user interface application (ui.exe) accesses the Receiving application using the PO interface. This access is modeled as a dependency from ui.exe to the PO lollipop style interface to illustrate that the ui.exe will not work properly unless it can access the receiving application through the PO interface.

260 Sunday Morning receiving.exe PO ui.exe purchaseorder.dll product.dll inventory.dll Figure 25-8 Step 4: Adding the user interface application and the shared interface Mapping the Logical Design to the Physical Implementation Making components from classes involves choices about how to assemble these classes into cohesive units. The interfaces of the classes in the component make up the interface to the component. Figure 25-9 shows a database table component, orders.tbl, which implements the classes that define an order, namely Order, LineItem, and Product, and their association. orders.tbl OrderProcessing::Order 1..1 1..* OrderProcessing::LineItem 0..1 Figure 25-9 A component is created from classes. In like manner, the main program in an application may implement some or all of the key classes in the logical model. To create the executable in Figure 25-10, you compile the classes together into a single executable. 1..1 Purchasing:Product

260<br />

Sunday Morning<br />

<br />

receiving.exe<br />

PO<br />

<br />

ui.exe<br />

<br />

purchaseorder.dll<br />

<br />

product.dll<br />

<br />

inventory.dll<br />

Figure 25-8<br />

Step 4: Adding the user interface application and the shared interface<br />

Mapping the Logical Design to the Physical Implementation<br />

Making components from classes involves choices about how to assemble these classes into<br />

cohesive units. The interfaces of the classes in the component make up the interface to the<br />

component. Figure 25-9 shows a database table component, orders.tbl, which implements<br />

the classes that define an order, namely Order, LineItem, and Product, and their association.<br />

<br />

<br />

orders.tbl<br />

OrderProcessing::Order<br />

1..1<br />

<br />

<br />

1..*<br />

OrderProcessing::LineItem<br />

0..1<br />

Figure 25-9 A component is created from classes.<br />

In like manner, the main program in an application may implement some or all of the<br />

key classes in the logical model. <strong>To</strong> create the executable in Figure 25-10, you compile the<br />

classes together into a single executable.<br />

1..1<br />

Purchasing:Product

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

Saved successfully!

Ooh no, something went wrong!