Thursday, February 1, 2018

CMV: A discrete interface for every class is arbitrary abstraction that costs more (maintenance/debugging, artifact bloat) than it's worth (design by contract means interface all the things because reasons)

I continually see one-for-one project structures that mirror every concrete with an interface. I'm not saying that proper usage for polymorphism and inheritance should be abandoned. Also, mocking concretes via virtual signatures for unit testing does not destabilize your system or violate O/C Principle. If one is prognosticating the future in every single interface and assuming there will become more implementations that's a waste of your time & your client's money.

"If everything's abstracted, then nothing is." -Syndrome

CMV: A discrete interface for every class is arbitrary abstraction that costs more (maintenance/debugging, artifact bloat) than it's worth (design by contract means interface all the things because reasons) Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team