`

One note of Head first design pattern(Command pattern)

阅读更多
I read the sixth chapter of Head first design pattern a few days ago.I want to review it at the present.

    First,here is the official definition.The commond pattern enscuplates a request as a object ,thereby letting you parameterized other objects with the different requests,and support the undo operation.

    This pattern decouple the invoker of a request and a receiver of a request.it encuplates the receiver of the request into the concretecommand object,what'more ,the concrete command class implements the command interface.as this,the invoker only corresponds with the command interface,and doesn't make attention to the receiver,in addition,the invoker also doesn't need to konw how the recevier carry out the request.
   
   The command pattern encuplates the method invocation,that is ,the exceute() method of command interface.and it also show us some oo design principle.such as favor composition than inhertiance,encuplate what varys,strive for the lossly coupling between objects.
分享到:
评论

相关推荐

    Gof design pattern book and note

    《Gof设计模式》是一本深受程序员喜爱的经典书籍,它由Erich Gamma、Richard Helm、Ralph Johnson和John Vlissides四位大师合著,因此常被称为“Gang of Four”(Gof)的设计模式。这本书是软件工程领域中关于面向...

    Analog Circuit Design III - Design Note Collection

    Design Note Collection, the third book in the Analog Circuit Design series, is a comprehensive volume of applied circuit design solutions, providing elegant and practical design techniques. Design ...

    策略模式(headfirst note)

    在Head First的设计模式系列书籍中,"策略模式(headfirst note)"章节深入浅出地介绍了如何使用这种模式来处理复杂的问题,通过将算法家族封装在各自独立的类中,使得它们可以互相替换。这一模式的运用有助于代码的...

    Design and Application Guide of Bootstrap Circuit for High-Voltage Gate-Drive

    本文档,"Design and Application Guide of Bootstrap Circuit for High-Voltage Gate-Drive IC"(AN-6076),由安森美半导体组件有限公司发布,详细介绍了如何设计高性能的自举门驱动电路,特别是针对高频、高压、...

    (英文版)凌力尔特模拟电路设计手册 3-Analog Circuit Design Volume 3 Design Note Collection

    凌力尔特模拟电路设计手册 【分卷3】(英文版)- 应用及解决方案指南丛书,Analog Circuit Design Volume 3 -Design Note Collection Edited by Bob Dobkin Jim Wil

    html note of new coder

    html note of new coder, a little things

    Thomas H Lee THE DESIGN OF LOW NOISE OSCILLATORS

    Thomas H Lee - THE DESIGN OF LOW NOISE OSCILLATORS It is hardly a revelation to note that wireless and mobile communications have grown tremendously during the last few years. This growth has placed ...

    note of classes(1).py

    note of classes(1).py

    Note Of Terror

    《Note Of Terror》是一款独特的字体设计,用于增添恐怖或神秘气氛的文字表现。这款字体在设计时考虑了如何通过视觉效果传达紧张和恐惧的情绪,因此它不仅是一个简单的文字工具,更是一种艺术表达方式。 在设计领域...

    one-note-midi:借助One Note Midi App的强大功能,您可以在自己喜欢的乐器上弹奏任何音符!

    《One Note Midi:让音乐创作触手可及》 在当今数字时代,音乐制作不再局限于专业录音室,而是可以通过各种应用程序轻松实现。其中,“One Note Midi”应用正是这样一款为音乐爱好者和创作者量身定制的工具,它允许...

    Quectel_WCDMA&LTE_Audio_Design_Note_V1.1.pdf

    标题:“Quectel_WCDMA&LTE_Audio_Design_Note_V1.1.pdf” 指明这是一份与Quectel公司相关的技术文档,专注于WCDMA和LTE技术的音频设计笔记。"WCDMA"代表宽带码分多址(Wideband Code Division Multiple Access),...

    问题解决(python)The first lock consists of a panel filled with spark

    diamondsrubies.emeraldsand so onBeside the panel is a row of ...Note that if there is a tie between the most common type of gem(iethere are equal numbers)then more than one button will need to be ...

    读书笔记:Netty权威指南 笔记Note of The Definitive Guide.zip

    读书笔记:Netty权威指南 笔记Note of The Definitive Guide

    cc2430 常用design note

    Design Note通常是指设计者或开发者提供的技术文档,包含深入的技术细节、设计思路、实现方法以及可能遇到的问题和解决方案。在这个"cc2430 常用design note"中,我们可以期待找到关于如何有效利用CC2430芯片进行...

    面部表情识别

    ### 面部表情识别:基于部件分解组合的人脸图像模型 #### 摘要与研究背景 面部表情是人类非言语沟通的重要组成部分,能够传递丰富的情感信息。随着计算机视觉和机器学习技术的发展,对面部表情进行自动化识别成为...

    FA6xx LLC transformer design tool_Rev.2.2_E.xlsx

    The result is an example design of transformer. The result is calculated value. Please evaluate enough, if you apply to actual products. The result by this design tool is reference data for design ...

    Database Processing Fundamentals, Design, and Implementation (12th Edition).rar

    Summary of Minimum Cardinality Design The View Ridge Gallery Database Summary of Requirements The View Ridge Data Model Database Design with Data Keys Minimum Cardinality Enforcement for Required ...

    MT6573 Design Note

    通过阅读《MT6573 Design Notes.pdf》,工程师可以深入理解MT6573平台的各个方面,从而在设计和开发过程中避免常见错误,提高产品的质量和可靠性。这份文档是MTK智能平台开发者的宝贵资源,对提升项目效率和产品性能...

Global site tag (gtag.js) - Google Analytics