- Learning Python Design Patterns(Second Edition)
- Chetan Giridhar
- 624字
- 2021-07-16 09:46:12
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.
- 大學計算機基礎(第三版)
- 微服務與事件驅動架構
- 程序員面試筆試寶典
- Access 數據庫應用教程
- 算法基礎:打開程序設計之門
- 青少年軟件編程基礎與實戰(圖形化編程三級)
- Visual Basic程序設計與應用實踐教程
- Python高效開發實戰:Django、Tornado、Flask、Twisted(第3版)
- INSTANT Django 1.5 Application Development Starter
- HTML5從入門到精通 (第2版)
- C語言程序設計實驗指導 (第2版)
- RSpec Essentials
- Couchbase Essentials
- Python大學實用教程
- 自學Python:編程基礎、科學計算及數據分析(第2版)