Re: abstract factory -- a doubt ?



In article <1145982223.813590.58740@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
viveklinux@xxxxxxxxx wrote:

new to OO and was wondering what other kind of design principle
violations does an Abstract Factory prevent other than OCP ?

thanks in advance.

"Prevent" is a pretty strong word in my book. I don't think Abstract
Factory does prevent violations of OCP. For example say I have a set of
related types that the factory is supposed to create, and I want to add
another type to that set... I've got to open every sub-class of the
Abstract Factory (as well as the Abstract Factory itself)...
.



Relevant Pages

  • abstract factory -- a doubt ?
    ... new to OO and was wondering what other kind of design principle ... violations does an Abstract Factory prevent other than OCP? ...
    (comp.object)
  • Re: abstract factory -- a doubt ?
    ... Factory does prevent violations of OCP. ... related types that the factory is supposed to create, ... Abstract Factory... ...
    (comp.object)