Architecture Patterns with Python: How to Apply DDD, Ports and Adapters, and Enterprise Architecture Design Patterns in a Pythonic Way

Architecture Patterns with Python: How to Apply DDD, Ports and Adapters, and Enterprise Architecture Design Patterns in a Pythonic Way

  • Downloads:2971
  • Type:Epub+TxT+PDF+Mobi
  • Create Date:2021-03-10 03:17:51
  • Update Date:2025-09-06
  • Status:finish
  • Author:Harry Percival
  • ISBN:1492052205
  • Environment:PC/Android/iPhone/iPad/Kindle

Summary

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 architecture patterns such as hexagonal/clean architecture, event-driven architecture, and strategic patterns prescribed by domain-driven design (DDD)。 But translating those patterns into Python isn't always straightforward。

With this practical guide, Harry Percival and Bob Gregory from MADE。com introduce proven architectural design patterns to help Python developers manage application complexity。 Each pattern is illustrated with concrete examples in idiomatic Python that explain how to avoid some of the unnecessary verbosity of Java and C# syntax。 You'll learn how to implement each of these patterns in a Pythonic way。

Architectural design 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

Download

Reviews

Ryan

Insightful and deep design bookI enjoyed this one enough I'll probably read it twice。 Fun and well written, basically never a slog。 There's not a lot written on practical large scale application design in python and this was a real treat。 I see a ton of ideas I'll apply immediately and others I've already been doing intuitively。 Highly recommended。 Insightful and deep design bookI enjoyed this one enough I'll probably read it twice。 Fun and well written, basically never a slog。 There's not a lot written on practical large scale application design in python and this was a real treat。 I see a ton of ideas I'll apply immediately and others I've already been doing intuitively。 Highly recommended。 。。。more

Myšo

Really book full of practical examples。 It is not very chatty and still gives you enough curiosity to check the presented patterns deeper。 Concise and readable code in Python is a great choice for a book explaining the architecture patterns。

Johnny

I liked the pro and cons for all the patterns explained in the book。 This helps you a lot when considering the trade-offs of an approach。 Another big benefit of this book is that you have tests for the code。 Most books on architecture ignore testing completely, this book here is a pleasant exception。Unfortunately, this book does not reach the same level as “Test-Driven Web Development with Python“ from the same author。

Daniel

The best book to get familiar with DDD if you are Python developer。 A little bit of theory just enough to understand basic concepts and plenty of code examples showing how various principles apply in day to day work with code。 I also really like that authors are not dogmatic about whole DDD and clearly show that each element brings value but also trade-offs to consider by the team。Start here, leave blue and red books on a shelf for later once you have some experience with DDD and are ready to ma The best book to get familiar with DDD if you are Python developer。 A little bit of theory just enough to understand basic concepts and plenty of code examples showing how various principles apply in day to day work with code。 I also really like that authors are not dogmatic about whole DDD and clearly show that each element brings value but also trade-offs to consider by the team。Start here, leave blue and red books on a shelf for later once you have some experience with DDD and are ready to master details of it。 。。。more

Maxim

I've learnt a lot from the book。 There is a good balance of practice and theory in the book。 There are a lot of useful links and references for expanding your knowledge on the topic too。Much recommend。 I've learnt a lot from the book。 There is a good balance of practice and theory in the book。 There are a lot of useful links and references for expanding your knowledge on the topic too。Much recommend。 。。。more

Kirill Sklyarenko

When I started reading this book, I made a mistake by not believing the authors。 In the introduction, they make you understand that it is not a typical Python tutorial material。 However, when I first encountered it on their website, I was going to look through, as usual, skipping familiar aspects and paying attention to anything interesting。 But, this attitude is wrong in this case。 You MUST examine the code, and immediately stop, if anything is not completely clear。 Because, down the road, read When I started reading this book, I made a mistake by not believing the authors。 In the introduction, they make you understand that it is not a typical Python tutorial material。 However, when I first encountered it on their website, I was going to look through, as usual, skipping familiar aspects and paying attention to anything interesting。 But, this attitude is wrong in this case。 You MUST examine the code, and immediately stop, if anything is not completely clear。 Because, down the road, reading would become a waste of your time。 At first, you would be surprised with some novel idea, later you would think well okay deal with it later。 Soon enough, you would lose the track completely。 That was my experience at the first read。 It is not a fast read, but very useful upon proper attention。 Would definitely read it the third time。 。。。more

