What is the difference between Factory and Abstract Factory Patterns?
.NET Framework
Collapse
X
-
sajithamolTags: None -
Please do not post questions in the articles section.Originally posted by sajithamolWhat is the difference between Factory and Abstract Factory Patterns?
Moved to the forum.
Have you tried google for those patterns?
The patterns have been described over and over again -
The Factory pattern is meant to give you the ability to generically construct objects (rather than explicitly declare what you want to create via the "new" keyword you defer to a factory and take what it gives you)Originally posted by sajithamolWhat is the difference between Factory and Abstract Factory Patterns?
The Abstract Factory pattern is meant to give you the ability to generically construct Factories.
So, for instance, say you want to create widgets with a certain look and feel. You could use the Factory pattern and ask a ButtonFactory to make buttons and a TextArea factory to make TextAreas, but since you want the same look and feel for all widgets you could just ask the WidgetFactory to give you a WidgetFactory for a given Look and Feel and then ask it to make Buttons and TextAreas and whatever else, knowing that it has handled which kind of button and whatever else you need.Comment
-
Just wondering whether these are interview questions that will land you that great job... I'm also wondering what problems you are having research it yourself? My opinion is that these sort of questions are best learned out of a book. IMO.Originally posted by sajithamolWhat is the difference between Factory and Abstract Factory Patterns?Comment
-
Yep, especially from the holy book itself, the gang of four.Originally posted by kenobewanJust wondering whether these are interview questions that will land you that great job... I'm also wondering what problems you are having research it yourself? My opinion is that these sort of questions are best learned out of a book. IMO.Comment
Comment