using the dependency injection pattern..

Coding to well-defined interfaces, particularly when using the dependency injection pattern, is the key to achieving loose coupling. By coupling an object to an interface instead of a specific implementation, you have the ability to use any implementation with minimal change and risk.
原文地址:https://www.cnblogs.com/silva/p/1861460.html