
Python: Master the Art of Design Patterns
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
All prices
More details
Persons
Dusty Phillips is a Canadian software developer and an author currently living in New Brunswick. He has been active in the open-source community for 2 decades and has been programming in Python for nearly as long. He holds a master's degree in computer science and has worked for Facebook, the United Nations, and several startups.Giridhar Chetan :
Chetan Giridhar is a technology leader and an open source evangelist. He is the author of Learning Python Design Patterns, Second Edition, has been an invited speaker at international PyCon conferences, and is an associate editor at the Python Papers journal. He takes keen interest in platform engineering, distributed systems, mobile app development, and real-time cloud applications. You can take a look at his experiments at https://github.com/cjgiridhar and his website https://technobeans.com. In his current role as the chief technology officer, Chetan owns the product strategy and drives technology for CallHub. Prior to CallHub, he was associated with BlueJeans Networks and NetApp, where he worked on cloud, video, and enterprise storage products. Chetan believes that the world is full of knowledge; he's always curious to learn new things and share them with open source community, friends, and colleagues. You can connect with him on LinkedIn at https://www.linkedin.com/in/cjgiridhar/.Kasampalis Sakis :
Sakis Kasampalis is a software architect living in the Netherlands. He is not dogmatic about particular programming languages and tools; his principle is that the right tool should be used for the right job. One of his favorite tools is Python because he finds it very productive. Sakis was also the technical reviewer of Mastering Object-oriented Python and Learning Python Design Patterns, published by Packt Publishing.
Content
- Cover
- Copyright
- Preface
- Table of Contents
- Module 1: Python 3 Object-Oriented Programming - Second Edition
- Chapter 1: Object-oriented Design
- Introducing object-oriented
- Objects and classes
- Specifying attributes and behaviors
- Hiding details and creating the public interface
- Composition
- Inheritance
- Case study
- Exercises
- Summary
- Chapter 2: Objects in Python
- Creating Python classes
- Modules and packages
- Organizing module contents
- Who can access my data?
- Third-party libraries
- Case study
- Exercises
- Summary
- Chapter 3: When Objects Are Alike
- Basic inheritance
- Multiple inheritance
- Polymorphism
- Abstract base classes
- Case study
- Exercises
- Summary
- Chapter 4: Expecting the Unexpected
- Raising exceptions
- Case study
- Exercises
- Summary
- Chapter 5: When to Use Object-oriented Programming
- Treat objects as objects
- Adding behavior to class data with properties
- Manager objects
- Case study
- Exercises
- Summary
- Chapter 6: Python Data Structures
- Empty objects
- Tuples and named tuples
- Dictionaries
- Lists
- Sets
- Extending built-ins
- Queues
- Case study
- Exercises
- Summary
- Chapter 7: Python Object-oriented Shortcuts
- Python built-in functions
- An alternative to method overloading
- Functions are objects too
- Case study
- Exercises
- Summary
- Chapter 8: Strings and Serialization
- Strings
- Regular expressions
- Serializing objects
- Case study
- Exercises
- Summary
- Chapter 9: The Iterator Pattern
- Design patterns in brief
- Iterators
- Comprehensions
- Generators
- Coroutines
- Case study
- Exercises
- Summary
- Chapter 10: Python Design Patterns I
- The decorator pattern
- The observer pattern
- The strategy pattern
- The state pattern
- The singleton pattern
- The template pattern
- Exercises
- Summary
- Chapter 11: Python Design Patterns II
- The adapter pattern
- The facade pattern
- The flyweight pattern
- The command pattern
- The abstract factory pattern
- The composite pattern
- Exercises
- Summary
- Chapter 12: Testing Object-oriented Programs
- Why test?
- Unit testing
- Testing with py.test
- Imitating expensive objects
- How much testing is enough?
- Case study
- Exercises
- Summary
- Chapter 13: Concurrency
- Threads
- Multiprocessing
- Futures
- AsyncIO
- Case study
- Exercises
- Summary
- Module 2: Learning Python Design Patterns - Second Edition
- Chapter 1: Introduction to Design Patterns
- Understanding object-oriented programming
- Major aspects of object-oriented programming
- Object-oriented design principles
- The concept of design patterns
- Patterns for dynamic languages
- Classifying patterns
- Summary
- Chapter 2: The Singleton Design Pattern
- Understanding the Singleton design pattern
- 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: The Factory Pattern - Building Factories to Create Objects
- Understanding the Factory pattern
- The Simple Factory pattern
- The Factory Method pattern
- The Abstract Factory pattern
- The Factory method versus Abstract Factory method
- 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
- 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
- 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
- The Observer pattern in the real world
- The Observer pattern methods
- 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
- Implementing the Command pattern in the real world
- Advantages and disadvantages of Command patterns
- Frequently asked questions
- Summary
- Chapter 8: The Template Method Pattern - Encapsulating Algorithm
- Defining 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
- A UML class diagram for the MVC design pattern
- The MVC pattern in the real world
- Benefits of the MVC pattern
- Frequently asked questions
- Summary
- Chapter 10: The State Design Pattern
- Defining the State design pattern
- A simple example of the State design pattern
- Advantages/disadvantages of the State pattern
- Summary
- Chapter 11: AntiPatterns
- An introduction to AntiPatterns
- Software development AntiPatterns
- Software architecture AntiPatterns
- Summary
- Module 3: Mastering Python Design Patterns
- Chapter 1: The Factory Pattern
- Factory Method
- Abstract Factory
- Summary
- Chapter 2: The Builder Pattern
- A real-life example
- A software example
- Use cases
- Implementation
- Summary
- Chapter 3: The Prototype Pattern
- A real-life example
- A software example
- Use cases
- Implementation
- Summary
- Chapter 4: The Adapter Pattern
- A real-life example
- A software example
- Use cases
- Implementation
- Summary
- Chapter 5: The Decorator Pattern
- A real-life example
- A software example
- Use cases
- Implementation
- Summary
- Chapter 6: The Facade Pattern
- A real-life example
- A software example
- Use cases
- Implementation
- Summary
- Chapter 7: The Flyweight Pattern
- A real-life example
- A software example
- Use cases
- Implementation
- Summary
- Chapter 8: The Model-View-Controller Pattern
- A real-life example
- A software example
- Use cases
- Implementation
- Summary
- Chapter 9: The Proxy Pattern
- A real-life example
- A software example
- Use cases
- Implementation
- Summary
- Chapter 10: The Chain of Responsibility Pattern
- A real-life example
- A software example
- Use cases
- Implementation
- Summary
- Chapter 11: The Command Pattern
- A real-life example
- A software example
- Use cases
- Implementation
- Summary
- Chapter 12: The Interpreter Pattern
- A real-life example
- A software example
- Use cases
- Implementation
- Summary
- Chapter 13: The Observer Pattern
- A real-life example
- A software example
- Use cases
- Implementation
- Summary
- Chapter 14: The State Pattern
- A real-life example
- A software example
- Use cases
- Implementation
- Summary
- Chapter 15: The Strategy Pattern
- A real-life example
- A software example
- Use cases
- Implementation
- Summary
- Chapter 16: The Template Pattern
- A real-life example
- A software example
- Use cases
- Implementation
- Summary
- Bibliography
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.