Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Robert C. Martin introduced the Dependency Inversion Principle in his C++ Report and later in his classic book “Agile Software Development.”9 In his book, Martin defined the DIP as
The simple version of this is: don’t depend on concrete classes; depend on abstractions. Martin’s contention is that object-oriented design is the inverse of traditional structured design. In structured design as we saw in Chapter 7, one either works from the top-down, pushing details and design decisions as low in the hierarchy of software layers as possible. Or one works from the bottom-up, designing low-level details first, and later putting together a set of low-level functions into a single higher-level abstraction. In both these cases, the higher level software depends on decisions that are made at the lower levels, including interface and behavioral decisions.