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/archive/2010/10/26/1861460.html