Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Swift 2 Design Patterns
  • Table Of Contents Toc
Swift 2 Design Patterns

Swift 2 Design Patterns

By : Lange
3 (2)
close
close
Swift 2 Design Patterns

Swift 2 Design Patterns

3 (2)
By: Lange

Overview of this book

Swift 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.
Table of Contents (10 chapters)
close
close
9
Index

Summary

This chapter concludes the discovery of the seven structural patterns. The adapter pattern has much more in common with the bridge pattern. The main difference is in the purpose of the pattern.

A bridge separates an interface and its implementation, whereas an adapter changes the interface of an existing object.

The decorator adds a functionality to an object without changing its interface and should be transparent to the application. For the adapter, this is not the case, it is not transparent from the client perspective: the adapter is the named implementation of the interface that a client sees, so the adapter is not hidden from the client.

The proxy pattern doesn't change any interface. It defines substitute objects for other objects.

The facade pattern transforms high-level requests into low-level requests by communicating with other subsystems. It hides the complexity of these subsystems by providing a simple interface that the client can see.

In the next chapter, we will...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Swift 2 Design Patterns
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon