3 ms·
I agree. I find this part of the article weird as it has contracting statements: > No port/adapter terms to learn and > we gave it all up in favour of the go
by nogridbag 2y ago
I agree. I find this part of the article weird as it has contracting statements:
> No port/adapter terms to learn
and
> we gave it all up in favour of the good old dependency inversion principle
Both use interfaces, just in different ways. We use hexagonal (ports and adapters) pattern in my project. If you asked anyone on my team to define hexagonal architecture they'll have no idea what you're talking about. They just follow the project coding patterns. There's no additional complexity.
> If you think that such layering will allow you to quickly replace a database or other dependencies, you're mistaken
I think most people do not stay at companies long enough to see the price of not abstracting away these things. That's the next developer's problem. The code tends to be tightly coupled to the libraries and frameworks used. Eventually, the projects dependencies have to be upgraded (usually due to security issues) and the migrations are usually incredibly difficult, expensive, and fragile. The product's business logic is tightly coupled with the framework and libraries used at the time. Even if the company realizes that framework has no future, they're kind of locked into their initial decision made a decade ago. At least, that's been my experience.
We have two major products at my company. Both started with the same initial framework, but the project I architected that used hexagonal was migrated to a faster and more modern framework within 4 weeks. The other product had a multi-year migration to a newer version of the same framework (and by the time it was completed is already two major versions outdated). Both products are similar in scale and code size.