Thinking in Patterns: Step 3

The details of the design may still take some work. However, I would continue with the design by following Alexander's mandate of designing by context. For example, when I see how I need to implement a SlotFeature class or the V1Imp class, I should remember how the patterns involved are used. In this case, I note that in the Bridge pattern, the methods involving the abstractions are independent of implementation. This means that the Abstraction class (Feature) and all of its derivations (SlotFeature, HoleFeature, and so forth) contain no implementation information. Implementation information is left to the Implementation classes.

This means the Feature derivations will have methods such as getLocation and getLength, while the Implementations will contain a way to access this required information. A V1Imp object, for example, would need to know the ID of the Feature in the V1 system. Since each Feature has a unique ID, this means there will be one Implementation object for each Feature object. The methods in the V1Imp object will use this ID to ask the V1Facade for information about the object.

A comparable solution will exist for the V2 implementations. In this case, the V2Imp objects will contain a reference to the OOGFeature in question.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.36.71