|
|
|
|
|
by tomck
703 days ago
|
|
No, this is how everyone incompetent designs systems Layers of generic APIs required to be 1000x more complex than would be required if they were just coupled to the layer above Changing requirements means tunneling data through many layers Layers are generic, which means either you tightly couple your APIs for the above-layer's use case, or your API will limit the performance of your system Everyone who thinks they can design systems does it this way, then they end up managing a system that runs 10x slower than it should + complaining about managers changing requirements 'at the last minute' |
|
The point of abstraction is to limit blast radius of requirement changes.
Someone decides to rename field in API? You don't need to change your database schema and 100500 microservices on top of it. You just change DTO object and keep old name in the other places. May be you'll change old name some day, but you can do it in small steps.
If your layer repeats another layer, why is it a layer in the first place? The point of layer is to introduce abstraction and redirection. There's cost and there's gain.
Every problem can be solved by introducing another layer of indirection. Except the problem of having too many layers of indirection.