大话设计模式ppt

简介 相关

截图

大话设计模式ppt

简介

这是大话设计模式ppt,包括了引言,来源:建筑学,从建筑学到软件设计,设计模式的目的,为什么设计模式?什么是设计模式?有哪些设计模式?实例,模式的应用前景等内容,欢迎点击下载。

大话设计模式ppt是由红软PPT免费下载网推荐的一款课件PPT类型的PowerPoint.

软件工程新技术 设计模式 宁夏医科大学 理学院 杨德仁 大纲 引言 来源:建筑学 从建筑学到软件设计 设计模式的目的 为什么设计模式? 什么是设计模式? 有哪些设计模式? 实例 模式的应用前景 The OO Design Pyramid 引言 面向对象 通过抽象、封装、继承和多态降低程序的耦合度 但如何使得这类程序更加灵活、具有自适应性、易于复用? 设计模式 Mainly used in Object Oriented programming Designers reuse solutions, preferably the good ones Experience is what makes one an ‘expert’ Problems are addressed without rediscovering solutions from scratch. “My wheel is rounder also” 引言 好形对围棋非常重要, 形是棋子在棋盘上的几何形状的抽象化, 形是一种模式, 模式化过程旨在把问题抽象化。 引言 Becoming a Software Design Master First learn the rules – e.g., the algorithms, data structures and languages of software Then learn the principles – e.g., structured programming, modular programming, object oriented programming, generic programming, etc. Software engineering, such as software design and implementing. However, to truly master software design, one must study the designs of other masters These designs contain patterns must be understood, memorized, and applied repeatedly There are hundreds of these patterns 来源:建筑学 设计模式产生于建筑学和人类学 Christopher Alexander:质量可以客观评价吗? Alexander, C., Ishikawa, S., Silverstein, M., The Timeless Way of Building, New York: Oxford University Press,1979. 模式的定义:在某一个情景(Context)下问题(Problem)的解决方案(Solution)。 通过可以使用无数次的解决方案、而不必重复的工作方式,模式描述在环境中重复出现的问题及其解决方案。 模式 Alexander发现优质设计的相似之处,并把这些相似之处称为模式。 模式是不断重重复发生,而有其重复性。 重复的不是问题本身,而是问题本质, 把不同问题以相同的模式来处理,势必要提取其本质,也是一种抽象。 研究模式必須重视问题本质而非问题表象。同样问题的背景、环境及解決之道在抽象层次上也是一致的。 来源 Alexander 指出,模式的说明应该包括: 模式名称(Pattern Name):助记名、词汇(描述模式的问题、解决方案和效果)。便于交流和思考,找到恰当的模式名称也是设计模式编目的难点之一。 问题(Problem):描述何时使用模式。 解决方案(Solution):描述设计的组成成分,相互关系及各自职责和写作方式(抽象级别上的,针对一般设计问题)。 效果(Consequences):描述模式应用的效果及使用模式应权衡的问题(时空、灵活性、扩充性、可移植性) 。 来源 复用解决方案:通过复用已经建立的设计,为问题找到更高的起点并避免绕弯路。受益于学习别人的经验。不必再为普通、重复性问题重新设计解决方案。 建立通用的术语:交流与协作都需要共同的词汇、对问题的共同观点。设计模式在项目的分析和设计阶段提供了一个通用参考点。 更高的分析和设计的视角:在问题上、在设计和面向对象的过程中, 模式具有更高层次的视角。这种视角将设计者从“过早处理细节”(与抽象和建模相反) 中解放出来。 从建筑学转移到软件设计模式 Developing software is hard Developing reusable software is even harder Question 软件中是否有反复出现、可以用某种相同方式解决的问题? 是否可首先识别出模式,然后在模式的基础上创建特定的解决方案”,即按模式来设计软件? GOF:四人团、四人帮。Gamma、Helm、Johnson、Vlissides 《Design Patterns: Elements of Reusable Object-Oriented Software》, Addison-Wesley. 设计模式:可复用面向对象软件的基础,机械工业出版社, 2000 年。 将设计模式的思想应用于软件设计。 描述收录和描述设计模式的一个结构。 收录了23 个模式。 在这些模式的基础上提出了面向对象策略及方法的原则。 方案:模式与框架 Proven solutions include patterns and frameworks Recommended Reading Recommended Reading Recommended Reading and Lecture Sources “Design Patterns: Elements of Reusable Object-Oriented Software” by Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides “Refactoring to Patterns” by Joshua Kerievsky – http://www.industriallogic.com “Head First Design Patterns” by Eric Freeman & Elisabeth Freeman with Kathy Sierra & Bert Bates “Object-Oriented Design Heuristics” by Arthur J.Riel 大话设计模式 如同水煮三国、明朝那些事 什么是设计模式? The recurring aspects of designs are called design patterns. A pattern is the outline of a reusable solution to a general problem encountered in a particular context Many of them have been systematically documented for all software developers to use, and a good pattern should: Be as general as possible Contain a solution that has been proven to effectively solve the problem in the indicated context. Studying patterns is an effective way to learn from the experience of others 什么是设计模式? What are Design Patterns? Recurring solutions to design problems you see over and over. A set of rules describing how to accomplish certain tasks in the realm of software development. Focus on reuse of recurring architectural design themes Address a recurring design problem that arises in a specific context and presents a solution to it Design patterns represent solutions to problems that arise when developing software within a particular context – i.e., “Patterns == problem/solution pairs in a context” Patterns capture the static and dynamic structure and collaboration among key participants in software designs – They are particularly useful for articulating how and why to resolve non-functional forces Patterns facilitate reuse of successful software architectures and designs 什么是设计模式? Patterns facilitate reuse of successful software architectures and design Not code reuse Instead, solution/strategy reuse Sometimes, interface reuse Best practices “Patterns are discovered, not invented” Richard Helm Most design patterns focus on OO Assume inheritance, polymorphism, encapsulation, etc. In procedural languages, might add OO features as “patterns” 什么是设计模式? A pattern is a proven solution to a problem in a context. Christopher Alexander says each pattern is a three-part rule which expresses a relation between a certain context, a problem, and a solution. Design patterns represent a solutions to problems that arise when developing software within a particular context. i.e Patterns =DV5红软基地

展开

同类推荐

热门PPT

相关PPT