O'Reilly logo

Learning Python Design Patterns by Gennadiy Zlobin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

In object-oriented development terminology, a factory is a class for creating other classes. The Factory method defines an interface for creating an object, but lets the classes that implement the interface decide which class to instantiate. The Factory Method makes code more universal, not being tied to concrete classes but to interfaces.

Abstract Factory provides an interface for creating families of related or dependent objects without specifying their concrete classes. It simplifies the replacement of product families and ensures the compatibility of the products consisting in the product family.

In the next chapter you will learn about the Facade pattern, how it simplifies the code for client usage, how it is implemented in the Python ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required