April 2018
Intermediate to advanced
300 pages
7h 41m
English
The Interface Segregation principle states that the client code should only depend on the things the client use and should not depend on anything they do not use. This means you cannot force client code to depend on certain methods which are not required.
Let's take an example that first violates the Interface Segregation principle:

In the preceding diagram, we have the ILogger interface that contains two methods, namely WriteLog and GetLogs. The ConsoleLogger class writes the message into the application console window, whereas the DatabaseLogger class stores the message into the database. The ConsoleLogger ...
Read now
Unlock full access