
Basic - Design Pattern
文章平均质量分 55
钟超
阿里巴巴集团总监/资深综合运营专家,连续创业者,关于 AI、电商、社交媒体领域,毕业于中国科学技术大学计算机系本科。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
《设计模式——可复用面向对象软件的基础》学习笔记(1.3)Describing design patterns
1.What is important to describe DP (1)Graphical notations capture the end product of the design process. (2)We should record the decisions, alternatives, and trade-offs that led to it. 2.The wa原创 2011-11-26 15:56:23 · 2145 阅读 · 0 评论 -
《设计模式——可复用面向对象软件的基础》学习笔记(1.5)Organizing the catalog
1.Classify DPs by purpose. (1)Creational DP: the process of object creation. Factory Method, Abstract Factory, Builder, Prototype, Singleton (2)Structural DP: composition of classes or objects.原创 2011-11-26 17:25:05 · 2164 阅读 · 0 评论 -
编程思想之中间层检测类
首先请看如下的代码。 class Help { private int n; Help() { this.n = 0; } public void setMe(int n) { Helper.setValue(this, n); } public void setN(int n) { this.n = n; } } class Helper { static pub原创 2011-10-31 10:32:25 · 2073 阅读 · 1 评论 -
《设计模式——可复用面向对象软件的基础》学习笔记(1.2)Design patterns in Smalltalk MVC
1.MVC (1)Model: The application object; (2)View: The screen presentation of the model; (3)Controller: the way the user interface reacts the user input. 2.View and Model: decouple views and mod原创 2011-11-26 14:45:27 · 2358 阅读 · 0 评论 -
《设计模式——可复用面向对象软件的基础》学习笔记(1.1)What is a design pattern?
1.Four essential elements of a pattern: (1)Pattern name; (2)Problem; (3)Solution; (4)Consequences: The results and trade-offs of applying the pattern. 2.One person's pattern can be another pe原创 2011-11-26 12:39:27 · 2533 阅读 · 0 评论 -
《设计模式——可复用面向对象软件的基础》学习笔记(1.4)The catalog of design patterns
The main 23 design patterns. 1.Abstract Factory 2.Adapter 3.Bridge 4.Builder 5.Chain of Responsibility 6.Command 7.Composite 8.Decorator 9.Facade 10.Factory Method 11.Flyweight 12.Inte原创 2011-11-26 16:56:52 · 2003 阅读 · 0 评论 -
编程思想基本概念之回调(Callback)
在软件模块调用中,主要有三种机制:同步调用,异步调用和回调。 同步调用是调用方(A)call被调用方(B)的接口,并等待B处理完给出一个回执后A才继续执行,这期间是“阻塞”的。 异步调用是调用方(A)call被调用方(B)的接口后,不等待B执行完,且B在被调用后会直接回执A。 回调是调用方(A)call被调用方(B)时,B也回调(callback)被调用方,双方互调接口,只不过call动作是原创 2011-10-18 18:40:56 · 5285 阅读 · 0 评论 -
编程思想基本概念之函数式编程(Functional Programming)
上一篇中提到了Callback,其实思想本质在于函数式编程,这才是更根本的概念。现在来看下在 Java 中的函数式编程是如何实现。 首先我们看一下在Java中很熟悉的一个代码段: //接口类,这个应该算是要采用函数式编程方式的要求中的,而不算是函数式编程本身的一部分。 public interface ActionListener { public void actionP转载 2011-10-19 11:12:21 · 2830 阅读 · 0 评论 -
架构设计之源:设计模式的场景分析(1)Publish-Subscribe
架构设计之源:设计模式的场景分析(1)Publish-Subscribe Author: Poechant Blog: blog.youkuaiyun.com/Poechant Email: zhongchao.ustc@gmail.com Date: February 24th, 2012 我在设计模式方面仅阅读过英文原版(或影印版)的书籍,以及一些互联网上的资料。而设计模式中有很多专原创 2012-02-25 08:38:33 · 4727 阅读 · 0 评论