Piotr Ujazdowski

Really nice introduction into architectural patters。 Examples are in python but the knowledge is valuable for any language user。

Nahuel

This book explains each pattern with clear examples with pros and cons to let you decide。It also has a familiar tone as it doesn't pretend to have the last word, just a few battle tested patterns that may help you。As for myself, after finishing the book I feel convinced, but because I understand the reasons behind each pattern, not because it has a name and people in other languages use them。I will also be reading Harry testing book to see if i like it as much as this one This book explains each pattern with clear examples with pros and cons to let you decide。It also has a familiar tone as it doesn't pretend to have the last word, just a few battle tested patterns that may help you。As for myself, after finishing the book I feel convinced, but because I understand the reasons behind each pattern, not because it has a name and people in other languages use them。I will also be reading Harry testing book to see if i like it as much as this one 。。。more

Michael J。

This book gave me so much new information to think about that I'm going to have to let it settle for a while then come back and read it all again。 I'm pretty sure that the mere fact that I have read this is going to save me a lot of trouble in the not too distant future, and stop me going down paths that would not be a good idea in the long run (though, somewhat gratifyingly, it also confirmed my ideas about a few things as well, though even then it gave me something extra to think about)。 Very This book gave me so much new information to think about that I'm going to have to let it settle for a while then come back and read it all again。 I'm pretty sure that the mere fact that I have read this is going to save me a lot of trouble in the not too distant future, and stop me going down paths that would not be a good idea in the long run (though, somewhat gratifyingly, it also confirmed my ideas about a few things as well, though even then it gave me something extra to think about)。 Very well written thorough, with easy to read examples demonstrating exactly what the authors mean at every stage。 Highly recommended for anybody looking to build anything larger than a small CRUD app。 。。。more

Sebastian Gebski

I've picked this one because of pure curiosity。 The majority of my experience is with strongly & statically typed programming languages - applying DDD in such conditions appears very different than in Python (which is relatively new to me)。 So I wanted to check this out - whether certain particles (e。g。 dependency injection, abstracting the services out, etc。) make any sense here or maybe there are some very different patterns to be used。Before I state my opinion whether the book is good or not I've picked this one because of pure curiosity。 The majority of my experience is with strongly & statically typed programming languages - applying DDD in such conditions appears very different than in Python (which is relatively new to me)。 So I wanted to check this out - whether certain particles (e。g。 dependency injection, abstracting the services out, etc。) make any sense here or maybe there are some very different patterns to be used。Before I state my opinion whether the book is good or not - one more comment。 About the title: I find it very misleading (however, fortunately, I've made some background check first, so I knew what to expect)。 This is not really a book about architecture patterns (like EAI) in general - it's far more about so-called "canonical" application of DDD & related patterns (e。g。 CQRS)。 It's a popular subset, very opinionated & sometimes very far from pragmatism & "feet on the ground" attitude, but still good to get familiar with。So, in the end, despite of the flaws (e。g。 I disagree with "canonical" approach to DDD which is - according to myself - exactly opposite to what's the most important in DDD) I've enjoyed the read。 The book is very well written, all the descriptions, rationale & clarifications are clear, easy to grasp & have a proper takt, so the reader doesn't get either bored or overwhelmed。 Personally I've got all the answers I've expected but that DOESN'T MEAN I'd use the "patterns" proposed by this book 1:1 in my solutions。 Good stuff to get through & make your own mind of what's useful and what's not。4。5-4。75 stars 。。。more

Madalin Popa

Great book。 The authors provide great examples and Harry Percival has an excellent way of writing。 This book is like a story。