For me, it all revolves around this.
Build to last, stronger foundations = powerful castle !
But how? everyone is under a crunching time machine, no one cares how you do it, they all want what is done in the quickest way possible.
Sure, it will save you few bucks at first, but as a wise man said to me. A software is a never ending process, even if it is a simple calculator application. You’ll always get to build and build and build and so on…
Okay, all that, but is loose coupling really matters?
For this, let get into another paradigm. How to measure a software’s code quality?
It’s now how fast you coded it in the first place, but the efficiency of implementing client feedback.
That’s how loose coupling came into all this.
All classes have single responsibility and adding some feedback points of a client in some class won’t disturb other methods. And for some reason you decided to port the class to multiple platforms, you won’t have to reinvent the logic, (yes there are other factors too). But generally speaking, a rule of thumb is.
Loose Coupling = Interfaces = Contracts
So you have defined a contract (interface) which is a set of guidelines, and every class implementing the interface has to obey.
This keeps code maintainability, across multiple plateforms, and assemblies, and for some reason you have revise the complete logic of a class, you just don’t have think the logic what, how , when , where.
Just inherit the interface to another class, the methods are there, implement their logic! easy as a pie… 3.14159 26535 89793 23846 26433 83279 50288 41971 69399 37510 58209 74944 59230 78164 06286 20899 86280 34825 34211 7067