Skip to content

Commit

Permalink
Merge pull request #19 from mjlmton/patch-1
Browse files Browse the repository at this point in the history
Update interface_segregation.md
  • Loading branch information
zq99299 authored May 24, 2024
2 parents 6654663 + 1a5b62c commit 82e23b0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

**定义**:用多个专门的接口,而不使用单一的总接口,客户端不应该依赖它不需要的接口

* 一个类(泛指)对一个类的依赖应该建立在虚小的接口上
* 一个类(泛指)对一个类的依赖应该建立在虚小的接口上
* 建立单一接口,不要建立庞大臃肿的接口
* 尽量细化接口,接口中的方法尽量少
* **注意湿度原则,一定要适度**
* **注意适度原则,一定要适度**

如果只是尽可能的一个接口一个方法的话,那么接口类将爆炸,复杂性更高

Expand Down

0 comments on commit 82e23b0

Please sign in to comment.