Software design with interfaces only?

A good approach when when developing software, class interactions are described only with interfaces? If so, should I always use this approach?

I need to create a class library that should have a high test ability (I use C #).

This library has one facade and a number of classes with various interactions in the background.

In the case of optimizing this library for a good check, I replaced most of my classes with interfaces.

And when I did this, I saw only interfaces on the connection diagram (Visual Studio class diagram).

Is this a normal solution to my problem? or should there be some other approach?

P / S: Perhaps this is a well-known way of developing software, but I cannot find confirmation in the books that I have.

+5
source share
2 answers

Yes, this is a good practice. This allows you to focus on the responsibilities of each class without worrying about implementation details. This allows you to see the stack of method calls, and, as you say, gives a high level of test and maintainability. As far as I understand, you are on the right track :)

+5
source

All Articles