
Discover how design patterns in software tackle recurring problems, using creation, structural, and behavioral patterns, and learn from self and others to design robust, scalable systems.
Explore the singleton design pattern that enforces a fixed number of class instances, illustrated by a single logger, a single manager, and shared global variables, with noted risks.
Demonstrate the singleton pattern in Python with a private constructor and a get_instance method. A variant uses an outer class and inner class, mapping get/set attributes to the inner instance.
Explore the prototype design pattern and cloning prototypes to create many similar objects efficiently. Store prototypes in a prototype repository and optionally use a factory to create objects.
Understand the distinction between shallow copy and deep copy in Python lists, and see how assignment and slicing share references, while deep copy creates independent nested copies.
Learn the prototype design pattern in Python with machines A and B and clone methods. Configure levels 1 to 3 and create clones via a prototype repository using deep copies.
Explore the factory design pattern, where a central factory creates objects, manages dependencies, and centralizes object creation. See how interfaces and abstract factories ensure consistency across types.
Study the factory design pattern with two products and two machines. Abstract classes define work, while machine and product factories create objects and support an abstract factory approach.
Explore the builder design pattern, stepping through parameterized object construction with a builder, director, and application to create complex objects step by step, ensuring cleaner code and flexible representations.
Explore the builder design pattern by modeling a house with a director and builders, using abstract and concrete classes to construct foundations, walls, roofs, doors, and windows.
Learn how the adapter design pattern lets an existing class fit new interfaces by wrapping it to convert interfaces, with object and class adapters under the open-closed principle.
Explore the adapter design pattern in Python by enabling an existing mp3 player to play a list of mp3 files, using object and class adapters.
Provide a front-facing interface that masks complex underlying code. Enable seamless interaction with multiple components, as shown in a point-of-sale example.
Explore how a facade coordinates customer, product, and loyalty databases through a single transaction interface to complete a sale.
Explore the proxy design pattern in Python, including remote, virtual, protection, and cache proxies, how the proxy exposes the actual object's interface, and forwards requests to the real object.
Demonstrates a protection proxy in Python that gates access to an actual component using a temperature check, delegating operate calls when safe through multiple iterations.
Explore the chain of responsibility design pattern in Python, starting from the single responsibility principle and evolving to class-based chain linking, next-element invocation, and optional data-pipeline variations for maintainable code.
Explore chain of responsibility in a log processing example, linking screen display, file logging, alarm, and secondary server to improve readability and maintainability.
Explore the command design pattern, where an invoker issues commands via a shared interface, and a command delegates execution to a receiver, enabling loose coupling and easier system maintenance.
Explore the command design pattern with a receiver, abstract base class interface, switch on and switch off commands, an invoker, and a main application orchestrating execution.
Extend the command pattern by adding an undo capability, showing how the receiver, switch on/off commands, and an invoker use a stack to undo actions in a last-in, first-out order.
Learn an optimized command design pattern in Python by turning commands into on-the-fly functions. Replace the command class with dictionaries containing function names and parameters executed by an invoker.
Showcase the final command design pattern in Python by replacing receiver functions with lambda-generated commands, feeding two-parameter on/off lambdas to the invoker, and comparing four variants.
Learning Design Pattern is a voracious learning, where we are learning from others mistakes and best practices. We learn how the best solutions to the repeating problems, which others have discovered. We learn how to identify these problems, which appear in different forms and how to solve them.
Design Patterns are the tools, which we can use to solve different problems in different situations.
In this course, you will learn what these tools are, when to use which tool, how to use it and what needs to be taken care of while using the tool. Understanding of different tools and their usage takes our work to the next level which directly gets converted in its quality, productivity and maintainability.
It also enables us seeing and recognizing the situation differently and in crafting the best solution(s) for it.
Design Patterns covers mainly cover three aspects of software design -- how to construct the required components, the structure or composition of these components and how these components should behave in different situations.
On these lines, we have three types of Design Patterns -
* Creational Design Patterns
* Structural Design Patterns
* Behavioral Design Patterns
This course covers all these three type of design patterns with practical examples in Python. The examples provide a skeleton code which can be reused in other projects and adapted as per the requirements.
This course also covers the SOLID Design Principles, which are the backbone of the design patterns and the software development. These design principles are described in a separate section for your reference.
The course recommends to refer these design principles, as they get mentioned many a times in the Design Pattern description. If you are not familiar with the SOLID Design Principles, then it is highly recommended to go through these design principles first, before learning the design patterns.