Kf's Computer Science
Hello World
2013年3月13日 星期三
Prototype
目的
Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.
(制訂可用原型個體生成的物件類型,爾後只需複製此原型即可生成新物件。[1])
閱讀更多 »
2012年12月22日 星期六
Builder
目的
Separate the construction of a complex object from its representation so that the same construction process can create different representations.
(從複雜物件的佈局中抽取出生成程序,以便用同一個生成程序製造各種不同的物件佈局。[1])
閱讀更多 »
2012年11月27日 星期二
Singleton
目的
Ensure a class only has one instance, and provide a global point of access to it.
(確保類別只會有一個物體實體存在,並提供單一存取窗口。[1])
閱讀更多 »
2012年11月16日 星期五
Simple Factory、Factory Method 與 Abstract Factory
Design Patterns 的三大工廠:Simple Factory、Factory Method 與 Abstract Factory
這三大工廠都是製造產品的地方,究竟有何差別?
這便是這次所要討論的主題
閱讀更多 »
2012年10月31日 星期三
Abstract Factory
目的
Provide an interface for creating families of related or dependent objects without specifying their concrete classes.
(以同一個介面來建立一整族相關或相依的物件,不需點明個物件真正所屬的具象類別。 [1])
閱讀更多 »
2012年10月24日 星期三
Abstract Class in Objective-C
Abstract class 在物件導向語言中是個十分重要的工具
當 programmer 看到 abstract class 時,心中應該浮現出以下含義:
此 class 沒有實作完成,至少有一個 member method 需要繼承的 subclass 實作
強制 subclass 實作某些 methods
此 class 無法被 instantiate,它是用來被繼承的
閱讀更多 »
2012年10月22日 星期一
Factory Method
目的
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.
(定義可資生成物件的介面,但讓子類別去決定該具現出哪一種類別的物件。此模式讓類別將具現化程序交付給子類別去處置。 [1])
閱讀更多 »
較新的文章
較舊的文章
首頁
訂閱:
文章 (Atom)