2013年2月25日

Notifications or Observer pattern

摘要: pp159The Notification pattern enables communication between objects without tight coupling. An object is able to broadcast information to any number of other objects without any specific information about the other objects. An instance of Cocoa's NSNotification class encapsulates the information 阅读全文

posted @ 2013-02-25 18:13 Chansonyan 阅读(201) 评论(0) 推荐(0)

Singleton

摘要: Minimal coupling is a key guiding principle of Cocoa's design and the quality that most contributes to programmer productivity.pp148The Singleton pattern is used when there must be exactly one instance of a class, and it must be easily accessible to other objects in an application. Usually, the 阅读全文

posted @ 2013-02-25 01:26 Chansonyan 阅读(214) 评论(0) 推荐(0)

导航