Return to book
Review this book
About the author
Introduction
1.
Singleton Pattern
2.
Strategy Pattern
3.
Command Pattern
4.
Observer Pattern
5.
Adapter Pattern
6.
Basic
7.
Factory Pattern
Powered by
GitBook
A
A
Serif
Sans
White
Sepia
Night
Twitter
Google
Facebook
Weibo
Instapaper
Design Patterns
Command Pattern
Description
調用封裝的方法
通常是用來完成一些"命令", 例如:
使用者認證
一連串的表單進行
叫狗坐在貓身上
常用來封裝演算法
常用來處理棘手的操作
Role
發出命令的物件(Invoker)
命令的物件(command)
執行命令的物件(receiver)