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

Sp00 Final Exam Review: Design Patterns

See Final Exam Review - Sp2000

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. This allows you to not hardcode any sort of a specific class creation. You
simple say "self giveMeWhatIWant", and the subclasses take care of the actual details. Both DP's provide a great way of hiding the gory details of actual implementation. It can allow you to focus on the solution, rather than the nitty-gritty detail 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:

Bridge vs. Adapter Similarities:

Link to this Page