Middleware: An Architecture Pattern Across Stacks and Frameworks

https://hackernoon.imgix.net/images/4wWmJ0ILxuQniqJvu4ilUo9QxHB3-bh83cj1.png

My “Borrowed Architectures” series exists because good architectural solutions keep showing up as the same solution in different clothes. Getting good at noticing that, spotting patterns and carrying them over to your thinking process, is one of the best ways I know to grow as an engineer. So far, we've looked through some other disciplines: pace layers from urban planning, about drawing software boundaries by how fast each part of a system changes, and building codes, which treat a cascading failure as a design input rather than a postmortem.

This time the other discipline is the other half of your own stack.

Frontend and backend engineers sit next to each other and run frameworks that reinvented each other's ideas, often without noticing. A frontend engineer writes a Redux middleware to log every action. A backend engineer writes a FastAPI middleware to time every request. Both treat...

Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE