从工厂方法到抽象工厂。
抽象工厂与工厂方法:组成与实现?
Abstract Factory vs Factory method: Composition vs Inplement?
抽象工厂模式的缺点是什么?
抽象工厂和建筑之间的差异?
最后,我们将定义抽象工厂。
Finally, we'll build our definition for the abstract factory.
下面设计一个有效的抽象工厂设计吗?
希望这篇文章能帮助你理解抽象工厂模式的基础。
Hopefully this article helped you understand the basics of the abstract factory pattern.
但强迫公用api适应工厂对象或抽象工厂(只因为测试代码要求它这样)是错误的设计。
But forcing the public API to accommodate factory objects or abstract factories, just because the test code wants it to, is the wrong design.
工厂类和抽象工厂类能够被用做依赖框架,但是已经有了专门的框架,被称为反转控制容器。
Factories and Abstract Factories can be used as dependency frameworks, but there are specialized frameworks for that, known as Inversion of Control Container.
如果必须传入抽象工厂对象,那么您必须添加一个新的公用构造函数或赋值(mutator)方法。
If an abstract factory object must be passed in, then you must add a new public constructor or mutator.
现在我们已经实现了所有的基础(没有双关),我们将使用一个制造方法来通过抽象工厂来生产汽车。
Now that we've covered all the bases (no pun intended), we'll create automobiles with our abstract factory using a builder method.
在协议管理器的设计上,使用了前摄器模式和抽象工厂,增加整个系统的扩展性并降低了模块之间的耦合度。
For the design of protocol manager, we use the Proactor Pattern and abstract factory to increase the scalability of the system and reduce the coupling degree between modules.
此时,您可能很想更进一步并用成熟的抽象工厂对象替换工厂方法,如ErichGamma等人在设计模式中详细描述的那样。
At this point, you may be tempted to go one step further and replace the factory method with a full-fledged abstract factory object, as detailed in Design Patterns by Erich Gamma, et al.
类型可以为抽象的,数据工厂将不允许创建该类型的实例。
A type can be abstract, and the data factory will not allow you to create an instance of that type.
其他JMS构件包括JMS连接工厂,用于抽象jms目的地的连接处理,例如对JMSAPI用户隐藏池的概念。
Other JMS artifacts are JMS connection Factories that abstract from the connection handling for JMS Destinations, for example, pooling concepts are hidden from the JMS API user.
创建抽象和工厂层是为了支持多个SOAP传输提供者。
An abstraction and factory layer has been created so that multiple SOAP transport providers can be supported.
对于此问题,JSR- 166专家创建了一个更加有用的抽象(ExecutorService接口),它将线程启动工厂建模为一个可集中控制的服务。
For this, the JSR-166 experts created a far more useful abstraction, the ExecutorService interface, which models the thread-starting factory as a service that can be controlled collectively.
下一个最高级抽象是BeanFactory接口,它是工厂设计模式的实现,允许通过名称创建和检索对象。
The next-highest layer of abstraction is the BeanFactory interface, an implementation of the Factory design pattern that enables objects to be created and retrieved by name.
构建工厂的过程,就是取得部件,对部件施行抽象和自动化,最后将它们集成到一个工具。
The process of building a factory is taking these parts (assets) and applying abstractions and automation to them, and integrating them into one tool.
核心对象的上一层是工厂代码层。工厂对象提供了核心XPCOM对象的基本抽象。
One layer above the core object is the factory code. The factory object provides a basic abstraction of the core XPCOM object.
核心对象的上一层是工厂代码层。工厂对象提供了核心XPCOM对象的基本抽象。
One layer above the core object is the factory code. The factory object provides a basic abstraction of the core XPCOM object.
应用推荐