
Swift 2 Design Patterns
Build robust and scalable iOS and Mac OS X game applications
Julien Lange(Author)
Packt Publishing
Published on 28. October 2015
Book
Paperback/Softback
224 pages
978-1-78588-761-1 (ISBN)
Description
Build robust and scalable iOS and Mac OS X game applications
Key Features
Book DescriptionSwift is a multi-paradigm language. It has expressive features familiar to those used to work with modern functional languages, while also keeping the object-oriented features of Objective-C. It remains compatible with Apple's legacy codes and frameworks. A design pattern systematically names, motivates, and explains a general design that addresses a recurring design problem in object-oriented systems. It describes the problem, the solution, when to apply the solution, and its consequences. It also gives implementation hints and examples. Knowledge about design patterns is also one of the best ways to make you different compared to other low-level developers.
This book shows you how to use Swift 2 to learn about 23 Gang of Four (GoF) design patterns, and is organized into three categories. The book will present you the five creational patterns, followed by the seven structural patterns, and finishing with the 11 behavioral patterns as defined by the GoF. Each chapter will introduce the pattern by defining its role, which common problems the pattern should be used for, its generic UML representation, how each objects presented in the class diagram participate in the pattern, and what the role of each of these objects is. The book then presents you with a concrete case as an illustration that will be used to implement the pattern using Swift.What you will learn
Who this book is forThis book is intended for competent Swift developers who want to apply enduring design patterns with Swift to structure and scale their application code.
Key Features
Book DescriptionSwift is a multi-paradigm language. It has expressive features familiar to those used to work with modern functional languages, while also keeping the object-oriented features of Objective-C. It remains compatible with Apple's legacy codes and frameworks. A design pattern systematically names, motivates, and explains a general design that addresses a recurring design problem in object-oriented systems. It describes the problem, the solution, when to apply the solution, and its consequences. It also gives implementation hints and examples. Knowledge about design patterns is also one of the best ways to make you different compared to other low-level developers.
This book shows you how to use Swift 2 to learn about 23 Gang of Four (GoF) design patterns, and is organized into three categories. The book will present you the five creational patterns, followed by the seven structural patterns, and finishing with the 11 behavioral patterns as defined by the GoF. Each chapter will introduce the pattern by defining its role, which common problems the pattern should be used for, its generic UML representation, how each objects presented in the class diagram participate in the pattern, and what the role of each of these objects is. The book then presents you with a concrete case as an illustration that will be used to implement the pattern using Swift.What you will learn
Who this book is forThis book is intended for competent Swift developers who want to apply enduring design patterns with Swift to structure and scale their application code.
More details
Language
English
Place of publication
Birmingham
United Kingdom
Dimensions
Height: 235 mm
Width: 191 mm
Thickness: 12 mm
Weight
428 gr
ISBN-13
978-1-78588-761-1 (9781785887611)
Copyright in bibliographic data and cover images is held by Nielsen Book Services Limited or by the publishers or by their respective licensors: all rights reserved.
Schweitzer Classification
Other editions
Additional editions

E-Book
10/2025
1st Edition
Packt Publishing Limited
from
€32.73
Available for download
Person
Julien Lange is a 34-year-old IT expert in software engineering. He started developing on an Amstrad CPC464 with the BASIC language when he was 7 years old. He later learned Visual Basic 3/4, then VB.NET, and then C#. For several years until the end of his education, he developed and maintained several e-business websites based on PHP and ASP.NET. After his graduation, he continued to learn more and more about software, which included software architecture and project management, and always tried to acquire new skills. Since 2011, he has been working as an IT project manager on the lead management middleware of DSI Axa France (a French insurance company). This middleware is based on the SOA architecture. As this middleware is consumed by frontend users exposed on the Internet, performance is the top priority each time he delivers a new release of the system. Scalability and robustness are really important in his everyday work. He first developed an interest in mobile development in 2009. After discovering the massive potential of iPhone games and software, he decided to find an improved game engine, which would allow him to concentrate only on the main purpose of a game: developing a game and not a game engine. His choice was Unity 3D. Later, he took some time to learn the native iOS Objective-C language, which was quite difficult for him due to its language particularity and finally learned Swift since its first apparition in 2014. In addition to his main work as an IT consultant, he created iXGaming.com in December 2010. He currently has several projects in mind, including a game based on a French board game and a new website that delivers new services to developers. He is searching for a few partners to work with.
Content
Table of Contents
Creational Patterns
Structural Patterns : Decorator, Proxy and Bridge
Structural Patterns : Composite and Flyweight
Structural Patterns : Adapter and Facade
Behavioral Patterns : Strategy, State and Template Method
Behavorial Patterns : Chain of Responsibility and Command
Behavorial Patterns : Iterator, Mediator and Observer
Behavorial Patterns : Visitor, Interpreter and Memento
Creational Patterns
Structural Patterns : Decorator, Proxy and Bridge
Structural Patterns : Composite and Flyweight
Structural Patterns : Adapter and Facade
Behavioral Patterns : Strategy, State and Template Method
Behavorial Patterns : Chain of Responsibility and Command
Behavorial Patterns : Iterator, Mediator and Observer
Behavorial Patterns : Visitor, Interpreter and Memento