Hexagonal architecture and Python - Part IV: Lightweight integration tests

Posted on 10 May 2025 in Articles • Tagged with architecture, django, hexagonal architecture, lightweight integration tests, programming, python, testing • 14 min read

Pythons and hexagons with Part IV

It's pretty straightforward to unit test the components of an application that follows Hexagonal Architecture. The components are part of specific layers, and mocking the next dependency layer is usually simple. However, this approach means we never test the application as a whole and have to rely on expensive integration or end-to-end tests to do so.

We can test the application components in sociable manner, leaving our components' direct dependencies as-is, and pushing the mocks further to the application edges.

If we push the mocks too far, we end up with lightweight integration tests. Let's explore how we can utilise such tests in a context of Django application and what benefits we can reap.


Continue reading

Building Microservices - more than just another "microservices book"

Posted on 09 July 2024 in Books • Tagged with book, review, microservices, architecture • 2 min read

Building Microservices book cover

While "Building Microservices" is not an encyclopedia, it definitely feels like one.


Continue reading

Teams Topologies - Book Review

Posted on 23 March 2024 in Books • Tagged with book, review, architecture, teams, software development • 6 min read

"Teams Topologies book cover"

Conway’s Law states that systems are designed to mirror the communication structures of the organizations that create them. How, then, can we shape an organization to produce the desired system design? Let's find out "Team Topologies: Organizing Business and Technology Teams for Fast Flow" by Matthew Skelton and Manuel Pais.


Continue reading

Clean Architecture - book review

Posted on 18 May 2023 in Books • Tagged with book, review, programming, architecture, clean code, clean architecture • 6 min read

"Clean Architecture" book cover

Clean Architecture is the "Art of War" of the software industry. It was written by a professional who has been through many tough battles, both wins, and losses. Uncle Bob talks about timeless topics of software development that are just as applicable today as they were fifty years ago.


Continue reading

Hexagonal architecture and Python - Part III: Persistence, Transactions, Exceptions and The Final Assembly

Posted on 31 December 2022 in Articles • Tagged with architecture, DDD, dependency injection, Django, hexagonal architecture, programming, python • 10 min read

Python logo in a hexagon with Roman III literal

Welcome to the third part of the article series, which cover principles of Hexagonal architecture, Dependency Injection, Domain-Driven Design and applies these all to Python and Django application design.


Continue reading

Hexagonal architecture and Python - Part II: Domain, Application Services, Ports and Adapters

Posted on 18 September 2022 in Articles • Tagged with architecture, DDD, dependency injection, hexagonal architecture, programming, python • 11 min read

Python logo in a hexagon with Roman II literal

Welcome to the second part of the article series, which cover principles of Hexagonal architecture, Dependency Injection, Domain-Driven Design and applies these all to Python and Django application design.


Continue reading

Hexagonal architecture and Python - Part I: Dependency Injection and componential architecture

Posted on 30 October 2021 in Articles • Tagged with architecture, DDD, dependency injection, hexagonal architecture, programming, python • 8 min read

Python logo in a hexagon

Welcome to articles series which cover the principles of Hexagonal architecture, talks of Dependency Injection, and its usage in these to Python and Django application design.


Continue reading