关闭

设计模式-Design Patterns

579人阅读 评论(0) 收藏 举报

今天开始读设计模式-可复用面向对象软件的基础(Design Patterns-elements of reusable Object-Oriented Software)

这本书第一次的提出设计模式,经典的23种设计模式,他们总结别人用到的设计模式,并进行讲解.
2012.6.7

听说设计模式可以用于任何场合,不管面向对象和面向过程的,还有人拿设计模式这本书中的话作为依据,但是我看了Introduction 部分,发现这么几句:

1. The purpose of this book is to record experience in designing object-oriented software as design patterns. Each design pattern systematically names, explains, 
and evaluates an important and recurring design in object-oriented systems. Our goal is to capture design experience in a form that people can use effectively. 
To this end we have documented some of the most important design patterns and present them as a catalog. 

2. None of the design patterns in this book describes new or unproven designs. We have included only designs that have been applied more than once in different 
systems. Most of these designs have never been documented before. They are either part of the folklore of the object-oriented community or are elements of some 
successful object-oriented systems—neither of which is easy for novice designers to learn from. So although these designs aren't new, we capture them in a new 
and accessible way: as a catalog of design patterns having a consistent format. 

3. Despite the book's size, the design patterns in it capture only a fraction of what an expert might know. It doesn't have any patterns dealing with concurrency 
or distributed programming or real-time programming. It doesn't have any application domain-specific patterns. It doesn't tell you how to build user 
interfaces, how to write device drivers, or how to use an object-oriented database. Each of these areas has its own patterns, and it would be worthwhile for someone 
to catalog those too. 

4. Although design patterns describe object-oriented designs, they are based on practical solutions that have been implemented in mainstream object-oriented 
programming languages like Smalltalk and C++ rather than procedural languages (Pascal, C, Ada) or more dynamic object-oriented languages (CLOS, Dylan, Self). 
We chose Smalltalk and C++ for pragmatic reasons: Our day-to-day experience has been in these languages, and they are increasingly popular. 

可见这本书中的设计模式应该是面向对象设计的,应该不是用于C语言这种面向过程的!!

找到另外一本书 :design pattern for embedded system in c,中文译本为C嵌入式编程设计模式,读一读,看一看!

2012.6.8
5.Design Pattern根据purpose和scope来分类.
6.Object composition is an alternative to class inheritance. Here, new functionality 
is obtained by assembling or composing objects to get more complex functionality. 
Object composition requires that the objects being composed have well-defined 
interfaces. This style of reuse is called black-box reuse, because no internal 
details of objects are visible. Objects appear only as "black boxes."
7.Object composition is defined dynamically at run-time through objects acquiring 
references to other objects. 
第二章 A case study
1. 想到编写一个图形和文本混合编辑的处理程序,都是很麻烦的。简单的文本处理程序,像notepad++都是如此的难写,需要付出多大的努力。
2. 这章讲述一个文本编辑器设计中,如何使用设计模式。真的不错,但是看得不太明白。
3. 感觉架构设计比较粗,而设计模式比较细,是关于如何具体实现的。先架构设计,然后具体实施时使用设计模式。
第三章 Creational Patterns
1. 
2012.12.13

0
0
查看评论

设计模式 - Design Patterns

设计模式四人组 GoF(“四人帮”,又称Gang of Four,即Erich Gamma、Richard Helm、Ralph Johnson和John Vlissides四人)1. 起源GoF的《Design Patterns: Elements of Reusable Object-Or...
  • u010297957
  • u010297957
  • 2016-03-29 23:20
  • 1047

什么是设计模式?(Design pattern)--和生活结合更好理解

什么是设计模式 一套被反复使用、多数人知晓的、经过分类编目的、代码 设计经验 的总结;使用设计模式是为了 可重用 代码、让代码 更容易 被他人理解、保证代码 可靠性;设计模式使代码编制  真正工程化;设计模式使软件工程的 基石脉络, 如同大厦的结构一样;并不直接用来完成代码的编写,而是...
  • guo13313
  • guo13313
  • 2017-04-09 07:50
  • 947

java设计模式(Design Patterns)

设计模式(Design Patterns)                      &#...
  • zhihui1017
  • zhihui1017
  • 2015-11-09 10:54
  • 1402

Head First Design Patterns(深入浅出设计模式)-目录

目录 序 你的大脑是如何理解设计模式的?此时,你正在设法学习些知识,而你的大脑要通过确认这些知识来给你提供支持。你的大脑在想:“最好出去做些更重要的事情,就象消灭野兽或者光着身子滑雪不是个好主意”。所以你要怎么样让你的大脑认为你的生死存亡都依赖于设计模式的知识? 1.Welcome to ...
  • leiyifight
  • leiyifight
  • 2013-06-24 22:41
  • 961

Head First Design Patterns影印版和中文版

深入浅出设计模式(影印版)http://www.oreilly.com.cn/book.php?bn=7-5641-0165-2Head First设计模式(中文版)http://www.oreilly.com.cn/book.php?bn=978-7-5083-5393-7 
  • ddkiller
  • ddkiller
  • 2007-10-15 08:42
  • 739

java设计模式大全 Design pattern samples in Java(最经典最全的资料)

Design pattern samples in Java.Build status:IntroductionDesign patterns are formalized best practices that the programmer can use to solve common prob...
  • changemyself
  • changemyself
  • 2015-06-19 13:10
  • 10376

Java基础学习总结——Java23种设计模式(Design Patterns)详解

设计模式(Design Patterns)                      &...
  • benmingshimangseng
  • benmingshimangseng
  • 2016-10-21 10:41
  • 422

Design Patterns Elements of Reusable Object-Oriented Software(一)Introduction(介绍)

1.Introduction(介绍) Designing object-oriented software is hard,and designing reusable object-oriented software is even harder.You must find pertinent o...
  • liuzuyi200
  • liuzuyi200
  • 2013-07-17 10:29
  • 1325

Applying Domain-Driven Design and Patterns(ADDDP) With examples in C# and .NET

Applying Domain-Driven Design and Patterns(ADDDP) With examples in C# and .NET是在Martin Fowler的PoEAA 和Eric Evans的Domain-Driven Design 之后的又一本有关Domain-Dr...
  • shanyou
  • shanyou
  • 2007-07-06 21:08
  • 641

C++版的Head First Design Pattern

       前 些天从sourceforge上down下一个C++版的Head First Design Pattern,一直都没有仔细看过,也不知道HeadFirstDesignPattern是一本以Java为例的design patt...
  • iinel
  • iinel
  • 2007-11-16 10:13
  • 1579
    个人资料
    • 访问:1382361次
    • 积分:24315
    • 等级:
    • 排名:第324名
    • 原创:731篇
    • 转载:1240篇
    • 译文:2篇
    • 评论:73条
    最新评论