Skip to content

Simplified and easy to understand design pattern principles

Notifications You must be signed in to change notification settings

LITDataScience/python_design_patterns

Repository files navigation

Design Patterns in Python

Simplified and easy to understand design pattern principles

Single Responsibility Principle

The first design principle is: Single Responsibility Principle(SRP)

Another term connected with the SRP is Separation of Concern(SOC). Both are one and the same thing.

This pattern/class signifies a pattern which is meant to do one thing only and should not focus on another tasks.

Open-Closed Principle

The second design principle is: Open-Closed Principle(OCP)

This principle states that when you add a new functionality, add it via an extension, and not via modification. i.e. open for extension, closed for modification.

To counter this, we have an Enterprise patter: Specification Pattern

Liskov Substitution Principle

The third design principle is: Liskov Substitution Principle(LSP)

This is one of a solid design principle named after Barbara Liskov

It states that if you have a base class, you should be able to derive other classes from it.

Interface Segregation Principle

The fourth design principle is: Interface Segregation Principle(LSP)

It states that you don't insert too many methods or elements into an interface YAGNI

About

Simplified and easy to understand design pattern principles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages