Layered architectures were good, until they weren’t. Someone said ORMs, and we were tearing out our SQL statements in favor of magic.
ORMs were good, until they weren’t. You couldn’t use the generated entities in your presentation layers, because they knew too much. Someone said DTOs.
DTOs were good, until they weren’t. You now had an explosion of Entities and their matching DTOs. Someone said model-mapping.
Model-mapping was good, until it wasn’t. It was too cumbersome to manually translate properties. Someone said convention-based auto-mapping.
Auto-mapping was good, until it wasn’t. Conventions grew large and cumbersome. ORMs got bloated. Someone said Repository Pattern.
Repository Pattern was good, until it wasn’t. We created abstractions for abstractions. An elderly relative said SOLID and TDD.
SOLID was good, until it wasn’t. We got so afraid of having components talk to each other directly, we created yet more layers of indirection between them. Someone said dependency injection containers.
DI containers were good, until they weren’t. It was so easy to wire-up dependencies, we didn’t care about where they came from. But containers needed interfaces to work properly, so for every Dependency we automatically created a corresponding IDependency. Our projects now take 6 minutes to build, all the refactoring tools break, since they don’t know where class instances are instantiated. More tools are required to handle magic.
TDD was good, until it wasn’t. With all those interfaces around, we needed something to help us “isolate” our “units” (whatever that means). Someone said Mocking frameworks…
We make fun of JavaScript people for their left-pads and npm-induced hell, but what about us? We have only ourselves to blame for this OO insanity we have created.
No wonder so many people are seeking refuge elsewhere.