Dependency Inversion Principle

When we design software applications we can consider the low level classes which implement basic and primary operations(disk access, network protocols,...) and high level classes which encapsulate complex logic(business flows, ...). The last ones rely on the low level classes. A natural way of implementing such structures would be to write low level classes and once we have them to write the complex high level classes. Since high level classes are defined in terms of others this seems the logical way to do it. But this is not a flexible design. What happens if we need to replace a low level class?
Read More
Read More