`
dr2tr
  • 浏览: 138288 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Design Patterns -- Abstract Factory

 
阅读更多

The intent of Abstract Factory is to provide for the creation of a family of related, or dependent, objects. see pic:

Additional note is below:( reference from http://www.dofactory.com) : 

  • AbstractFactory  (ContinentFactory)
    • declares an interface for operations that create abstract products
  • ConcreteFactory   (AfricaFactory, AmericaFactory)
    • implements the operations to create concrete product objects
  • AbstractProduct   (Herbivore, Carnivore)
    • declares an interface for a type of product object
  • Product  (Wildebeest, Lion, Bison, Wolf)
    • defines a product object to be created by the corresponding concrete factory
    • implements the AbstractProduct interface
  • Client  (AnimalWorld)
    • uses interfaces declared by AbstractFactory and AbstractProduct classes

 using the term: 产品族(Product Family),the former pic is like:

 

 

In this pattern, speaking loosely, a package is usually a "family" of classes, and an abstract factory produces a "family" of objects. 

 

 

分享到:
评论

相关推荐

    GoF Design Patterns - 设计模式 - mobi格式

    经典的由“四人帮”编著的设计模式。提供mobi格式,供kindle用户下载。 书中详细为我们介绍了23种设计模式,包括abstract factory模式等。

    Packt.Go.Design.Patterns.2017

    Creational Patterns - Singleton, Builder, Factory, Prototype, and Abstract Factory Design Patterns Chapter 3. Structural Patterns - Composite, Adapter, and Bridge Design Patterns Chapter 4. ...

    Apress.Pro.Design.Patterns.in.Swift

    Master classic patterns like singleton, abstract factory, chain of responsibility, and observer Discover less well-known patterns like memento, composite, command, and mediator Understand how Swift ...

    Design Patterns Elements of Reusable Object-Oriented Software

    • Abstract Factory • Builder • Factory Method • Prototype • Singleton • Discussion of Creational Patterns Structural Patterns • Adapter • Bridge • Composite • Decorator • Facade...

    Beginning SOLID Principles and Design Patterns for ASP.NET Developers.pdf

    ■Chapter 4: Creational Patterns: Abstract Factory and Builder ■Chapter 5: Structural Patterns: Adapter, Bridge, Composite, and Decorator ■Chapter 6: Structural Patterns: Façade, Flyweight, and ...

    Design.Patterns.Explained.Simply

    Abstract Factory Builder Factory Method Object Pool Prototype Singleton Structural patterns Adapter Bridge Composite Decorator Facade Flyweight Private Class Data Proxy Behavioral patterns Chain of ...

    《Java Design Patterns》高清完整英文PDF版

    Chapter 17: Abstract Factory Patterns Chapter 18: Mediator Patterns Chapter 19: Prototype Patterns Chapter 20: Chain of Responsibility Patterns Chapter 21: Composite Patterns Chapter 22: Bridge ...

    Android Design Patterns and Best Practice

    design patterns, the factory and abstract factory. Chapter 2 , Creational Patterns, covers material and interface design, exploring the design support library and the builder design pattern.

    ControlVee.DesignPattern.Creational.AbstractFactory

    ControlVee.DesignPattern.Creational.AbstractFactory

    Head First Design Patterns 高清英文版

    第1章到第11章陆续介绍的设计模式为Strategy、Observer、Decorator、Abstract Factory、Factory Method、Singleton,Command、Adapter、Facade、TemplateMethod、Iterator、Composite、State、Proxy。最后三章比较...

    Head First Design Patterns

    第1章到第11章陆续介绍的设计模式为Strategy、Observer、Decorator、Abstract Factory、Factory Method、Singleton、Command、Adapter、Facade、Templat Method、Iterator、Composite、 State、Proxy。最后三章比较...

    Head First Design Patterns 英文版 Head First设计模式

    第1章到第11章陆续介绍的设计模式为Strategy、Observer、Decorator、Abstract Factory、Factory Method、Singleton,Command、Adapter、Facade、TemplateMethod、Iterator、Composite、State、Proxy。最后三章比较...

    精通Objective-C设计模式 源代码

    You’ll learn to master classic patterns like singleton, abstract factory, chain of responsibility, and observer. You’ll also discover less well-known but useful patterns like memento, composite, ...

    Java.Design.Patterns.1537192353

    ABSTRACT FACTORY PATTERN BUILDER PATTERN PROTOTYPE PATTERN ADAPTER PATTERN COMPOSITE PATTERN PROXY PATTERN FAÇADE PATTERN DECORATOR PATTERN FLYWEIGHT PATTERN TEMPLATE METHOD PATTERN MEDIATOR PATTERN ...

    CSharp.DesignPatterns.1.Creational.AbstractFactory

    CSharp.DesignPatterns.1.Creational.AbstractFactory 简介:Abstract Factory允许我们笼统地定义相关对象的族,而将这些对象的实际构想留待在必要时实现。 创建了一个“通用元素”的“通用容器”,该容器是一个抽象...

    Head First Design Patterns(英文,无水印,完整版)

    第1章到第11章陆续介绍的设计模式为Strategy、Observer、Decorator、Abstract Factory、Factory Method、Singleton、Command、Adapter、Facade、Templat Method、Iterator、Composite、State、Proxy。*后三章比较...

    java-design-patterns

    你好设计模式Hello world使用所有23种GoF设计模式。 public class Main { public static void main ( String [] args ) throws InstantiationException , ... SplitHelloWorldFactory abstractFactory = AbstractFa

    Android代码-hello-design-pattern

    hello-design-pattern Hello world using all 23 kinds of GoF design patterns. ... SplitHelloWorldFactory abstractFactory = AbstractFactory.select(AbstractFactory.Type.DesignPattern); HelloWorld abstractF

    jQuery.Design.Patterns.178588

    Learn about the observer pattern and the deferred observer pattern, two of the most popular design patterns that handle custom events Advance your jQuery skills by learning about patterns such as ...

    管理系统javasal源码-Design-Patterns-Demo:超全的设计模式——理论+实现demo

    Pattern)抽象工厂模式(Abstract Factory Pattern)单例模式(Singleton Pattern)建造者模式(Builder Pattern)原型模式(Prototype Pattern) 2 结构型模式:这些设计模式关注类和对象的组合。继承的概念被用来...

Global site tag (gtag.js) - Google Analytics