O'Reilly logo

Cocoa Design Patterns by Donald A. Yacktman, Erik M. Buck

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

25. Class Clusters

The Class Clusters pattern presents a simple interface to a complex underlying implementation. This pattern is usually used to shield application developers from the details of performance and storage optimizations provided by frameworks. The pattern provides a public class for use in application code, but when applications attempt to allocate instances of the public class, the framework actually provides instances of private subclasses of the public class. Frameworks use information supplied at runtime to select the appropriate private subclass on a case-by-case basis. The Class Clusters pattern is sometimes called the “Abstract Factory” pattern because the public class is abstract. This means instances of the public class ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required