Currently Empty: £0.00
We all want to become better software developers and be able to call ourselves “Software Engineers” or “Software Architects”, but to do that you first have to master a number of design patterns.
This course will put you on a track to that destination.
We will teach you how to recognize when to use specific design patterns to build complex systems in a divide-and-conquer manner so that complexity is reduced and abstracted.
But rather than learning all the design patterns out there, we have curated the most important, the top fundamental GoF Design Patterns for you.
All of that in the context of the Object Oriented Python.
We start with full understanding of the S.O.L.I.D Design Principles and how they in turn relate to those design patterns. We explain everything in the context of real-world problems as well as specific code examples.
if you need a Python OOP Refresher, we have that for you. everything from classes to interfaces and abstract classes is covered. We will also show you how to code using pygame (Python Game Platform.)
At the end of the course you will get to Architect a solution by coding John Conway’s Game of Life simulation which will run on your mobile device.
Complex software systems are plagued with three major issues:
-
Timelines are stretched as requirements change.
-
Multiple developers have a hard time coordinating their efforts.
-
Code redundancy.
This in turn creates issues with maintenance and overall flexibility for adding new features. In general this means poorly designed systems that are hard to maintain and are not adaptable.
One answer to all the above problems is having a proper design and architecture. Think of a skyscraper being built. There is always a high-level blueprint. This blueprint is used to show everybody involved (from architects to supply chain to construction workers to machinery scheduling etc…) what is being worked on.
That way, everybody understands and follows the same vision.
A blueprint has a number of commonly understood elements which repeat themselves across many projects. For example all buildings need electrical wiring and plumbing, they might need elevators, and cooling systems, and underground parking lots, and of course stairs. They also usually are connected to the electrical grid and water supply as well as… roads.
All these common elements follow certain standards that have been improved over many many years and across many many projects. They are well understood and can be used almost like recipes.
In Software Engineering we also have a set of elements that repeat themselves across many projects. For example all software applications need to create objects, they need to communicate state change across those objects, they need to be able traverse over collections of those objects. In other words, if you want to be a better developer then you need to become proficient in those elements that have been time-tested. In the Software Engineering world these elements are known as “Design Patterns”
This course will teach students how to recognize when to use specific design patterns to build complex systems in a divide-and-conquer manner so that complexity is reduced and abstracted.
This will help you to design projects in an Architectural manner before any major development happens and can be used to shorten development time and reduce maintenance costs.
Design patterns are important because they are time-tested recipes or solutions to well-known software engineering problems. When creating software applications certain problems recur in a pretty predictable fashion so rather than ‘reinvent’ the wheel we will have an assortment of, if you will, wheels to choose from.
We will teach you this in a slightly different manner than you probably have been taught before. We will take a practical approach (i.e. specific examples) but the power of Design Patterns comes from their ‘concept’ and we will teach you the concept of those design patterns so that you are fully able to change them and modify them to your needs. In addition we will look at how to combine all those patterns into something greater: an architecture.
A well designed Architecture is this magical thing where the whole is greater than the sum of its parts.
This is what we will strive to teach you.
Python OOP *Refresher*
-
1What are Design Patterns and why do we need them?
In this lecture you will learn as to WHAT design patterns are, and why we would need them.
Design patterns are a crucial tool in the toolkit of a Software Engineer and we explore here why you need to become familiar with them.
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content. -
2The Design Patterns Covered in This course.
In this lecture we will present to you the specific design patterns that we will cover in this course.
These are, in our mind, the most important and fundamental of all design patterns and we will go over them in depth in subsequent lectures.
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content.
-
3Quick Quiz about design pattern families
We will test here your understanding of general aspects of design patterns
-
4The WHY Of Software Architecture.
Who needs Software Architecture?
Why do we care about well designed and maintainable software? And how do we achieve SOLID Architecture? This lecture will show you why.
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content. -
5Why use UML?
In this lecture we will show you why UML is very useful when working with design patterns and Software Architectures in general.
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content. -
6Organized vs. Unorganized code.
Final piece of the coding-well puzzle will be explored. We will appeal to you in a visual way as to why having good and organized code matters.
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content. -
7Setting Up the IDE and Python Environment
In this lecture I will show you how to setup the VS IDE environment to run the code samples in this course.
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content. -
8*OPTIONAL*: UML Refresher.
This is an optional lecture that you can skip if you are very comfortable with UML diagrams. In case you want a quick and gentle refresher then by all means dive in! We will do a quick overview of Class and Sequence diagrams.
NOTE: A PDF Version of this lecture is provided here in case you would like to take hardcopy notes of the lecture content.
What makes a Great Architecture?
-
9Python OOP Refresher - Theory Part #1
In this first part we will briefly go over how we will leverage Python's Object Oriented Capabilities.
We will cover classes, and interface contracts (i.e. abstract classes) as well as how this will relate to the UML diagrams you will see in this course.
NOTE: A PDF Version of this lecture is provided here in case you would like to take hard-copy notes of the lecture content. -
10Python OOP Refresher - Theory Part #2
In this second part we will continue to go over how we will leverage Python's Object Oriented Capabilities.
We will cover classes, and interface contracts (i.e. abstract classes) as well as how this will relate to the UML diagrams you will see in this course.
NOTE: A PDF Version of this lecture is provided here in case you would like to take hard-copy notes of the lecture content. -
11Python OOP Refresher - Code Studies Part #1
In this example we will look at syntax for simple python class.
NOTE: The Source code for all the Code Studies has been attached here.
Each study is named "python_oop_NNN.py" where NNN is the number of the study.
For example "python_oop_001.py" would be the source code for Code Studies Part #1 -
12Python OOP Refresher - Code Studies Part #2
In this example we will look at class and object aggregation example. This is how you build complex classes by using simple class building blocks.
-
13Working with a Simple Class in Python
-
14Working with Class Aggregation
-
15Python OOP Refresher - Code Studies Part #3
Introduction to Abstract Classes in Python.
-
16Working with Abstract Classes
-
17Python OOP Refresher - Code Studies Part #4
Looking at an example of encapsulation and private as well as protected class variables.
-
18Working with Class Encapsulation
-
19Python OOP Refresher - Code Studies Part #5
Interface contracts in Python. First look.
-
20Python OOP Refresher - Code Studies Part #6
More complex Interface contracts in Python. This shows you how you can enforce API utilization of a specific interface through method signatures.
-
21Python OOP Refresher - Code Studies Part #7
Tying everything together into a more complex Abstract Class example that has both interface contract behaviour as well as re-use logic.
-
22Working with Interface Contracts Exercise#1
-
23Working with Interface Contracts Exercise#2
Singleton Design Pattern
-
24Hallmarks of Good Architecture.
How can you tell what a good Architecture is? What are the main features of a great Architecture? In this lesson we will explore the hallmarks of a great architecture are and how to spot them.
-
25S.O.L.I.D Design Principles.
This is a very important topic. The S.O.L.I.D design principles form the backbone of what a great architecture should have at its base approach. In this lecture we explore these principles in preparation for when we go over the design patterns of this course.
-
26SOLID *Practice Session* - Single Responsibility Principle(SRP)
This is a quick hands-on practice session where you will get a chance to exercise your SOLID knowledge by refactoring a bad solution into a good solution as per SOLID principles.
In this session we go over Single Responsibility Principle(SRP) -
27SOLID *Practice Session* - Open/Closed Principle(OCP)
This is a quick hands-on practice sessions where you will get a chance to exercise your SOLID knowledge by refactoring a bad solution into a good solution as per SOLID principles.
In this session we go over Open/Closed Principle(OCP) -
28SOLID *Practice Session* - Liskov Substitution Principle (LSP)
This is a quick hands-on practice sessions where you will get a chance to exercise your SOLID knowledge by refactoring a bad solution into a good solution as per SOLID principles.
In this session we go over Liskov Substitution Principle (LSP)
-
29SOLID *Practice Session* - Interface Separation Principle (ISP)
This is a quick hands-on practice sessions where you will get a chance to exercise your SOLID knowledge by refactoring a bad solution into a good solution as per SOLID principles.
In this session we go over interface Separation Principle (ISP)
-
30SOLID *Practice Session* - Dependency Inversion Principle (DIP)
This is a quick hands-on practice sessions where you will get a chance to exercise your SOLID knowledge by refactoring a bad solution into a good solution as per SOLID principles.
In this session we go over Dependency Inversion Principle (DIP)
NOTE: Once you are done with this lecture we have provided you with a PDF of SOLID exercises for you to try on your own. The PDF is attached with this lecture. -
31SOLID Principles Quiz
In this quiz we will test your knowledge of the SOLID Principles
Factory Method Design Pattern
-
32Understanding the Singleton Pattern
We introduce the Singleton Design Pattern and discuss its importance and relevance in Software Engineering. In this lesson you will learn what it is and why we need it.
It is a creational design pattern that helps us with ensuring that we have at most a single copy of a given class instance in the whole project scope. You will find out why that is relevant. -
33Singleton Pattern - Architectural Considerations Part#1 - Simple Approach
In this first part, we further explore the Singleton Pattern and look into the architectural nature of this software recipe through the UML lens.
We explore the simplest implementations and some Python language quirks that come along when you try to implement such a design pattern -
34Singleton Pattern - Architectural Considerations Part#2 - Using Metaclasses
In this second part, we will look into the best way to achieve a Singleton in Python: using a metaclass. We also look into the idea behind implementing eager loading in our singletons vs the more usual lazy instantiation we have seen so far.
-
35Singleton Pattern - Architectural Considerations Part#3 - Thread-Safety
In this, third Architecture lecture, we will look at the underlying issues with thread-safety and the Singleton Design pattern. We will then look at the implementation of a working solution.
-
36Singleton Quiz
-
37Coding Part#1 - Implementing Singleton Pattern in Python
Let's code something using the Singleton Pattern.
In this lesson we will explore how to code this pattern in Python using a few different language constructs that also can help us to ensure thread-safety. We also look at how to create a Singleton Logger wrapper in Python for a practical example of this software recipe.
NOTE: Attached you will find the zipped source code for this lecture.
-
38Coding Part#2 - Practical Examples of Singleton In Python
Let's code something practical using the Singleton Pattern.
In this lecture we will look at 4 different iterations of a custom Logger class which we will explore as a Singleton.
We will start with a simple example, and then go through different phases of making our Logger a thread-safe Singleton that is customizable and flexible through an abstract class concept.NOTE: attached you will find the zipped source code for this lecture.
-
39Working with the Singleton Pattern
-
40Singleton Pattern Coding **Extra** Exercises
This is an optional exercise for the student to do. It is important to practice and try things out.
This will cover two scenarios to use a Singleton Pattern in. -
41Singleton Pattern Coding **Extra** Exercises **Solutions**
This lecture will take you through the solutions for the extra exercises presented in previous lecture (#30)
I discuss the solutions and the code with some extra discussion about thread-safety.
NOTE: The heavily commented source code for the solutions in attached with this lecture.
Builder Design Pattern
-
42Understanding Factory Method Pattern
We introduce the Factory Method Design Pattern and discuss its importance and relevance in Software Engineering.
In this lesson you will learn what it is and why we need it. It is a creational design pattern that makes the process of object creation more maintainable. -
43Architectural Considerations for Factory Method Pattern
We further explore the Factory Method Pattern and look into the architectural nature of this software recipe through the UML lens.
-
44Coding the Factory Method Pattern in Python
Let's code something using the Factory Method Pattern. In this lesson we will explore how to code this pattern in Python. We have a fun little application which draws random shapes on the screen by utilizing the Factory Method Pattern and a custom Python Painter.
NOTE: attached you will find the zipped source code for this lecture.
-
45Working with the Factory Method Pattern Exercise #1
-
46Working with the Factory Method Pattern Exercise #2
-
47Factory Method Pattern Quiz
This will test some of your knowledge about the Factory Method Pattern concept.
-
48Factory Method Pattern Coding **Extra** Exercises
This is an optional exercise for the student to do. It is important to practice and try things out. This will cover two scenarios to use a Factory Method Design Pattern in.
Adapter Design Pattern
-
49Understanding Builder Design Pattern
We introduce the Builder Design Pattern and discuss its importance and relevance in Software Engineering. In this lesson you will learn what it is and why we need it. It is a creational design pattern that makes the process of complex object creation more maintainable and decoupled from the client.
-
50Architectural Considerations for Builder Design Pattern
We further explore the Builder Pattern and look into the architectural nature of this software recipe through the UML lens.
-
51Coding the Builder Pattern in Python
Let's code something using the Builder Pattern. It's time for some some sandwiches! In this lesson we will explore how to code this pattern in Python. We are going to create a Builder abstraction that will be responsible for creating different types of Sandwiches.
NOTE: attached you will find the zipped source code for this lecture. -
52Working with the Builder Pattern Exercise
-
53Builder Pattern Quiz
This will test some of your knowledge about the Build Design Pattern concept.
-
54Builder Design Pattern Coding **Extra** Exercises
This is an optional exercise for the student to do. It is important to practice and try things out. This will cover two scenarios to use a Builder Design Pattern in.
Strategy Design Pattern
-
55Understanding the Adapter Design Pattern
We introduce the Adapter Design Pattern and discuss its importance and relevance in Software Engineering. In this lesson you will learn what it is and why we need it. It is a structural design pattern that allows two different processes to talk to each other even though their view of data is not compatible.
-
56Architectural Considerations for the Adapter Pattern
We further explore the Adapter Pattern and look into the architectural nature of this software recipe through the UML lens.
-
57Coding the Adapter Pattern In Python
Let's code something using the Adapter Pattern. In this lesson we will explore how to code this pattern in Python. We are going to create an Adapter for some XML and JSON data conversion!
As part of your Adapter pattern Exercise you will add a CSV Adapter to the featured code.
NOTE: attached you will find the zipped source code for this lecture. -
58Working with the Adapter Pattern Exercise
-
59Adapter Pattern Quiz
This will test some of your knowledge about the Adapter Design Pattern concept.
-
60Adapter Design Pattern Coding **Extra** Exercises
This is an optional exercise for the student to do. It is important to practice and try things out. This will cover two scenarios to use a Adapter Design Pattern in.
Observer Design Pattern
-
61Understanding the Strategy Design Pattern
In this section will will introduce this incredibly simple yet powerful design pattern. This is probably the most popular and useful of all the design patterns in the whole of GoF collection.
-
62Architectural Consideration for the Strategy Design Pattern
We further explore the Strategy Pattern and look into the architectural nature of this software recipe through the UML lens.
-
63Coding the Strategy Design Pattern
Let's code something using the Strategy Pattern. In this lesson we will explore how to code this pattern in Python. We are going to look at how to create different handlers for rendering objects to the screen.
NOTE: The source code for this lecture is attached with this video.
-
64Working with the Strategy Pattern Exercise #1
-
65Working with the Strategy Pattern Exercise #2
-
66Strategy Pattern Quiz
This will test some of your knowledge about the Strategy Design Pattern concepts.
-
67Strategy Design Pattern Coding **Extra** Exercise
This is an optional exercise for the student to do. It is important to practice and try things out. This will cover two scenarios to use a Strategy Design Pattern in.
It is recommended that you perhaps draw a UML sketch of the code (provided below) so that you can visually refactor it first.
NOTE:
The code for Exercise #1 is attached below: shipping.py
The code for Exercise #2 is attached below in text_processing.py
State Design Pattern
-
68Understanding the Observer Design Pattern
In this section we will explore the Observer Design Pattern with its very important role in inter-object communications.
Such aspects as notifications about specific events, and in general signalling about action workflows is what this pattern excels at. -
69Architectural Consideration for the Observer Design Pattern
Here we will look at more detail about the Architectural make up of this pattern. We will look at UML as well as general workflow of what makes this pattern great.
-
70Coding with the Observer Pattern
In this lecture we will look at some fun code to showcase how the Observer pattern is useful in a object communication workflow.
NOTE: The source code for this lecture is attached with this video. -
71Working with the Observer Pattern Exercise
-
72Observer Design Pattern Coding **Extra** Exercises
This is an optional exercise for the student to do. It is important to practice and try things out.
This will cover two exercises for you to practice the Observer Design Pattern with.
It is recommended that you perhaps draw a UML sketch of the class hierarchies so that you can easily visualize the Observer Design Pattern.
Course Assignment - The Game of Life
-
73Understanding the State Design Pattern
We will go over the concept of what a State and a State Machine is. We will understand how to break down states and associated data into a set of discrete steps that make up a State Machine.
-
74Architectural Consideration for the State Design Pattern
We further explore the State Pattern and look into the architectural nature of this software recipe through the UML lens and get a better understanding of h ow to design a State Machine.
-
75Coding the State Design Pattern
Let's code something using the State Design Pattern. In this lesson we will explore how to code this pattern in Python. We are going to look at how to create controller process for good old traffic lights. We will design and code the state machine for a traffic light.
NOTE: The source code for this lecture is attached with this video. -
76Working with the State Design Pattern Exercise
-
77State Design Pattern Coding **Extra** Exercises
This is an optional exercise for the student to do. It is important to practice and try things out. This will cover two scenarios to use the State Design Pattern in.
NOTE:
The code for Exercise #1 is attached below: state_design_pattern_exercise_001.py
The code for Exercise #2 is attached below in state_design_pattern_exercise_002.py
Final Thoughts
-
78About John Conway's Game Of Life Simulation
In this lecture we will look into the course assignment.
You will see what 'Game of Life' is all about. This is a famous and classic life simulation that is a staple of colleges and universities in their Computer Science programs for its curious 'emergent' behaviour.You will design, architect and code this application for your mobile device. All of it using the design patterns you have learned in this course.
I have provided you with a working starter code which has all the logic for the game of life but is not architected well. Your task will be to take the code and refactor it so that it is well architected and follows all the SOLID principles as well as uses some of the Design Patterns we learned in the course.NOTE: The source starter code for this lecture is attached with this video.
-
79A Word about the "Game of Life" Architecture
A helping hand with the architecture and general 'design' approach for your assignment.
How long do I have access to the course materials?
You can view and review the lecture materials indefinitely, like an on-demand channel.
Can I take my courses with me wherever I go?
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
Stars 5
198
Stars 4
80
Stars 3
16
Stars 2
2
Stars 1
1