auto commit

This commit is contained in:
CyC2018
2018-03-04 09:51:51 +08:00
parent 15473637d1
commit 13dc31b35b
17 changed files with 249 additions and 249 deletions

View File

@ -32,7 +32,7 @@
需要说明的一点是,文中的 UML 类图和规范的 UML 类图不大相同,其中组合关系使用以下箭头表示:
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//09e398d8-9c6e-48f6-b48b-8b4f9de61d1d.png"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//09e398d8-9c6e-48f6-b48b-8b4f9de61d1d.png"/> </div><br>
# 第一章 设计模式入门
@ -50,7 +50,7 @@
使用继承的解决方案如下,这种方案代码无法复用,如果两个鸭子类拥有同样的飞行方式,就有两份重复的代码。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//144d28a0-1dc5-4aba-8961-ced5bc88428a.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//144d28a0-1dc5-4aba-8961-ced5bc88428a.jpg"/> </div><br>
**4. 设计原则**
@ -60,17 +60,17 @@
运用这一原则,将叫和飞行的行为抽象出来,实现多种不同的叫和飞行的子类,让子类去实现具体的叫和飞行方式。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//1c8ccf5c-7ecd-4b8a-b160-3f72a510ce26.png"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//1c8ccf5c-7ecd-4b8a-b160-3f72a510ce26.png"/> </div><br>
**多用组合,少用继承** 组合也就是 has-a 关系,通过组合,可以在运行时动态改变实现,只要通过改变父类对象具体指向哪个子类即可。而继承就不能做到这些,继承体系在创建类时就已经确定。
运用这一原则,在 Duck 类中组合 FlyBehavior 和 QuackBehavior 类performQuack() 和 performFly() 方法委托给这两个类去处理。通过这种方式,一个 Duck 子类可以根据需要去实例化 FlyBehavior 和 QuackBehavior 的子类对象,并且也可以动态地进行改变。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//29574e6f-295c-444e-83c7-b162e8a73a83.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//29574e6f-295c-444e-83c7-b162e8a73a83.jpg"/> </div><br>
**5. 整体设计图**
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//e13833c8-e215-462e-855c-1d362bb8d4a0.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//e13833c8-e215-462e-855c-1d362bb8d4a0.jpg"/> </div><br>
**6. 模式定义**
@ -185,7 +185,7 @@ FlyBehavior.FlyNoWay
定义了对象之间的一对多依赖当一个对象改变状态时它的所有依赖者都会受到通知并自动更新。主题Subject是被观察的对象而其所有依赖者Observer成为观察者。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//26cb5e7e-6fa3-44ad-854e-fe24d1a5278c.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//26cb5e7e-6fa3-44ad-854e-fe24d1a5278c.jpg"/> </div><br>
**2. 模式类图**
@ -193,7 +193,7 @@ FlyBehavior.FlyNoWay
观察者拥有一个主题对象的引用,因为注册、移除还有数据都在主题当中,必须通过操作主题才能完成相应功能。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//5c558190-fccd-4b5e-98ed-1896653fc97f.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//5c558190-fccd-4b5e-98ed-1896653fc97f.jpg"/> </div><br>
**3. 问题描述**
@ -201,7 +201,7 @@ FlyBehavior.FlyNoWay
**4. 解决方案类图**
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//760a5d63-d96d-4dd9-bf9a-c3d126b2f401.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//760a5d63-d96d-4dd9-bf9a-c3d126b2f401.jpg"/> </div><br>
**5. 设计原则**
@ -325,17 +325,17 @@ StatisticsDisplay.update:1.0 1.0 1.0
下图中 DarkRoast 对象被 Mocha 包裹Mocha 对象又被 Whip 包裹,并且他们都继承自相同父类,都有 cost() 方法,但是外层对象的 cost() 方法实现调用了内层对象的 cost() 方法。因此,如果要在 DarkRoast 上添加 Mocha那么只需要用 Mocha 包裹 DarkRoast如果还需要 Whip ,就用 Whip 包裹 Mocha最后调用 cost() 方法能把三种对象的价格都包含进去。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//41a4cb30-f393-4b3b-abe4-9941ccf8fa1f.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//41a4cb30-f393-4b3b-abe4-9941ccf8fa1f.jpg"/> </div><br>
**3. 模式类图**
装饰者和具体组件都继承自组件类型,其中具体组件的方法实现不需要依赖于其它对象,而装饰者拥有一个组件类型对象,这样它可以装饰其它装饰者或者具体组件。所谓装饰,就是把这个装饰者套在被装饰的对象之外,从而动态扩展被装饰者的功能。装饰者的方法有一部分是自己的,这属于它的功能,然后调用被装饰者的方法实现,从而也保留了被装饰者的功能。可以看到,具体组件应当是装饰层次的最低层,因为只有具体组件有直接实现而不需要委托给其它对象去处理。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//3dc454fb-efd4-4eb8-afde-785b2182caeb.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//3dc454fb-efd4-4eb8-afde-785b2182caeb.jpg"/> </div><br>
**4. 问题解决方案的类图**
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//9c997ac5-c8a7-44fe-bf45-2c10eb773e53.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//9c997ac5-c8a7-44fe-bf45-2c10eb773e53.jpg"/> </div><br>
**5. 设计原则**
@ -343,7 +343,7 @@ StatisticsDisplay.update:1.0 1.0 1.0
**6. Java I/O 中的装饰者模式**
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//2a40042a-03c8-4556-ad1f-72d89f8c555c.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//2a40042a-03c8-4556-ad1f-72d89f8c555c.jpg"/> </div><br>
**7. 代码实现**
@ -428,11 +428,11 @@ public class StartbuzzCoffee {
简单工厂不是设计模式,更像是一种编程习惯。在实例化一个超类的对象时,可以用它的所有子类来进行实例化,要根据具体需求来决定使用哪个子类。在这种情况下,把实例化的操作放到工厂来中,让工厂类来决定应该用哪个子类来实例化。这样做把客户对象和具体子类的实现解耦,客户对象不再需要知道有哪些子类以及实例化哪个子类。因为客户类往往有多个,如果不使用简单工厂,那么所有的客户类都要知道所有子类的细节,一旦子类发生改变,例如增加子类,那么所有的客户类都要发生改变。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//c470eb9b-fb05-45c5-8bb7-1057dc3c16de.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//c470eb9b-fb05-45c5-8bb7-1057dc3c16de.jpg"/> </div><br>
**3. 解决方案类图**
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//dc3e704c-7c57-42b8-93ea-ddd068665964.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//dc3e704c-7c57-42b8-93ea-ddd068665964.jpg"/> </div><br>
**4. 代码实现**
@ -503,11 +503,11 @@ CheesePizza
可以为每个子类创建单独的简单工厂来创建每一个产品类,但是把简单工厂中创建对象的代码放到子类中来可以减少类的数目,因为子类不算是产品类,因此完全可以这么做。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//903093ec-acc8-4f9b-bf2c-b990b9a5390c.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//903093ec-acc8-4f9b-bf2c-b990b9a5390c.jpg"/> </div><br>
**4. 解决方案类图**
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//664f8901-5dc7-4644-a072-dad88cc5133a.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//664f8901-5dc7-4644-a072-dad88cc5133a.jpg"/> </div><br>
**5. 代码实现**
@ -611,7 +611,7 @@ ChicagoStyleCheesePizza is making..
**依赖倒置原则**:要依赖抽象,不要依赖具体类。听起来像是针对接口编程,不针对实现编程,但是这个原则说明了:不能让高层组件依赖底层组件,而且,不管高层或底层组件,两者都应该依赖于抽象。例如,下图中 PizzaStore 属于高层组件,它依赖的是 Pizza 的抽象类,这样就可以不用关心 Pizza 的具体实现细节。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//ddf72ca9-c0be-49d7-ab81-57a99a974c8e.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//ddf72ca9-c0be-49d7-ab81-57a99a974c8e.jpg"/> </div><br>
**2. 模式定义**
@ -621,11 +621,11 @@ ChicagoStyleCheesePizza is making..
抽象工厂模式创建的是对象家族也就是很多对象而不是一个对象并且这些对象是相关的也就是说必须一起创建出来。而工厂模式只是用于创建一个对象这和抽象工厂模式有很大不同。并且抽象工厂模式也用到了工厂模式来创建单一对象在类图左部AbstractFactory 中的 CreateProductA 和 CreateProductB 方法都是让子类来实现,这两个方法单独来看就是在创建一个对象,这符合工厂模式的定义。至于创建对象的家族这一概念是在 Client 体现Client 要通过 AbstractFactory 同时调用两个方法来创建出两个对象在这里这两个对象就有很大的相关性Client 需要这两个对象的协作才能完成任务。从高层次来看,抽象工厂使用了组合,即 Cilent 组合了 AbstractFactory ,而工厂模式使用了继承。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//d301774f-e0d2-41f3-95f4-bfe39859b52e.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//d301774f-e0d2-41f3-95f4-bfe39859b52e.jpg"/> </div><br>
**4. 解决方案类图**
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//8785dabd-1285-4bd0-b3aa-b05cc060a24a.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//8785dabd-1285-4bd0-b3aa-b05cc060a24a.jpg"/> </div><br>
**5. 代码实现**
@ -746,7 +746,7 @@ MarinaraSauce
使用一个私有构造器、一个私有静态变量以及一个公有静态函数来实现。私有构造函数保证了不能通过构造函数来创建对象实例,只能通过公有静态函数返回唯一的私有静态变量。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//59aff6c1-8bc5-48e4-9e9c-082baeb2f274.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//59aff6c1-8bc5-48e4-9e9c-082baeb2f274.jpg"/> </div><br>
**3. 懒汉式-线程不安全**
@ -828,9 +828,9 @@ public class Singleton {
有非常多的家电,并且之后会增加家电。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//7b8f0d8e-a4fa-4c9d-b9a0-3e6a11cb3e33.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//7b8f0d8e-a4fa-4c9d-b9a0-3e6a11cb3e33.jpg"/> </div><br>
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//c3ca36b2-8459-4cf1-98b0-cc95a0e94f20.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//c3ca36b2-8459-4cf1-98b0-cc95a0e94f20.jpg"/> </div><br>
**2. 模式定义**
@ -846,11 +846,11 @@ public class Singleton {
- RemoteLoader 是客户端,注意它与 RemoteControl 的区别。因为 RemoteControl 不能主动地调用自身的方法,因此也就不能当成是客户端。客户端好比人,只有人才能去真正去使用遥控器。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//5ef94f62-98ce-464d-a646-842d9c72c8b8.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//5ef94f62-98ce-464d-a646-842d9c72c8b8.jpg"/> </div><br>
**4. 模式类图**
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//1e09d75f-6268-4425-acf8-8ecd1b4a0ef3.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//1e09d75f-6268-4425-acf8-8ecd1b4a0ef3.jpg"/> </div><br>
**5. 代码实现**
@ -939,15 +939,15 @@ Light is on!
将一个类的接口,转换为客户期望的另一个接口。适配器让原本不兼容的类可以合作无间。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//8e8ba824-7a9e-4934-a212-e6a41dcc1602.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//8e8ba824-7a9e-4934-a212-e6a41dcc1602.jpg"/> </div><br>
**2. 模式类图**
有两种适配器模式的实现一种是对象方式一种是类方式。对象方式是通过组合的方法让适配器类Adapter拥有一个待适配的对象Adaptee从而把相应的处理委托给待适配的对象。类方式用到多重继承Adapter 继承 Target 和 Adaptee先把 Adapter 当成 Adaptee 类型然后实例化一个对象,再把它当成 Target 类型的,这样 Client 就可以把这个对象当成 Target 的对象来处理,同时拥有 Adaptee 的方法。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//253bd869-ea48-4092-9aed-6906ccb2f3b0.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//253bd869-ea48-4092-9aed-6906ccb2f3b0.jpg"/> </div><br>
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//a797959a-0ed5-475b-8d97-df157c672019.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//a797959a-0ed5-475b-8d97-df157c672019.jpg"/> </div><br>
**3. 问题描述**
@ -957,7 +957,7 @@ Light is on!
**4. 解决方案类图**
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//1a511c76-bb6b-40ab-b8aa-39eeb619d673.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//1a511c76-bb6b-40ab-b8aa-39eeb619d673.jpg"/> </div><br>
**5. 代码实现**
@ -1021,17 +1021,17 @@ gobble!
**2. 模式类图**
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//78f2314e-2643-41df-8f3d-b7e28294094b.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//78f2314e-2643-41df-8f3d-b7e28294094b.jpg"/> </div><br>
**3. 问题描述**
家庭影院中有众多电器,当要进行观看电影时需要对很多电器进行操作。要求简化这些操作,使得家庭影院类只提供一个简化的接口,例如提供一个看电影相关的接口。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//106f5585-b2e7-4718-be5d-3b322d1ef42a.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//106f5585-b2e7-4718-be5d-3b322d1ef42a.jpg"/> </div><br>
**4. 解决方案类图**
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//25387681-89f8-4365-a2fa-83b86449ee84.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//25387681-89f8-4365-a2fa-83b86449ee84.jpg"/> </div><br>
**5. 设计原则**
@ -1053,19 +1053,19 @@ gobble!
模板方法 templateMethod() 定义了算法的骨架,确定了 primitiveOperation1() 和 primitiveOperation2() 方法执行的顺序,而 primitiveOperation1() 和 primitiveOperation2() 让子类去实现。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//ed62f400-192c-4185-899b-187958201f0c.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//ed62f400-192c-4185-899b-187958201f0c.jpg"/> </div><br>
**3. 问题描述**
冲咖啡和冲茶都有类似的流程,但是某些步骤会有点不一样,要求复用那些相同步骤的代码。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//d8f873fc-00bc-41ee-a87c-c1b4c0172844.png"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//d8f873fc-00bc-41ee-a87c-c1b4c0172844.png"/> </div><br>
**4. 解决方案类图**
其中 prepareRecipe() 方法就是模板方法,它确定了其它四个方法的具体执行步骤。其中 brew() 和 addCondiments() 方法在子类中实现。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//aa20c123-b6b5-432a-83d3-45dc39172192.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//aa20c123-b6b5-432a-83d3-45dc39172192.jpg"/> </div><br>
**5. 设计原则**
@ -1171,7 +1171,7 @@ Tea.addCondiments
- Client 需要拥有一个 Aggregate 对象,这是很明显的。为了迭代变量 Aggregate 对象,也需要拥有 Iterator 对象。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//439deca7-fed0-4c89-87e5-7088d10f1fdb.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//439deca7-fed0-4c89-87e5-7088d10f1fdb.jpg"/> </div><br>
**3. 代码实现**
@ -1331,7 +1331,7 @@ public class Client {
组合类拥有一个组件对象,因此组合类的操作可以委托给组件对象去处理,而组件对象可以是另一个组合类或者叶子类。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//f99c019e-7e91-4c2e-b94d-b031c402dcb5.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//f99c019e-7e91-4c2e-b94d-b031c402dcb5.jpg"/> </div><br>
**4. 代码实现**
@ -1444,7 +1444,7 @@ Composite:root
Context 的 request() 方法委托给 State 对象去处理。当 Context 组合的 State 对象发生改变时,它的行为也就发生了改变。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//c28fd93a-0d55-4a19-810f-72652feee00d.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//c28fd93a-0d55-4a19-810f-72652feee00d.jpg"/> </div><br>
**3. 与策略模式的比较**
@ -1460,7 +1460,7 @@ Context 的 request() 方法委托给 State 对象去处理。当 Context 组合
糖果销售机有多种状态,每种状态下销售机有不同的行为,状态可以发生转移,使得销售机的行为也发生改变。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//f7d880c9-740a-4a16-ac6d-be502281b4b2.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//f7d880c9-740a-4a16-ac6d-be502281b4b2.jpg"/> </div><br>
**5. 直接解决方案**
@ -1468,7 +1468,7 @@ Context 的 request() 方法委托给 State 对象去处理。当 Context 组合
这种解决方案在需要增加状态的时候,必须对每个操作的代码都进行修改。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//62ebbb63-8fd7-4488-a866-76a9dc911662.png"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//62ebbb63-8fd7-4488-a866-76a9dc911662.png"/> </div><br>
**6 代码实现**
@ -1761,13 +1761,13 @@ No gumball dispensed
视图使用组合模式,模型使用了观察者模式,控制器使用了策略模式。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//4f67611d-492f-4958-9fa0-4948010e345f.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//4f67611d-492f-4958-9fa0-4948010e345f.jpg"/> </div><br>
**Web 中的 MVC**
模式不再使用观察者模式。
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//1dd56e61-2970-4d27-97c2-6e81cee86978.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//1dd56e61-2970-4d27-97c2-6e81cee86978.jpg"/> </div><br>
# 第十三章 与设计模式相处
@ -1779,6 +1779,6 @@ No gumball dispensed
模式分类:
<div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//524a237c-ffd7-426f-99c2-929a6bf4c847.jpg"/> </div><br>
<br><div align="center"> <img src="https://github.com/CyC2018/InterviewNotes/blob/master/pics//524a237c-ffd7-426f-99c2-929a6bf4c847.jpg"/> </div><br>
# 第十四章 剩下的模式