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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Archetypes</strong>, <strong>Color</strong>, <strong>and</strong> <strong>the</strong> <strong>Domain</strong>-<strong>Neutral</strong> Component ▼ 25Plug-in <strong>com</strong>ponent connections:each <strong>com</strong>ponent has plug-in points,eliminating needing to know <strong>the</strong> class(es)of objects it might connect to.ProductSaleProductSaleIProductSaleShipmentShipmentIShipmentinterfaceIProductSaledoesDateMeetDueDate0..*ShipmentassessTimelinesswasShippedBeforeDueDateProductSaleassessTimelinessOfIShipmentsdoesDateMeetDueDate0..*interfaceIShipmentassessTimelinessFIGURE 1-23. ▲ Plug-in connectivity.Now consider plug-in connectivity. An object interacts with whateveris plugged into a plug-in point (Figure 1-23).A product sale holds a collection of objects from classes that implement<strong>the</strong> IShipment interface. A shipment holds a collection of objectsfrom classes that implement <strong>the</strong> IProductSale interface. It really does notmatter which classes <strong>the</strong> connecting objects are in, only that <strong>the</strong> interfacemust be implemented.We can ask a product sale to assess <strong>the</strong> timeliness of its shipments;it interacts with its IShipment implementers, whatever is plugged intothat plug-in point (Figure 1-24).And we can ask a shipment if it was shipped before <strong>the</strong> due dates forits corresponding product sales; it interacts with its IProductSale implementers,whatever is plugged into that plug-in point (Figure 1-25).For modeling simplicity, we build models with direct connections.Then we choose where we want flexibility <strong>and</strong> add plug-in connectivity(like deciding where we want sockets on a circuit board; it’s a decision inadding flexibility).1.8 TWELVE COMPOUND COMPONENTSWhat if you had a substantial collection of enterprise-<strong>com</strong>ponent models?Each <strong>com</strong>ponent would establish a fundamental model shape, <strong>the</strong>most <strong>com</strong>mon responsibilities for <strong>the</strong> classes <strong>and</strong> interfaces, <strong>and</strong> <strong>the</strong> pluginpoints for extending capabilities. Each <strong>com</strong>ponent would give yourmodeling team something more than a blank whiteboard for gettingstarted in building a model for your application or family of applications.

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

Saved successfully!

Ooh no, something went wrong!