Design Patterns in Python

Introduction Design Patterns are reusable models for solving known and common problems in software architecture. They’re best described as templates for dealing with a certain usual situation. An architect might have a template for designing certain kinds of door-frames which he fits into many of his projects, and a software engineer, or software architect, should know templates for solving frequent programming challenges. A good presentation of a design pattern should include: Name Motivating problem Solution Consequences Equivalent Problems If you […]

Read more

Creational Design Patterns in Python

Overview This is the first article in a short series dedicated to Design Patterns in Python. Creational Design Patterns Creational Design Patterns, as the name implies, deal with the creation of classes or objects. They serve to abstract away the specifics of classes so that we’d be less dependent on their exact implementation, or so that we wouldn’t have to deal with complex construction whenever we need them, or so we’d ensure some special instantiation properties. They’re very useful for […]

Read more

The Singleton Design Pattern in Python

Introduction In this article, we’ll be diving into the Singleton Design Pattern, implemented in Python. As time progresses, software gets more tailored to solving specific problems in different domains. While there are many difference in the application-level of our software, some aspects of software design remain largely the same. These aspects might not remain the same for all software out there but will hold true for a lot of scenarios. Therefore, learning and understanding them will be highly beneficial in […]

Read more

The Bridge Design Pattern with Python

Introduction The Bridge Design Pattern is a Structural Design Pattern, which splits the abstraction from the implementation. In this article, we’ll be covering the motivation and implementation of the Bridge Design Pattern in Python. Design Patterns refer to a set of standardized practices or solutions to common architectural problems in software engineering. Motivation Behind the Bridge Design Pattern The Bridge Pattern prevents what’s called the cartesian product complexity explosion. The problem will be obvious going through an example. Suppose you’re […]

Read more

The Factory Method Design Pattern in Python

Introduction In this article, we’ll be diving into the Factory Method Design Pattern, implemented in Python. Design Patterns define tried and tested solutions to various recurring problems in software development. They do not represent actual code, but rather ways in which we can organize our code for the optimum results. In a world of limited resources, Design Patterns help us achieve the most results with the least amount of used resources. It is also important to note that Design Patterns […]

Read more