What is the difference between Factory and Abstract Factory Patterns?

What is the difference between Factory and Abstract Factory Patterns?

Factory patternsAbstract patterns
The objects are created through inheritance.The objects are created through composition.
It is used in which the subclass is responsible for object instantiation.It is used to delegate object instantiation by a class to some object.
This pattern creates products.This pattern creates factory.
Each subclass knows what other classes to use or objects to create.Swapping FactoryMethod classes with object composition.
What is MVC pattern?
Model View Controller is used to separate the interface from the business logic so as to give a better visual appearance.....
How can we implement singleton pattern in .NET?
Singleton pattern restricts only one instance running for an object....
How do you implement prototype pattern in .NET?
Prototype pattern is used to create copies of original instances known as clones. It is used when creating instances of a class is very complex.....
Post your comment