hi friend,
How to understand the factory model and the difference between factory method. In addition, the abstract factory class What is the role model in the factory.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sunny SharmaPosted Jun 21, 2013, 6:39 AM
So what's the difference between a simple factory, a factory method design pattern, and an abstract factory?
Step One: you call a method in the factory. Here it makes sense to use a static method. The parameters for your call tell the factory which class to create.
Step Two: the factory is capable of producing multiple types. This is where the "family of related products" comes into play. The objects which can be created still have a parent class or interface that the client knows about, but the key point is there is more than one type of parent.
Ken HPosted Jun 21, 2013, 6:21 AM
Cannot open links.
thanks.
Sunny SharmaPosted Jun 20, 2013, 5:50 AM
Refer to this post, it surely answers your question:
http://corey.quickshiftconsulting.com/1/post/2009/5/first-post.html
Mark it as answer if it helped.
Cheers!