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

- 演進式架構(原書第2版)
- C#編程入門指南(上下冊)
- 劍指JVM:虛擬機實踐與性能調優
- Learning Neo4j 3.x(Second Edition)
- Reactive Android Programming
- 可解釋機器學習:模型、方法與實踐
- 軟件測試實用教程
- Web前端應用開發技術
- 一本書講透Java線程:原理與實踐
- 算法設計與分析:基于C++編程語言的描述
- Application Development with Parse using iOS SDK
- Maven for Eclipse
- AngularJS UI Development
- 計算機程序的構造和解釋(JavaScript版)
- Learning Puppet