& FREE Delivery. Details
Only 2 left in stock.
Ships from and sold by Amazon SG.
Architecture Patterns wit... has been added to your Cart
Have one to sell?

Architecture Patterns with Python: Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices Paperback – Illustrated, 20 March 2020

4.5 out of 5 stars 48 ratings

See all formats and editions Hide other formats and editions
Amazon Price
New from Used from
Paperback, Illustrated
Arrives: Tuesday, 8 Dec. Details
Fastest delivery: Tomorrow
Order within 9 hrs and 22 mins
click to open popover

Frequently bought together

  • Architecture Patterns with Python: Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices
  • +
  • High Performance Python: Practical Performant Programming for Humans
  • +
  • Python for DevOps: Learn Ruthlessly Effective Automation
Total Price: S$166.06
Buy the selected items together
3 for the price of 2
across selected products in Books, Baby & Toys
Shop now

Product details

  • Paperback : 280 pages
  • ISBN-10 : 1492052205
  • ISBN-13 : 978-1492052203
  • Language: : English
  • Customer reviews:
    4.5 out of 5 stars 48 ratings

Origins of this book:

At the end of Harry’s last book, Test-Driven Development with Python (O’Reilly), he found himself asking a bunch of questions about architecture, such as, What’s the best way of structuring your application so that it’s easy to test? More specifically, so that your core business logic is covered by unit tests, and so that you minimize the number of integration and end-to-end tests you need? He made vague references to “Hexagonal Architecture” and “Ports and Adapters” and “Functional Core, Imperative Shell,” but if he was honest, he’d have to admit that these weren’t things he really understood or had done in practice.

And then he was lucky enough to run into Bob, who has the answers to all these questions. Bob ended up a software architect because nobody else on his team was doing it. He turned out to be pretty bad at it, but he was lucky enough to run into Ian Cooper, who taught him new ways of writing and thinking about code.

Our aim with this book is to introduce several classic architectural patterns and show how they support TDD, DDD, and event-driven services. We hope it will serve as a reference for implementing them in a Pythonic way, and that people can use it as a first step toward further research in this field.

python, tdd, test driven development
Test-Driven Development with Python
Related content from O'Reilly Media

No customer reviews

5 star (0%) 0%
4 star (0%) 0%
3 star (0%) 0%
2 star (0%) 0%
1 star (0%) 0%
How are ratings calculated?

Review this product

Share your thoughts with other customers

Most helpful customer reviews on Amazon.com

Amazon.com: 4.8 out of 5 stars 6 reviews
Matthew Emerick
5.0 out of 5 stars The Software Engineering Book You Need
20 June 2020 - Published on Amazon.com
Verified Purchase
6 people found this helpful
Chris May
5.0 out of 5 stars Possibly the most impactful python book I've read
4 June 2020 - Published on Amazon.com
Verified Purchase
6 people found this helpful
4.0 out of 5 stars The Book That Intermediate Python Programmers Should Read
17 August 2020 - Published on Amazon.com
Verified Purchase
One person found this helpful
KimSia Sim
5.0 out of 5 stars Strong practical focus in terms of applying DDD to Python web applications
10 May 2020 - Published on Amazon.com
Customer image
5.0 out of 5 stars Strong practical focus in terms of applying DDD to Python web applications
Reviewed in the United States on 10 May 2020
I have always bought books that try to teach theoretical design patterns. They made sense when i read them, but when I try to implement them I get stuck.

## This teaches theory in a highly practical way

My experience is completely the OPPOSITE here compared with most theoretical books.

This book is highly practical. In fact, it's so practical, I am highly motivated to re-read certain chapters of this book several times. I have made plenty of notes as well. See the images. Many highly theoretical books, I read once, cannot implement, then put them aside. This includes many 5-star rated books. My experience is entirely different for this book.

## Gradual evolution of architecture across chapters using diagrams

Another good thing about this book is that it shows you the gradual evolution of the architectural patterns across multiple chapters using diagrams of the overall structure. This is very useful as I am a visual person. It makes me feel that I can grok their suggestions but also the reasons behind their suggestions.

## No BS. They emphasize tradeoffs

Many architectural / highly theoretical books either don't talk abt tradeoffs or they simply note that tradeoffs happen and then handwave it to move onto stuff the authors like to talk about.

No such thing here. They go deep into the weeds.

Almost every chapter that covers a new pattern, they will have at least one pros and cons table summarizing the various options. Some chapters have more than one pros and cons because there are multiple key decision points. And the authors go in to explore the full range of options. And then weigh them for you.

It feels like they are right there besides you coaching you step by small step.

## Is this suitable for Django people?


I'm currently using Django professionally for a project that accounts to 50% of my revenue. I expect to be 100% by end of the year. I have been using Django since early 2018 (~2 years). And then I come across this book.

So I say this as an actual Django developer with real stakes: this book is one of the most important software design books in my career. I'm already trying to implement one of the suggestions inside (CQRS). I fully expect to revisit the book several times.

However, do note that the authors (Harry and Bob) are more familiar with Flask. So they write this with Flask in mind. They did seek out experienced Django people to review their book and they wrote up an appendix D to show how you can implement some of their main patterns using Django and why.

So yes, you may need some effort to make this work for you in Django, but it's possible.

Remember this book teaches you new ways to architect. So it's not a copy-paste teaching in the first place. You have to adapt it to your context even if you use Flask.

Nevertheless, this book is so useful because they really go deep into the whys and hows. Which excites me enough to put in extra effort to make some of the patterns work for my Django projects. That doesn't happen for most software books I read.

I recommend go slow, take small steps, and pick the low hanging fruit in your python (Flask or Django) project to adopt some of the patterns.

For me, initially there were a few 2 steps forward 1 step back in terms of adapting. But I see that as part of the learning process. I spoke earlier that I am now adopting some aspects of CQRS in my Django app. The next move for me is likely the adoption of Domain Entity while keeping the Django ActiveRecord ORM pattern. I'll see how it goes.

But I am excited and looking forward to that experiment. Thanks to this book!

## Afterword

This is my second review because my first one got rejected.

I don't have verified purchase because I needed a hardcopy and I got mine from some other online seller due to shipping costs reasons.

If you still are hesitant despite being a Python web developer, I recommend searching for sample chapters that are available by the authors. In fact, it was those sample chapters that tipped the balance for me to buy the hardcopy.

Easily the best purchase for me this 2020.
Images in this review
Customer image Customer image Customer image Customer image
Customer imageCustomer imageCustomer imageCustomer image
9 people found this helpful