3 ms·
> If you have to tell a middleware what order it's supposed to run in with relation to other known middlewares, chances are the middleware system itself is a po
by tmh88j 4y ago
> If you have to tell a middleware what order it's supposed to run in with relation to other known middlewares, chances are the middleware system itself is a poor design.
That's just the chain of responsibility pattern [1] and I've only seen middleware operate that way. Why wouldn't you want control over the order?
[1] https://refactoring.guru/design-patterns/chain-of-responsibility https://refactoring.guru/design-patterns/chain-of-responsibi...