惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
Cisco Talos Blog
Cisco Talos Blog
C
Check Point Blog
博客园_首页
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Martin Fowler
Martin Fowler
Recorded Future
Recorded Future
S
Security @ Cisco Blogs
L
LINUX DO - 最新话题
博客园 - 司徒正美
P
Privacy International News Feed
G
Google Developers Blog
I
Intezer
Hacker News - Newest:
Hacker News - Newest: "LLM"
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
C
Cybersecurity and Infrastructure Security Agency CISA
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Scott Helme
Scott Helme
K
Kaspersky official blog
I
InfoQ
Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
Webroot Blog
Webroot Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
大猫的无限游戏
大猫的无限游戏
D
Docker
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
Microsoft Azure Blog
Microsoft Azure Blog
Spread Privacy
Spread Privacy
量子位
H
Hacker News: Front Page
Simon Willison's Weblog
Simon Willison's Weblog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
SecWiki News
SecWiki News
S
Security Affairs
Latest news
Latest news
人人都是产品经理
人人都是产品经理
C
CERT Recently Published Vulnerability Notes
S
Security Archives - TechRepublic
V
Visual Studio Blog
T
Troy Hunt's Blog
S
Secure Thoughts
F
Fortinet All Blogs
V
V2EX
The Register - Security
The Register - Security
J
Java Code Geeks
MongoDB | Blog
MongoDB | Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

博客园 - 夜雨竹林

asp mvc3资料 设计模式之模板方法和策略模式的区别(二) 面向对象的分析和设计遵循的原则 设计模式之模板方法和策略模式的区别(一) 系统分析师网上内容推荐 英语学习资料 Repository模式 战略性设计之上下文 moq英文官方资料 moq中文介绍 领域驱动设计软件核心复杂性应对之道速查 UML用例图中包含(include)、扩展(extend)和泛化(generalization)三种 领域驱动设计软件核心复杂性应对之道 研究 asp.net mvc2 ajax 原理 - 夜雨竹林 studyurl - 夜雨竹林 aspdotnet部分资源 Asp.net MVC权限设计思考 asp.net小技巧 标准的ASP.NET名称空间
设计模式之命令模式
夜雨竹林 · 2011-07-25 · via 博客园 - 夜雨竹林

一、适用范围

1.抽象出待执行的动作以参数化某对象,适用过程语言中的回调函数表达这种参数化的机制。所谓的回调函数指函数先在某处注册,而他将在稍后的某个需要的时候被调用。Command模式是回调机制的一个面向对象的替代品。

2.在不同的时刻指定、排列和执行的请求。

3.支持取消操作。(undo函数)

4.支持修改日志,这样当系统崩溃时这些修改可以被重新作一遍。

5.用构建在原语操作上的高层操作构造一个系统。这样一种结构支持事务的信息系统中很常见。