The complete guide to Software Engineering in Python: you will learn how to do Test Driven Development in python, what Domain-Driven Design is , and how to craft Event-Driven Micro-services: Build large and complex applications in this amazing programming language.
The following is a review of the book Architecture Patterns with Python: Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices by Harry J.W Percival and Bob Gregory.
From Machine Learning engineers, to Data Scientists, Analyst, Web Developers or App creators. All of them in the end dedicate a great deal of their time to writing code. All of them fall under the umbrella of Software Engineers, and should always deliver optimal, well designed code that leads to awesome, robust applications or services.
However, nowadays most people take a few easy programming courses, and go out to the wild of the business world, or the freelance app development without proper architecture or design patterns. With this previous experience you can and probably build easy and well contained applications with no problem, however, when things start getting a little bit more complex, you will quickly be overwhelmed, and lacking the knowledge to tackle a larger project.
Architecture Patterns with Python is the bridge between those easy, self-contained applications, and more complex and larger implementations. By guiding you through high level software design patterns like hexagonal or clean architecture, event driven architecture, domain driven design, and test driven design in Python, using a ton of code and practical examples, this book will take you from programmer to software developer in Python.
With this hands on guide, Harry Percival and Bob Gregory from Cazzoo 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
Also, it is one of the best resources to learn how to do TDD in Python.
Overall, it is a great book introduction to learn about proper professional software development. The authors provide great examples and have an excellent way of writing that makes the book like a little story, keeping it short and to the point. Lets learn a little bit more about it!
The contents of Architecture Patterns with Python are the following:
I – Building an Architecture to Support Domain Modelling
- 1. Domain Modeling
- 2. Repository Pattern
- 3. A Brief Interlude: On Coupling and Abstractions
- 4. Our First Use Case: Flask API and Service Layer
- 5. TDD in High Gear and Low Gear
- 6. Unit of Work Pattern
- 7. Aggregates and Consistency Boundaries
II – Event Driven Architecture
- 8. Events and the Message Bus
- 9. Going to Town on the Message Bus
- 10. Commands and Command Handler
- 11. Event-Driven Architecture: Using Events to Integrate Microservices
- 12. Command-Query Responsibility Segregation (CQRS)
- 13. Dependency Injection (and Bootstrapping)
To end the book we can find an epilogue, a Summary Diagram and Table, a templete project structure, and some Django Resources, and an explanation on Validation.
You can find the official website for the book here: Official Web of Architecture Patterns with Python.
Also, you can find the official website of one of the authors (Harry Percival) here: Obey The Testing Goat Website.
About the book
Authors: Harry J.W. Percival, Bob Gregory
Publication Date: 3/5/2020
Who is this book for?
In the preface of the book, the authors claim that readers of Architecture Patterns with Python should be developers with previous experience building applications of medium complexity, and that have experience in first person the pain that comes from trying to build large apps without the proper knowledge.
While this is true (if you have experience these problems you will probably be more aware of the need of proper design and architecture of software applications), we would expand this to the larger audencie of those that have worked with Python and want to know the guts of software development, how to create awesome projects, and how to scale up the complexity of the apps you can create, or the knowledge you have obtained from previous Python Programming Courses.
This book is a great introduction to software engineering book, that gives you a hands-on experience, so long as you follow the code. Also, it discusses patterns that are left outside many software engineering courses and it gives a good introduction to microservices, which are very common and widely used right now.
Architecture design with Python fills in the gap of knowledge that exist between those that have learned to program in Python and those that have taken complete and detailed Software Engineering courses or a book like The Mythical Man Month.
It will teach you many important keys of Software Development without crushing your head or over-complicating, while touching some topics that are most times left outside a normal software engineering track.
The material is very accessible with tests and code samples throughout and all code available online to download and run as you work through it. By reading it you will develop an understanding of how to design software applications, which architecture pattern fits your application the best, and how to properly implement it.
It’s a thoroughly worthwhile read for team that needs to build complex applications with many components, and handle scalability, efficiency, and elegancy. You can find it on Amazon here:
- Percival, Harry (Author)
- English (Publication Language)
- 304 Pages - 03/31/2020 (Publication Date) - O'Reilly Media (Publisher)
Other resources to consider before, while, or after reading Architecture Patterns With Python:
- Introductory Python books:
- Detailed Software Development books
- The Mythical Man Month
- Clean Architecture
Thank you so much for reading How to Learn Machine Learning.