Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f1a1174

Browse filesBrowse files
committed
2020.08.07
1 parent 889aa3a commit f1a1174
Copy full SHA for f1a1174

2 files changed

+8-8Lines changed: 8 additions & 8 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Cute-JavaScript/Cute-Patterns/11.《JavaScript 模式》知识点整理(下).md‎

Copy file name to clipboardExpand all lines: Cute-JavaScript/Cute-Patterns/11.《JavaScript 模式》知识点整理(下).md
+4-4Lines changed: 4 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -448,12 +448,12 @@ setTimeout(function(){
448448

449449
#### 2.4两者优缺点
450450
**相同优点:**
451-
* 都可以一对多
452-
* 程序便于扩展
451+
* 都可以一对多
452+
* 程序便于扩展
453453

454454
**不同优点:**
455-
* 观察者模式:单向解耦,发布者不需要清楚订阅者何时何地订阅,只需要维护订阅队列,发送消息即可
456-
* 发布订阅模式:双向解耦,发布者和订阅者都不用清楚对方,全部由订阅中心做处理
455+
* 观察者模式:单向解耦,发布者不需要清楚订阅者何时何地订阅,只需要维护订阅队列,发送消息即可
456+
* 发布订阅模式:双向解耦,发布者和订阅者都不用清楚对方,全部由订阅中心做处理
457457

458458
**缺点:**
459459
* 如果一个被观察者和多个观察者的话,会增加维护的难度,并且会消耗很多时间。
Collapse file

‎Cute-JavaScript/Cute-Patterns/9.观察者模式(Observer).md‎

Copy file name to clipboardExpand all lines: Cute-JavaScript/Cute-Patterns/9.观察者模式(Observer).md
+4-4Lines changed: 4 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434

3535
#### 2.4两者优缺点
3636
**相同优点:**
37-
* 都可以一对多
38-
* 程序便于扩展
37+
* 都可以一对多
38+
* 程序便于扩展
3939

4040
**不同优点:**
41-
* 观察者模式:单向解耦,发布者不需要清楚订阅者何时何地订阅,只需要维护订阅队列,发送消息即可
42-
* 发布订阅模式:双向解耦,发布者和订阅者都不用清楚对方,全部由订阅中心做处理
41+
* 观察者模式:单向解耦,发布者不需要清楚订阅者何时何地订阅,只需要维护订阅队列,发送消息即可
42+
* 发布订阅模式:双向解耦,发布者和订阅者都不用清楚对方,全部由订阅中心做处理
4343

4444
**缺点:**
4545
* 如果一个被观察者和多个观察者的话,会增加维护的难度,并且会消耗很多时间。

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.