Software Design Patterns in Python

Introduction Download
Course Outline
Reading Material Download
Python Setup
Useful Links
DayModulesSharing
1

Introduction:

  • Why do we need Design Pattern?
  • A bit of the history
  • Good software practices and principles
  • The Gang of Four (GoF)
  • Overview of the Design Patterns
  • Essential software engineering disciplines
  • How patterns are documented?
  • Class
  • Abstract Class
  • Interface
  • Aggregation & Composition
  • Multiplicity
  • Association
  • Role
  • Attributes
  • Operations and Methods
  • Abstract Factory
  • Builder
  • Factory Method
  • Prototype
  • Singleton
  • Adapter
  • Bridge
  • Composite
  • Decorator
  • Façade
  • Flyweight
  • Prox
  • Chain of Responsibility
  • Command
  • Interpreter
  • Iterator
  • Mediator
  • Memento
  • Observer
  • State
  • Strategy
  • Template Method
  • Visitor
  • Inheritance
  • Polymorphism
  • Abstract Classed and Methods
2

Creational Patterns:

  • Creating Singleton Using a Static Method
  • Exceptions and Instances
  • Throwing the Exception
  • Creating an Instance of the Class
  • Providing a Global Point of Access to a Singleton
  • Example in Python
  • When to Use a Factory Method?
  • Example in Python
  • How a Simple Factory Works?
  • Building the Simple Factory
  • Using the Factory
  • Consequences of Abstract Factory
  • Example in Python
  • How a Builder Works?
  • Consequences of the Builder Pattern
  • Example in Python
  • Using the Prototype
  • Deep Vs Shallow copy
  • Cloning the Class
  • Using the Prototype Pattern
  • Dissimilar Classes with the Same Interface
  • Prototype Managers
  • Consequences of the Prototype Pattern
  • Example in Python
3

Structural Patterns:

  • Basic understanding of GC based system
  • An Implementation of a Composite
  • Doubly Linked Lists
  • Consequences of the Composite Pattern
  • A Simple Composite
  • Example in Python
  • Handling events in a Decorator
  • Layout Considerations
  • Multiple Decorators
  • Decorators, Adapters, and Composites
  • Example in Python
  • What Constitutes the Façade?
  • Consequences of the Façade
  • Example in Python
  • Making an Adapter
  • The Class Adapter
  • Example in Python
  • Copy-on-Write
  • Comparison with Related Patterns
  • Example in Python
  • Extending the Bridge
  • Consequences of the Bridge Pattern
  • Example in Python
  • Sharable Objects
  • Copy-on-Write Objects
  • Intrinsic and extrinsic
  • Example in Python
4

Bahevioural Patterns:

  • Applicability
  • Consequences of the Chain of Responsibility
  • Example in Python
  • Motivation
  • Command Objects
  • Building Command Objects
  • Consequences of the Command Pattern
  • Example in Python
  • Motivation
  • Applicability
  • State machine
  • Objects Used in Parsing
  • Regular Expression
  • Example in Python
  • Motivation
  • Consequences of the Iterator Pattern
  • Example in Python
  • Interactions Between Controls
  • Initialization of the System
  • Mediators and Command Objects
  • Consequences of the Mediator Pattern
  • Single Interface Mediators
  • Implementation Issues
  • Example in Python
  • Motivation
  • Implementation
  • Providing Undo
  • Command Objects in the User Interface
  • Example in Python
5
  • “Don’t call me, I will call you” model
  • Consequences of the Observer Pattern
  • Example in Python
  • Switching Between States
  • How the Mediator Interacts with the State Manager?
  • Consequences of the State Pattern
  • Example in Python
  • Motivation
  • The Context
  • The Program Commands
  • Example in Python
  • Motivation
  • Kinds of Methods in a Template Class
  • Templates and Callbacks
  • Summary and Consequences
  • Example in Python
  • Motivation
  • When to Use the Visitor Pattern
  • Visiting the Classes
  • Visiting Several Classes
  • Catch-All Operations with Visitors
  • Double Dispatching Issue
  • Traversing a Series of Classes
  • Consequences of the Visitor Pattern
  • Example in Python
  • Overall structure of the design pattern catalogue
  • Classification of relationships
  • Categories of relationships
  • Modifying relationships and design patterns

Other Python related Courses you might be interested
SE001OOT Introduction Basic Object-Oriented Concepts
PY101 Python Essentials
PY350 Advanced Python Programming

Recommanded Books
TitleDesign Patterns in Python: Common GOF (Gang of Four) Design Patterns implemented in Python
ISBN979-8-702-08260-8
AuthorMr Sean Bradley
Year2021
Publisher Independently published
TitlePython Programming with Design Patterns
ISBN978-0-137-57993-8
AuthorJames Cooper
Year2021
Publisher Addison-Wesley Professional
TitlePython Object-Oriented Programming: Build robust and maintainable object-oriented Python applications and libraries
ISBN978-1-801-07726-2
AuthorSteven F. Lott, Dusty Phillips
Year2021
Publisher Packt Publishing
TitleMastering Object-Oriented Python: Build powerful applications with reusable code using OOP design patterns and Python 3.7, 2nd Edition
ISBN978-1-789-53136-7
AuthorLott, Steven F
Year2019
Publisher Packt Publishing
TitleMastering Python Design Patterns
ISBN978-1-788-83748-4
AuthorKamon Ayeva, Sakis Kasampalis
Year2018
Publisher Packt
TitlePython 3 Object-Oriented Programming: Building robust and maintainable software with object oriented design patterns in Python
ISBN978-1-789-61585-2
AuthorPhillips, Dusty
Year2018
Publisher Packt Publishing
TitlePython 3 Object-oriented Programming: Unleash the power of Python 3 objectsUnleash the power of Python 3 objects
ISBN978-1-784-39878-1
AuthorDusty Phillips
Year2015
Publisher Packt Publishing