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 ...
Get Cocoa Design Patterns now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.