Member-only story
Demystifying the Ports and Adapters Pattern in Django
Recently I have been keenly reading on software patterns that help us introducing new feature across a complex system easier making it more flexible and scalable, that’s when I came across Ports and Adapters pattern, also known as the Hexagonal Architecture.
In this article, we will try to explore this archetecture pattern, while trying to build Bookstore application that demonstrates how to apply this architecture that can be used in practical scenerios, we will be using django for this.
Table of Contents
- What is the Ports and Adapters Pattern?
- Why Use the Ports and Adapters Pattern?
- Project Overview
- Prerequisites
- Implementing the Pattern in Django
- Testing the Application
- Conclusion
- References
What is the Ports and Adapters Pattern?
The Ports and Adapters pattern is a design pattern that tries to isolate the business logic from external systems like 3rd party services/ databases and there by seperating out the concerns. It includes
- Domain Layer: hasbusiness logic and rules.










