Factory object

Factory object

In object-oriented computer programming, a factory object is an object for creating other objects. It is an abstraction of a constructor, and can be used to implement various allocation schemes, such as the singleton pattern.

A factory object typically has a method for every kind of object it is capable of creating. These methods optionally accept parameters defining how the object is created, and then return the created object.

Factory objects are used in situations where getting hold of an object of a particular kind is a more complex process than simply creating a new object. The factory object might decide to create the object's class (if applicable) dynamically, return it from an object pool, do complex configuration on the object, or other things.

ee also

*Factory method pattern
*Abstract factory pattern


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Factory method pattern — Factory method in UML Facto …   Wikipedia

  • Factory (disambiguation) — A factory is a large industrial building where goods are manufactured. The word can be traced back to the Latin factorium , which is literally a place of making (producing) .Factory may also refer to: * Factory (trading post), officially licensed …   Wikipedia

  • Object (computer science) — In computer science, an object is any entity that can be manipulated by the commands of a programming language, such as a value, variable, function, or data structure. (With the later introduction of object oriented programming the same word,… …   Wikipedia

  • Object pool pattern — For the article about a general pool see Pool (Computer science) In computer programming, an object pool is a software design pattern. An object pool is a set of initialised objects that are kept ready to use, rather than allocated and destroyed… …   Wikipedia

  • Object pool — In computer programming, an object pool is a software design pattern. An object pool is a set of initialised objects that are kept ready to use, rather than allocated and destroyed on demand. A client of the pool will request an object from the… …   Wikipedia

  • Object Linking and Embedding — (OLE) is a technology developed by Microsoft that allows embedding and linking to documents and other objects. For developers, it brought OLE Control eXtension (OCX), a way to develop and use custom user interface elements. On a technical level,… …   Wikipedia

  • Factory pattern — See also Factory method pattern The Factory pattern is a creational design pattern used in software development to encapsulate the processes involved in the creation of objects. The creation of an object often requires complex processes not… …   Wikipedia

  • Object-oriented programming — Programming paradigms Agent oriented Automata based Component based Flow based Pipelined Concatenative Concurrent computing …   Wikipedia

  • Object lifetime — In computer science, the object lifetime (or life cycle) of an object in object oriented programming is the time between an object s creation (also known as instantiation or construction) till the object is no longer used, and is destructed or… …   Wikipedia

  • Factory-Pattern — Der Begriff Fabrikmethode (englisch Factory Method) bezeichnet ein Entwurfsmuster (engl. Design Pattern) aus dem Bereich der Softwareentwicklung. Das Muster beschreibt, wie ein Objekt durch Aufruf einer Methode anstatt durch direkten Aufruf eines …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”