Home >>> Courses >>> Patterns

What customers say ...


Highly recommended. Many aha-experiences and took home many positive inspiratons.

Helmut Dittrich, CEO DiFis-Engineering UG, arrow-fix.com, about the German introduction to Django "Django für Fortgeschrittene" more...


I highly recommend these courses. The trainer is superb.

Dr. Kai Irschik, Ocean Breeze Energy GmbH & Co. KG about the courses "Python for Programmers" and "Python for Scientists and Engineers" more...


A useful and quite comprehensive introduction to Python.

Emil Simon, Researcher about the course "Python for Scientists and Engineers" more...


Dr. Müller is (a) very good teacher .. (I) would highly recommend this course and also Dr. Müller for this course.

Dhiraj Surve, Suzlon.com about the course "Python for Programmers" more...


A training with excitement and content, energized and rich, and always focused on the essentials. Thank you very much! Excellent trainer, anytime again!

Martin Volbes GAD eG about the course "Fortgeschrittene Programmierung in Python" more...


Module - Design Patterns in Python

Dates for Open Courses

Course only available as in-house training. Please ask us at info@python-academy.de

Motivation

Frequently, tasks can be solved following some pattern. Design patterns can be used to group tasks and their solutions. Often problems can be solved with existing patterns. Furthermore, patterns offer a common language for developers with well defined terms to communicate about complex tasks.

Course Content

Special Features of Design Patterns in Python

In Python many problems can be solved more easily than in other languages. Therefore, several design patterns are not necessary or they are already implicitly contained in the languages.

The Principles of writing pythonic programs are explained and supported with examples. Topics such as beauty of source code, explicit programming, simplicity, readability, and exception handling are included.

"It's easier to ask for forgiveness than permission (EFAP)"

One pythonic principle is "It's easier to ask for forgiveness than permission (EFAP)". Opposed to the approach to look before you leap, this principle states that you should first try an action and if it fails react appropriately. Python' strong exception handling supports this principle and helps to develop robust and fault tolerant programs.

Meta Classes

Meta classes are an advanced topic of Python programming. Applying meta calsses Complex tasks may be be solved in an elegant manner. The use of meta classes is demonstrated with examples.

Singelton

Singeltons are objects of which only one instance is supposed to exist. Python provides several ways to implement singeltons. These possibilities are shown using examples.

Null Objects

Null objects can be used instead of the type None to avoid tests for None. Implementation, usage as well as advantages and disadvantages are covered.

Proxy

Proxies stand for other objects. Setup and usage of proxies are covered.

Observer

The observer pattern allows several objects to have access to the same data. The principles of this pattern are shown with a comprehensive example.

Constructor

Parameters of constructors are often assigned to instance variables. This pattern can replace a many lines of manual assignment with only one line of code.

Module Duration

1 day

Exercises

The participants can follow all steps directly on their computers. There are exercises at the end of each unit providing ample opportunity to apply the freshly learned knowledge.

Course Material

Every participant receives comprehensive printed materials that cover the whole course content as wells as all source codes and used software.

[Follow @pyacademy]

The Python Academy is sponsor of PyCon.DE 2019.

[PyCon.DE  2019]

The Python Academy is sponsor of PyCon LT 2019.

[PyCon LT 2019]

The Python Academy is sponsor of PyCon US 2019.

[PyCon US 2019]

Our Partners

Partner Coding Akademie


[Coding Akademie]
------------

The Python Academy is sponsor of PythonCamp Köln 2019.

[PythonCamp 2019]

The Python Academy is sponsor of PythonCon Nambia 2019.

[PythonCon Nambia 2019]

The Python Academy is sponsor of PyConIE 2018.

[PyConIE 2018]

The Python Academy is sponsor of PyCon.DE 2018.

[PyCon.DE  2018]

The Python Academy is sponsor of PyCon Spain 2018.

[PyCon ES 2018]

The Python Academy is sponsor of PyCon Ghana 2018.

[PyCon GH 2018]

The Python Academy is sponsor of EuroPython 2018.

[EuroPython 2018]

The Python Academy is sponsor of DjangCon Europe 2018.

[DjangCon Europe 2018]

The Python Academy is sponsor of PyCon US 2018.

[PyCon US 2018]

The Python Academy is sponsor of PythonCamp Köln 2018.

[PythonCamp 2018]

The Python Academy is sponsor of PyConIE 2017.

[PyConIE 2017]

The Python Academy is sponsor of EuroPython 2017.

[EuroPython 2017]

The Python Academy is sponsor of PyCon US 2017.

[PyCon US 2017]

The Python Academy is sponsor of PythonCamp Köln 2017.

[PythonCamp 2017]

The Python Academy is sponsor of Django Girls Leipzig 2016

[Django Girls Leipzig 2016]

The Python Academy is sponsor of PyCon DE 2016.

[PyCon DE 2016]

The Python Academy is sponsor of PyCon Ireland 2016.

[PyCon IE 2016]

The Python Academy is sponsor of EuroSciPy 2016.

[EuroSciPy 2016]

The Python Academy is sponsor of PyCon US 2016.

[PyCon US 2016]

The Python Academy is sponsor of PyData Berlin 2016.

[PyData Berlin 2016]

The Python Academy is sponsor of PyCon Sweden 2016.

[PyCon SE 2016]

The Python Academy is sponsor of Python Unconference 2015.

[PyUnconf 2015]

The Python Academy is sponsor of EuroSciPy 2015.

[EuroSciPy 2015]

The Python Academy is sponsor of EuroPython 2015.

[EuroPython 2015]

The Python Academy is sponsor of PyData Berlin 2015.

[PyData Berlin 2015]

The Python Academy is sponsor of PyCon Montréal 2015.

[PyCon Montréal 2015]

The Python Academy is sponsor of Python BarCamp Köln 2015.

[Python BarCamp 2015]https://www.euroscipy.org/2016/

The Python Academy is sponsor of Chemnitzer Linux-Tage 2015.

Chemnitzer Linux-Tage 2015 - 21. und 22. März 2015

The Python Academy is sponsor of Django Girls Wroclaw 2015.

[Django Girls Wroclaw 2015]

The Python Academy is sponsor of PyCon Ireland 2014.

[PyCon Ireland 2014]

The Python Academy is sponsor of EuroSciPy 2014.

[EuroSciPy 2014]

The Python Academy is sponsor of PyData London 2014.

[PyData London 2014]

The Python Academy is sponsor of EuroPython 2014.

[EuroPython 2014]

The Python Academy is sponsor of PyCon 2014 Montréal.

[PyCon 2014 Montréal]

The Python Academy is sponsor of Python BarCamp Köln 2014.

[Python BarCamp 2014]

The Python Academy is sponsor of PyConDE 2013.

[PyCon DE 2013]

The Python Academy is sponsor of EuroPython 2013.

[EuroPython 2013]

The Python Academy is sponsor of PyCon US 2013.

[PyCon US 2013]

The Python Academy is sponsor of EuroSciPy 2013.

[EuroSciPy 2013]

The Python Academy is sponsor of PyConPL 2012.

[PyCon PL 2012]