![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
文章平均质量分 70
iteye_2062
这个作者很懒,什么都没留下…
展开
-
Design Patterns in Ruby [Digest 2] - Template
When we have a complex algorithm including several steps to build something, which would be vary in the middle.Now you need Template method.It comes up with an example:class Report def initialize...原创 2009-05-27 12:51:25 · 90 阅读 · 0 评论 -
Design Patterns in Ruby [Digest 12] Builder
Imagine that you are create a computer machine, if you create a class named ComputerSo the initializer will be such a painful and tedious parameter monster, you will find that it is a mess. S...原创 2009-06-11 21:00:39 · 99 阅读 · 0 评论 -
Design Patterns in Ruby [Digest 10] Singleton
Singleton is common for every coder. It provide only instance of class. class SimpleLogger # Lots of code deleted... @@instance = SimpleLogger.new def self.instance return @@instance...原创 2009-06-07 22:33:38 · 88 阅读 · 0 评论 -
Design Patterns in Ruby [Digest 9] Decorator
The Decorator pattern is used when you need to add some feature to a class with wrapper rather than write a new method. Think about the writer support chechsum write, line number write: cla...原创 2009-06-06 19:56:28 · 101 阅读 · 0 评论 -
Design Patterns in Ruby [Digest 8] Proxy
When we meet these requirements:1) Controlling access to an object 2) providing a location-independent way of getting at the object3) delaying its creationall three actually have a common s...原创 2009-06-06 16:20:36 · 105 阅读 · 0 评论 -
Design Patterns in Ruby [Digest 8] Adapter
The Adapter is just like the power adapter such as from 220V to 120V. And when the pin does not fit the socket we need the adapter to fit it.In software system, we already have a Encrypter to encryp...原创 2009-06-06 12:34:53 · 99 阅读 · 0 评论 -
Design Patterns in Ruby [Digest 7] Command
Command pattern command is an instruction to do something, something specific. It can be execute right now or later or specific time. In our GUI's do and undo actions it is wildly used. If w...原创 2009-06-05 12:46:03 · 86 阅读 · 0 评论 -
Design Patterns in Ruby [Digest 6] Iterator
The Iterator pattern is a technique that allows an aggregate object to provide the outside world with a way to access its collection of subobjects.In Java we use java.util.Iterator interface to be i...原创 2009-06-03 22:31:29 · 96 阅读 · 0 评论 -
Design Patterns in Ruby [Digest 5] Composite
When we want to build up bigger objects from small sub-objects those build up on the sub-sub-objects then there is a Composite Pattern.The key point of the pattern is that complex objects and simple...原创 2009-06-01 15:39:38 · 72 阅读 · 0 评论 -
Design Patterns in Ruby [Digest 4] Observer
The Observer Pattern is useful when you need to inform other objects whenever one original change of object occurs. Such as SNS feeds feature, cache clear and so on... Without this pattern the ...原创 2009-05-29 10:40:25 · 82 阅读 · 0 评论 -
Design Patterns in Ruby [Digest 3] Strategy
The Template method is build around inheritance, the inheritance has the nature born relationship.So the Strategy give a delegate solution. So we use the strategy implementation: class Fo...原创 2009-05-28 11:55:57 · 72 阅读 · 0 评论 -
Design Patterns in Ruby [Digest 1] About Patterns
The following tips are really essential the patterns for patterns:1) Seperate out the things that change from those stay the sameA key goal of software engineering is to builld a system ...原创 2009-05-27 13:02:54 · 95 阅读 · 0 评论 -
DB2 学习笔记
因为只能用自己公司的数据库产品,所以理所应当的学习DB2...现在用数据库会想当然的用MySQL的处理方式,发现不妥,DB2整个就是另外的产品,看来要系统的学习下。 找了一本教材,非常非常厚,有点找不着北的感觉,不过还是和以前一样,一边记录一边读好了。...原创 2010-08-24 12:35:28 · 104 阅读 · 0 评论