Quantcast
Channel: What does "program to interfaces, not implementations" mean? - Stack Overflow
Viewing all articles
Browse latest Browse all 9

Answer by Felipe Tuyama for What does "program to interfaces, not implementations" mean?

$
0
0

"Program to interfaces, not implementations" is a design principle associated with the Gang of Four, a group of authors who wrote 'Design Patterns: Elements of Reusable Object-Oriented Software'

The main idea is that your code should be designed to depend on abstract interfaces instead of a concrete implementation.

If you have a cache interface, for example, your application will consume it without worrying if it's a memory, file or redis cache implementation behind it.


Viewing all articles
Browse latest Browse all 9

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>