|
![](/i/fill.gif) |
On Mon, 26 Apr 2010 19:10:18 +0200, Darren New <dne### [at] san rr com> wrote:
> Fredrik Eriksson wrote:
>> Decentralization is not the purpose of the Factory pattern.
>
> Uh, sure it is, in the same sense that inheritance is decentralization.
> What do *you* think it's for? Maybe it's good for something else too.
Perhaps a poor choice of words on my part. I would say that the Factory
pattern is about decoupling/abstraction, but I suppose you could call that
decentralization.
My point was that the issue of having to lump information about all the
concrete classes together in one place is orthogonal; the Factory pattern
is not intended to decentralize that part, even if you *can* sometimes do
it.
> Altho, I suppose with MI (so you can inherit the "Factory" methods
> anywhere) and static library initialization (so you can invoke those
> implicitly to do registration when the class gets loaded) you could come
> very close to doing this with nothing but a library.
MI is not necessary -- nor even helpful -- for this.
--
FE
Post a reply to this message
|
![](/i/fill.gif) |