Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RE: difference between plugin pattern and factory pattern

0 views
Skip to first unread message

Perumal Babu

unread,
Nov 20, 2009, 1:05:05 AM11/20/09
to
The difference between the plugin and factory is that the plug is cofiguration driven. But Factory is code driven. In a factory you normally have a condition statement that decide which instance to create.

From http://www.developmentnow.com/g/36_2008_2_0_0_1051360/difference-between-plugin-pattern-and-factory-pattern.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/

Arne Vajhøj

unread,
Nov 21, 2009, 10:40:22 PM11/21/09
to
Perumal Babu wrote:
> The difference between the plugin and factory is that the plug is
> cofiguration driven. But Factory is code driven. In a factory you
> normally have a condition statement that decide which instance to create.
>
> From http://www.developmentnow.com/g/36_2008_2_0_0_1051360/difference-between-plugin-pattern-and-factory-pattern.htm

Why reply to something that is more than a year old?

And BTW I am not even so sure the answer is 100% correct. Factories
can use configuration files. And plugins can be auto detected instead
of being configured. The main difference must be the level: plugins
are larger chunks of code that are used by an application, factory is
a single class that return instances of classes.

Arne


0 new messages