13.07.2015 Views

Archetypes, Color, and the Domain-Neutral ... - Petercoad.com

Archetypes, Color, and the Domain-Neutral ... - Petercoad.com

Archetypes, Color, and the Domain-Neutral ... - Petercoad.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

<strong>Archetypes</strong>, <strong>Color</strong>, <strong>and</strong> <strong>the</strong> <strong>Domain</strong>-<strong>Neutral</strong> Component ▼ 231.7 COMPONENT CONNECTIVITYOn printed circuit boards, some <strong>com</strong>ponents directly connect (that is tosay, <strong>the</strong>y are hardwired). O<strong>the</strong>r <strong>com</strong>ponents plug in. Why not make everyelement something you can plug in? Sockets everywhere! Well, <strong>the</strong> reasonis that it’s simply not cost-effective to do so with printed circuit boarddesign.The same is true with software <strong>com</strong>ponents. Some are hardwired,some are plug-in. Although we could have plug-in points everywhere, it’snot cost-effective to do so. So we choose <strong>and</strong> design in plug-in points atthose places where we need—<strong>and</strong> can afford to implement—added flexibility.The rest of this section moves into a deeper level of detail regarding<strong>com</strong>ponent connectivity. If you are new to <strong>the</strong>se <strong>com</strong>ponent concepts,you might wish to skip this for now <strong>and</strong> <strong>com</strong>e back to it at ano<strong>the</strong>r time.Yet for those with inquiring minds that want to know, here are <strong>the</strong> detailsbehind <strong>com</strong>ponent connectivity.A “direct connect” links an object in one <strong>com</strong>ponent with objectsin ano<strong>the</strong>r <strong>com</strong>ponent (Figure 1-20).A product-sale object holds a collection of some number of shipments.And a shipment holds a collection of some number of productsales.We can ask a product sale to assess <strong>the</strong> timeliness of its shipments;it interacts directly with its shipment objects (Figure 1-21).And we can ask a shipment if it was shipped before <strong>the</strong> due dates forits corresponding product sales; it interacts directly with its product-saleobjects (Figure 1-22).Hardwired <strong>com</strong>ponent connections:each <strong>com</strong>ponent direct-connects,specifying <strong>the</strong> classes of objects itconnects to.ProductSaleProductSaleShipmentShipmentProductSale0..* 0..*ShipmentassessTimelinessOfShipmentsdoesDateMeetDueDateassessTimelinesswasShippedBeforeDueDateFIGURE 1-20. ▲ Direct connectivity.

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

Saved successfully!

Ooh no, something went wrong!