參考文章來源:
http://www.docin.com/p-87219490.html http://kaixuan489577823.iteye.com/blog/662864 一、struts1主要用到的設計模式:
1.Straegy策略模式
2.singletom單例模式
3.command命令模式
4.Facade外觀模式
5.composite view組成模式
6.decorator裝飾模式
7.MVC模式
二、spring主要用到的設計模式:
1.簡單工廠即靜態工廠模式Static Factory Method
2.工廠模式Factory Method
3.單例模式Singleton
4.適配器Adapter
5.裝飾器Decorator
6.代理Proxy
7.觀察者Observer
8.策略Strategy
9.模板方法Template Method
三、struts2主要用到的模式:
1.MVC模式
2.command命令模式
3.代理Proxy
4.適配器Adapter
5.單例模式Singleton
6.
職責鏈模式 Chain of Responsibility GoF設計模式的分類:
根據目的準則分類:
1. 創建型:creational 與對象的創建有關。
2. 結構型:Structural 處理類或對象之間的組合。
3. 行為型:behavioral 描述類或對象如何交互及如何分配職責。
創建型模式
1.抽象工廠模式 AbstractFactory
2.建造者模式 Builder
3.工廠方法模式 Factory Method
4.原型模式 Prototype
5.單例模式 Singleton
結構型模式
1.適配器模式 Adapter
2.橋接模式 Bridge
3.組合模式 Composite
4.裝飾模式 Decorator
5.外觀模式 Facade
6.享元模式 Flyweight
7.代理模式 Proxy
行為模式
1.職責鏈模式 Chain of Responsibility
2.命令模式 Command
3.解釋器模式 Interpreter
4.迭代器模式 Iterator
5.中介者模式 Mediator
6.備忘錄模式 Memento
7.觀察者模式 Observer
8.狀態模式 State
9.策略模式 Strategy
10.模板方法模式 Template Method
11.訪問者模式 Visitor
Gavin