Code Smell 61 - Coupling to Classes
Classes are handy. We can call them and invoke them any time. Is this good?
Problems
Coupling
Extensibility
Hard to mock
Solutions
Use interfaces or traits (if available).
Use Dependency Injection.
Favor Loose Coupling.
Sample Code
Wrong
ht...
maximilianocontieri.com3 min read
Tapas Adhikary
Educator @tapaScript | Founder CreoWis & ReactPlay - Writer - YouTuber - Open Source
I am learning a lot by following the series. To be honest, I have not internalized all of it but I understand most of it and try to find references in the code. Good Job, Maxi Contieri.