- Swift 2 Design Patterns
- Julien Lange
- 175字
- 2021-07-09 21:25:41
Chapter 1. Creational Patterns
The creational patterns are designed to deal with the object creation mechanism in software designing. A system using these patterns becomes independent of how objects are created, which means it is independent of how concrete classes are instantiated.
These patterns encapsulate the use of concrete classes and favor the use of interfaces in the relationship between objects, allowing to have better abstraction of the global system conception.
Thus, if we analyze the singleton pattern, a pattern designed to instantiate only one instance of a class, we find that the mechanism that controls the unique access to this instance is fully encapsulated in the class, which means that this is completely transparent to the client consuming the instance of the class.
In this chapter, we will introduce you to the five creational patterns and discuss how we can use them with Swift:
- The prototype pattern
- The factory method pattern
- The singleton pattern
- The abstract factory pattern
- The builder pattern
The objectives of these patterns are described in the following table:

- DBA攻堅指南:左手Oracle,右手MySQL
- Python概率統計
- JavaScript前端開發模塊化教程
- Visual Studio 2012 Cookbook
- Twilio Best Practices
- Web交互界面設計與制作(微課版)
- R語言游戲數據分析與挖掘
- TypeScript圖形渲染實戰:基于WebGL的3D架構與實現
- Apache Karaf Cookbook
- Visual Basic學習手冊
- Delphi開發典型模塊大全(修訂版)
- Greenplum構建實時數據倉庫實踐
- Python機器學習開發實戰
- Python深度學習與項目實戰
- PhoneGap 3.x Mobile Application Development Hotshot