Hmmm... I guess I'm still not convinced. What I'm talking about using these for, I would never want to mock or inherit from.
I could see your argument that this creates strong coupling, but I would only ever call this code in one place and I would want it to fail at the same time as the rest of my user flow. I'll have to think more about the nature of coupling though. That may win me over in the end.
Learn something new every day.
- I am a senior software engineer working in industry, teaching and writing on software design, SOLID principles, DDD and TDD.
Location
Buenos Aires
Education
Computer Science Degree at Universidad de Buenos Aires
Hmmm... I guess I'm still not convinced. What I'm talking about using these for, I would never want to mock or inherit from.
I could see your argument that this creates strong coupling, but I would only ever call this code in one place and I would want it to fail at the same time as the rest of my user flow. I'll have to think more about the nature of coupling though. That may win me over in the end.
sure !
Coupling is not obvious on small systems.
But it is the infection on larger ones
maximilianocontieri.com/coupling-t...
I'm using this in a 100,000+ line, enterprise scale code base and having great success 😁