Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
OOP Design Patterns in Python
Rating: 3.6 out of 5(159 ratings)
22,567 students

OOP Design Patterns in Python

Learn more about Object Orientated Programming
Created byFrank Anemaet
Last updated 7/2021
English
English [Auto],

What you'll learn

  • OOP Design Patterns with Python
  • Deeper understanding of Object Oriented Programming

Course content

1 section11 lectures52m total length
  • Introduction0:07
  • Factory method5:39

    Use the factory method to create objects with a static method that returns new instances based on a type. Extendability lets you add new classes to produce different object types.

  • Queue5:47

    Learn how to implement a queue pattern in Python 3, add objects with put, retrieve them with get, and understand fifo by default and lifo as an option.

  • Command pattern4:35

    Explore the command pattern for do and undo actions, track executed commands with a stack, and implement file operations like move and rename with undo support using the OS module.

  • Strategy pattern5:05

    Learn to implement the strategy pattern by selecting different methods or algorithms at object creation through a parameter, enabling dynamic behavior and flexible execution.

  • Singleton4:29

    Learn how the singleton pattern ensures a class has only one instance, retrieved via get_instance, and prevents creating additional objects by returning the same instance and raising an error.

  • State pattern6:04

    Explore the state design pattern in Python by modeling a computer with states such as on, off, hibernating, and suspended, using a superclass and a switch method to alter behavior.

  • Facade pattern4:52

    The facade pattern acts as a wrapper that reduces complexity by coordinating subsystems like processor, memory, and disk, and initializes them so end users can use simple start methods.

  • Template pattern4:57

    Explore the template pattern by defining a base template class with methods that have no implementation, and implement those methods in concrete subclasses, enabling consistent workflows like pizza or spaghetti.

  • Iterator pattern5:22

    Explore how the Python iterator pattern enables data traversal using iter and next, stopping when items exhaust and stop iteration is raised.

  • Prototype pattern5:39

    discover how the prototype pattern avoids expensive initialization by cloning configured objects, using deep copy and a clone method to efficiently create multiple similar objects.

Requirements

  • Basic knowledge of Python and OOP (Classes, objects)

Description

Design patterns provide a vocabulary to discuss problems and solutions with a common context. They are used in Object Orientated Programs. They’re the recipe or instructions, and once you’ve read them, you’ll be able to more easily follow any piece of code that uses them.

Many software developers first encounter design patterns when they study computer science in college or at university. This typically happens in the second year, after students learn about object-oriented programming and related topics such as inheritance, encapsulation, and polymorphism.

This is a good time to start learning about patterns because it will help you to get more out of the rest of your coursework.

However, not all professional developers learn about design patterns in their formal education. Some don't have the opportunity to learn about patterns at all. The experience of many developers is that design patterns emerge from on-the-job training and experience with projects of increasing size and complexity.

In this course we explain Object Orientated Design Patterns with Python through examples. It includes the factory method, command pattern and many others. All Python source code is included in the course so you can study at your own pace, the videos explain them in more details.

Who this course is for:

  • Intermediate Python programmers who want to learn more