Cargando…

Learning Python Design Patterns - Second Edition.

Leverage the power of Python design patterns to solve real-world problems in software architecture and designAbout This Book Understand the structural, creational, and behavioral Python design patterns Get to know the context and application of design patterns to solve real-world problems in softwar...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Giridhar, Chetan (Autor)
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham : Packt Publishing, Limited Feb. 2016.
Edición:2nd ed.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • Cover
  • Copyright
  • Credits
  • Foreword
  • About the Author
  • About the Reviewer
  • www.PacktPub.com
  • Table of Contents
  • Preface
  • Chapter 1: Introduction to Design Patterns
  • Understanding object-oriented programming
  • Objects
  • Classes
  • Methods
  • Major aspects of object-oriented programming
  • Encapsulation
  • Polymorphism
  • Inheritance
  • Abstraction
  • Composition
  • Object-oriented design principles
  • The open/close principle
  • The inversion of control principle
  • The interface segregation principle
  • The single responsibility principle
  • The substitution principle
  • The concept of design patterns
  • Advantages of design patterns
  • Taxonomy of design patterns
  • Context
  • the applicability of design patterns
  • Patterns for dynamic languages
  • Classifying patterns
  • Creational patterns:
  • Structural patterns
  • Behavioral patterns
  • Summary
  • Chapter 2: The Singleton Design Pattern
  • Understanding the Singleton design pattern
  • Implementing a classical Singleton in Python
  • Lazy instantiation in the Singleton pattern
  • Module-level Singletons
  • The Monostate Singleton pattern
  • Singletons and metaclasses
  • A real-world scenario
  • the Singleton pattern, part 1
  • A real-world scenario
  • the Singleton pattern, part 2
  • Drawbacks of the Singleton pattern
  • Summary
  • Chapter 3: Factory Pattern
  • Building Factories to Create Objects
  • Understanding the Factory pattern
  • The Simple Factory pattern
  • The Factory Method pattern
  • Implementing the Factory Method
  • Advantages of the Factory method pattern
  • The Abstract Factory pattern
  • Implementing the Abstract Factory pattern
  • The Factory Method versus Abstract Factory
  • Summary
  • Chapter 4: The Façade Pattern
  • Being Adaptive with Façade
  • Understanding Structural design patterns
  • Understanding the Façade design pattern
  • A UML class diagram.
  • Façade
  • System
  • Client
  • Implementing the Façade pattern in the real world
  • The principle of least knowledge
  • Frequently asked questions
  • Summary
  • Chapter 5: The Proxy Pattern
  • Controlling Object Access
  • Understanding the Proxy design pattern
  • A UML class diagram for the Proxy pattern
  • Understanding different types of Proxies
  • A virtual proxy
  • A remote proxy
  • A protective proxy
  • A smart proxy
  • The Proxy pattern in the real world
  • Advantages of the Proxy pattern
  • Comparing the Façade and Proxy patterns
  • Frequently asked questions
  • Summary
  • Chapter 6: The Observer Pattern
  • Keeping Objects in the Know
  • Introducing Behavioral patterns
  • Understanding the Observer design pattern
  • A UML class diagram for the Observer pattern
  • The Observer pattern in the real world
  • The Observer pattern methods
  • The pull model
  • The push model
  • Loose coupling and the Observer pattern
  • The Observer pattern
  • advantages and disadvantages
  • Frequently asked questions
  • Summary
  • Chapter 7: The Command Pattern
  • Encapsulating Invocation
  • Introducing the Command pattern
  • Understanding the Command design pattern
  • A UML class diagram for the Command pattern
  • Implementing the Command pattern in the real world
  • Design considerations
  • Advantages and disadvantages of Command patterns
  • Frequently asked questions
  • Summary
  • Chapter 8: The Template Method Pattern
  • Encapsulating Algorithm
  • Defining the Template Method pattern
  • Understanding the Template Method design pattern
  • A UML class diagram for the Template Method pattern
  • The Template Method pattern in the real world
  • The Template Method pattern
  • hooks
  • The Hollywood principle and the Template Method
  • The advantages and disadvantages of the Template Method pattern
  • Frequently asked questions
  • Summary.
  • Chapter 9: Model-View-Controller
  • Compound Patterns
  • An introduction to compound patterns
  • The Model-View-Controller pattern
  • Model-knowledge of the application
  • View
  • the appearance
  • Controller
  • the glue
  • A UML class diagram for the MVC design pattern
  • The MVC pattern in the real world
  • Modules
  • Benefits of the MVC pattern
  • Frequently asked questions
  • Summary
  • Chapter 10
  • The State Design Pattern
  • Defining the State design pattern
  • Understanding the State design pattern
  • Understanding the State design pattern with a UML diagram
  • A simple example of the State design pattern
  • The State design pattern with v3.5 implementation
  • Advantages/disadvantages of the State pattern
  • Summary
  • Chapter 11: AntiPatterns
  • An introduction to AntiPatterns
  • Software development AntiPatterns
  • Spaghetti code
  • Golden Hammer
  • Lava Flow
  • Copy-and-paste or cut-and-paste programming
  • Software architecture AntiPatterns
  • Reinventing the wheel
  • Vendor lock-in
  • Design by committee
  • Summary
  • Index.