Download This PDF Book: Architecture Patterns with Python: Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices 1st Edition by Harry Percival, Bob Gregory
As Python continues to grow in popularity, projects are becoming larger and more complex. Many Python developers are now taking an interest in high-level software design patterns such as hexagonal/clean architecture, event-driven architecture, and the strategic patterns prescribed by domain-driven design (DDD).
But translating those patterns into Python isn’t always straightforward.
With this hands-on guide, Harry Percival and Bob Gregory from MADE.com introduce proven architectural design patterns to help Python developers manage application complexity—and get the most value out of their test suites.
Each pattern is illustrated with concrete examples in beautiful, idiomatic Python, avoiding some of the verbosity of Java and C# syntax. Patterns include:
Dependency inversion and its links to ports and adapters (hexagonal/clean architecture)
Domain-driven design’s distinction between entities, value objects, and aggregates
Repository and Unit of Work patterns for persistent storage
Events, commands, and the message bus
Command-query responsibility segregation (CQRS)
Event-driven architecture and reactive microservices
Why Do Our Designs Go Wrong?
What comes to mind when you hear the word chaos? Perhaps you think of a noisy stock exchange, or your kitchen in the morning— everything confused and jumbled. When you think of the word order, perhaps you think of an empty room, serene and calm. For scientists, though, chaos is characterized by homogeneity (sameness), and order by complexity (difference).
For example, a well-tended garden is a highly ordered system. Gardeners define boundaries with paths and fences, and they mark out flower beds or vegetable patches.
Over time, the garden evolves, growing richer and thicker; but without deliberate effort, the garden will run wild. Weeds and grasses will choke out other plants, covering over the paths, until eventually every part looks the same again—wild and unmanaged.
About the Author
After an idyllic childhood spent playing with BASIC on French 8-bit computers like the Thomson T-07 whose keys go "boop" when you press them, Harry Percival spent a few years being deeply unhappy as a management consultant.
Soon he rediscovered his true geek nature, and was lucky enough to fall in with a bunch of XP fanatics, working on the pioneering but sadly defunct Resolver One spreadsheet.
He worked at PythonAnywhere LLP, spreading the gospel of TDD world-wide at talks, workshops and conferences
CONTENTS:
1. Preface
2. Introduction
3. I. Building an Architecture to Support Domain Modeling
4. 1. Domain Modeling
5. 2. Repository Pattern
6. 3. A Brief Interlude: On Coupling and Abstractions
7. 4. Our First Use Case: Flask API and Service
8. 5. TDD in High Gear and Low Gear
9. 6. Unit of Work Pattern
10. 7. Aggregates and Consistency Boundaries
11. II. Event-Driven Architecture
12. 8. Events and the Message Bus
13. 9. Going to Town on the Message Bus
14. 10. Commands and Command Handler
15. 11. Event-Driven Architecture: Using Events to Integrate Microservices
16. 12. Command-Query Responsibility Segregation (CQRS)
17. 13. Dependency Injection (and Bootstrapping)
18. Epilogue
19. A. Summary Diagram and Table
20. B. A Template Project Structure
21. C. Swapping Out the Infrastructure: Do Everything with CSVs
22. D. Repository and Unit of Work Patterns with Django
23. E. Validation
24. Index
About The Book:
Publisher : O'Reilly Media; 1st edition (March 5, 2020)
Language : English
Pages : 475
File : PDF, 11 MB
Free Download the Book: Architecture Patterns with Python: Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices
PS: Share the link with your friends
If the Download link is not working, kindly drop a comment below, so we'll update the download link for you.