Refactoring: extract interface
Extract interface is one of the most common refactoring techniques. Motivation behind extract interface refactoring method is to avoid direct dependencies between classes. Instead of using classes in method calls we use interfaces so we can also use subclasses of those classes we used before. Also we can create brand new classes that use follow these interfaces and we can use these classes instead of current ones.
NB! This blog is moved to gunnarpeipman.com
Click here to go to article