View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Sp02 Final Exam Review: Design Patterns

I did not know the answer to this one. Since I did not want to leave this unanswered I found this response to the same question and so I am posting this.
Jai Kejriwal

They are similar in that they both provide the Factory Method. You abstractly provide some interface for creating an object, but the actual semantics you leave to the subclasses to implement. Both Design patterns provide a great way of hiding the gory details of actual implementation. It allows you to focus on the solution, rather than the details of implementation.

They are different in that the Abstract Factory provides one more level of abstraction. With the Factory Method, you leave it to the ConcreteCreator subclasses to give the ConcreteProduct that was needed. But, with Abstract Factory method, you are asking for the Factory itself.

Factory Method: the factory method returns the ConcreteProduct needed
Abstract Factory Method: the abstract factory method returns the factory needed that
returns the ConcreteProduct needed

Bridge vs. Adapter Differences:

Adapter provides an implementation abstraction over and existing legacy system to provide functions that would otherwise be too difficult to add to the existing sytem, or impossible due to lack of source code, documentation, etc...
Bridge allows the interface to use some common component to be de-coupled from the actual implementation of that component

Bridge vs. Adapter Similarities:

Both provide an interface above actual code and implementation to ease development and allow the nitty-grittiness of raw code to be hidden.
Both are essentially a wrapper that provide an interface to the actual hidden implementation.
Stephen Belknap

Link to this Page