Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Python Design Patterns - Second Edition

You're reading from   Learning Python Design Patterns - Second Edition

Arrow left icon
Product type Paperback
Published in Feb 2016
Publisher
ISBN-13 9781785888038
Length 164 pages
Edition 2nd Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Gennadiy Zlobin Gennadiy Zlobin
Author Profile Icon Gennadiy Zlobin
Gennadiy Zlobin
Chetan Giridhar Chetan Giridhar
Author Profile Icon Chetan Giridhar
Chetan Giridhar
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Introduction to Design Patterns 2. The Singleton Design Pattern FREE CHAPTER 3. The Factory Pattern – Building Factories to Create Objects 4. The Façade Pattern – Being Adaptive with Façade 5. The Proxy Pattern – Controlling Object Access 6. The Observer Pattern – Keeping Objects in the Know 7. The Command Pattern – Encapsulating Invocation 8. The Template Method Pattern – Encapsulating Algorithm 9. Model-View-Controller – Compound Patterns 10. The State Design Pattern 11. AntiPatterns Index

What this book covers

Chapter 1, Introduction to Design Patterns, goes through the basics of object-oriented programming and discusses object-oriented design principles in detail. This chapter gives a brief introduction to the concept of design patterns so that you will be able to appreciate the context and application of design patterns in software development.

Chapter 2, The Singleton Design Pattern, covers one of the simplest and well-known Creational design patterns used in application development—the Singleton design pattern. The different ways in which we can create a Singleton pattern in Python are also covered in this chapter along with examples. This chapter also covers the Monostate (or Borg) design pattern, which is a variant of the Singleton design pattern.

Chapter 3, The Factory Pattern – Building Factories to Create Objects, discusses another creational pattern, the Factory pattern. You will also learn about the Factory Method pattern and Abstract Factory pattern with a UML diagram, real-world scenarios, and Python v3.5 implementations.

Chapter 4, The Façade Pattern – Being Adaptive with Façade, shows you another type of design pattern, the Structural design pattern. We will be introduced to the concept of Façade and learn how it is applicable to software design with the help of the Façade design pattern. You'll also learn its implementation with a sample Python application using a real-world scenario.

Chapter 5, The Proxy Pattern – Controlling Object Access, deals with the Proxy pattern that falls into the category of Structural design patterns. We will be introduced to the Proxy as a concept and discuss the design pattern and see how it is used in software application development. You'll also learn about the different variants of the Proxy pattern—Virtual Proxy, Smart Proxy, Remote Proxy, and Protective Proxy.

Chapter 6, The Observer Pattern – Keeping Objects in the Know, talks about the third type of design pattern—the behavioral design pattern. We will be introduced to the Observer design pattern with examples. In this chapter, you'll learn how to implement the Push and Pull models of the Observer pattern and the principles of loose coupling. We'll also see how this pattern is critical when it comes to applying it to cloud applications and distributed systems.

Chapter 7, The Command Pattern – Encapsulating Invocation, tells you about the Command design pattern. We will be introduced to the Command design pattern and discuss how it is used in software application development with a real-world scenario and Python implementation. We will also study two main aspects of the Command pattern—an implementation of redo/rollback operations and asynchronous task execution.

Chapter 8, The Template Method Pattern – Encapsulating Algorithm, discusses the Template design pattern. Like the Command pattern, the Template pattern falls into the category of Behavioral patterns. Here, we discuss the Template method pattern, and you will learn about Hooks with an implementation. We'll also cover the Hollywood principle that helps us appreciate this pattern better.

Chapter 9, Model-View-Controller – Compound Patterns, talks about Compound patterns. We will be introduced to the Model-View-Controller design pattern and discuss how it is used in software application development. MVC is easily one of the most used design patterns; in fact, many Python frameworks are based on this principle. You will learn about the details of MVC implementation with an example application written in Python Tornado (a framework used by Facebook).

Chapter 10, The State Design Pattern, introduces you to the State design pattern, which falls into the category of Behavioral patterns just like the Command or Template design patterns. We will discuss how it is used in software application development.

Chapter 11, AntiPatterns, tells you about AntiPatterns—what we shouldn't do as architects or software engineers.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image