- 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:

- Delphi程序設計基礎:教程、實驗、習題
- Unity 2020 Mobile Game Development
- Arduino開發實戰指南:LabVIEW卷
- Android 應用案例開發大全(第3版)
- 移動界面(Web/App)Photoshop UI設計十全大補
- Visual FoxPro程序設計習題集及實驗指導(第四版)
- Scratch·愛編程的藝術家
- BeagleBone Robotic Projects(Second Edition)
- 區塊鏈國產化實踐指南:基于Fabric 2.0
- uni-app跨平臺開發與應用從入門到實踐
- jQuery for Designers Beginner's Guide Second Edition
- NGUI for Unity
- Blender 3D Cookbook
- 計算機應用基礎(Windows 7+Office 2010)
- 高性能MVVM框架的設計與實現:San