Tuesday, 25 February 2020

Abstract factory design pattern vs Factory pattern c# with example

Abstract factory design Pattern
An interface for creating families of related or dependent objects without specifying their concrete classes.

When we need to create a set of related objects or dependent objects which should be used together as families of objects then we use Abstract factory design pattern.

Lets see the difference between Abstract Factory Design Pattern and Factory Design Pattern in c# with example.

Factory pattern
  • This creates object through inheritance.
  • It produces only one product.
  • This implements code in the abstract creator that makes use of the concrete type that sub class produces.
Abstract factory design pattern
  • Creates object through composition.
  • Produce families of products.
  • Concrete factories implements factory method to create product.

About the Author

Admin

Author & Editor

Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.

0 comments:

Post a Comment

 

Technical Talks © 2015 - Designed by Templateism.com, Distributed By Blogger Templates