Top "Factory-pattern" questions

This tag is sometimes used to refer to the Factory Method pattern ([factory-method]) and sometimes used to refer to the Abstract Factory pattern ([abstract-factory]). Please use either of those tags instead of this one.

Factory, Abstract Factory and Factory Method

I am really confused about these three terms. My understanding is that: in the Factory pattern, there is no concrete …

design-patterns factory factory-pattern abstract-factory
Why use the Service Manager in Zend Framework 2?

lets say i have a service: namespace Helloworld\Service; class GreetingService { public function getGreeting() { if(date("H") <= 11) return "Good …

php service zend-framework2 factory-pattern service-management
When to use the abstract factory pattern?

I'm trying to succinctly describe when to use a factory, for both myself and my team. I ran across the …

oop design-patterns language-agnostic factory factory-pattern
DDD repository and factory

In my application a few layers. In this topic will focus on Domain and Infrastructure layers. I have repository interface …

domain-driven-design repository-pattern factory-pattern ddd-repositories
Return one of two possible objects of different types sharing a method

I have 2 classes: public class Articles { private string name; public Articles(string name) { this.name = name; } public void Output() { Console.…

c# .net oop factory-pattern duck-typing
how to create a factory in zend framework 2?

in my Module.php i have the fallowing methods that i would like to move them in a factory class …

php class zend-framework2 factory-pattern servicemanager
What is a Ruby factory method?

I understand that a factory method is a class method that utilises the self keyword and instantiates an object of …

ruby factory-pattern factory-method
Factory Pattern in C++ -- doing this correctly?

I am relatively new to "design patterns" as they are referred to in a formal sense. I've not been a …

c++ design-patterns interface factory-pattern
Why should one use factory method to create objects

Possible Duplicates: Factory Pattern. When to use factory methods? Why do static Create methods exist? Though I know what is …

c# .net design-patterns uml factory-pattern
Automatic compile-time factory registration of class templates in C++

I'm looking for an abstract factory for class templates, where the classes register themselves automatically at static initialization time. For …

c++ templates static initialization factory-pattern