You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -315,3 +317,13 @@ Curly's Law is about choosing a single, clearly defined goal for any particular
315
317
316
318
*[Curly's Law: Do One Thing](http://blog.codinghorror.com/curlys-law-do-one-thing/)
317
319
*[The Rule of One or Curly’s Law](http://fortyplustwo.com/2008/09/06/the-rule-of-one-or-curlys-law/)
320
+
321
+
## Interface Segregation
322
+
323
+
Reduce fat interfaces into many client specific interfaces. An interfaces should be more dependent on the code that calls it than the code that implements it.
324
+
325
+
Why
326
+
* If a class implements methods that are not needed the caller needs to know about the method implementation of that class. For example if a class implements a method but simply throws then the caller will need to know that this method shouldnt actually be called
327
+
328
+
How
329
+
* Avoid fat interfaces. Classes should never have to implement methods that violate the [Single responsibility principle](#single-responsibility-principle)
0 commit comments