Implementations tightly coupled to their dependencies are difficult to maintain, reuse and test.
In this video, I will show you 5 ways of refactoring with the intent to "break" tight coupling between business logic and dependencies.
Buildable source code: github.com/pla...
Tutorial in written form: platis.solutio...
Contents:
00:45 - Coupled code overview
03:12 - Dependency injection using class hierarchies
04:42 - Dependency injection using class templates
05:41 - Dependency injection using abstract factories
07:14 - Switch dependency implementations during link time
09:21 - Switch dependency implementations using class templates
If you enjoyed the video, please like, subscribe, comment and share the video to promote good programming practices. If you disagree or know of alternatives, leave a comment and I'd love to discuss it further!
Feel like buying me coffee to help me keep creating free videos? Then please do so here: buymeacoff.ee/...
Attribution:
Original thumbnail image taken from www.newscienti...
Негізгі бет 5 ways to decouple business logic from dependencies in C++
Пікірлер: 1