Summary

The Abstract Factory is used when you must coordinate the creation of families of objects. It gives a way to take the rules regarding how to perform the instantiation out of the client object that is using these created objects.

  • First, identify the rules for instantiation and define an abstract class with an interface that has a method for each object that needs to be instantiated.

  • Then, implement concrete classes from this class for each family.

  • The client object uses this factory object to create the server objects that it needs.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.190.175