更新时间:2021-07-02 14:39:00
coverpage
Title Page
Copyright and Credits
Hands-On Enterprise Application Development with Python
About Packt
Why subscribe?
Packt.com
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Conventions used
Get in touch
Reviews
Using Python for Enterprise
Technical requirements
Recent developments in Python
Dropping backward compatibility
It's all Unicode
Support for type hinting
Where Python shines
The requirements of enterprise IT
Python in the enterprise ecosystem
Introducing BugZot – a RESTful bug tracker
Gathering requirements before development
Asking for the user requirements
Categorizing the requirements
Prioritizing the requirements
Generating the software requirement specification document
Summary
Questions
Further reading
Design Patterns – Making a Choice
Technical Requirements
Design patterns
Classification of design patterns
Defining the choice of design patterns
Object-oriented Python
The basic OOP principles
Encapsulation
Composition
Inheritance
Multiple inheritance in Python
Method resolution order in multiple inheritance
Utilizing mixins
Abstract base classes
Metaclasses
The Singleton pattern
The __call__ magic method
The Factory pattern
The Model-View-Controller pattern
Controller
Model
View
Building for Large-Scale Database Operations
Database and object relational mappers
Setting up SQLAlchemy
Building optimal database models
Issues with our model definition
Optimizing our models
Taking advantage of indexes
Maintaining database consistency
Utilizing transactions to maintain consistency
Understanding lazy loading versus eager loading
Using relationships
Lazy loading
Eager loading
Optimizing data loading
Utilizing caching
Caching at the database level
Caching at the block level
Using user-level caching
Dealing with Concurrency
The need for concurrency
Concurrency in GUI applications
Concurrency in enterprise applications
Concurrent programming with Python
Concurrency with multithreading
Thread synchronization
Re-entrant locks
Condition variables
Common pitfalls with multithreading
Race conditions
Deadlocks
The story of GIL
Concurrency with multiprocessing
Python multiprocessing module
Synchronizing processes