Design Patterns – Abstract Factory Pattern(atanashristov.blogspot.com)
submitted by
atanashristov(85) 2 years, 5 months ago
Factories are objects that encapsulate the logic for creating other objects.
Factory object could create one or another object based on some configuration parameters. Or the factory could decide what kind of concrete object to create based on a parameter to some object creational method. For example if the method received post-code the factory creates City object and when the parameter is an email address the factory creates Customer object. In that way one might create factory to select one or another kind of object from database based on the user input.
|category: Patterns
|Views: 35
tags:
Patterns another
Everyones tags:
Your Tags: