Swift is a general-purpose, multi-paradigm, and compiled programming language developed by Apple Inc. Protocol-oriented programming offers a lot of benefits including better code maintainability, increased developer productivity, and superior application performance. Using right protocols can transform the way you write your Swift code. If you are a Swift developer and want to improve the flexibility, maintainability, and reusability of your code, then you should surely go for this Learning Path.
Packt’s Video Learning Paths are a series of individual video products put together in a logical and stepwise manner such that each video builds on the skills learned in the video before it.
The highlights of this Learning Path are:
Let's take a quick look at your learning journey. This Learning Path shows you how to get the most out of protocol-oriented programming. With useful examples and practical, step-by-step instructions, you'll create protocols and use them in your code. Taking you beyond the basics, this Learning Path teaches you advanced techniques and ways-of-thinking that will improve the way you use protocols, and shows you how to solve common problems you'll face when working with protocols. Finally, you’ll be building your first app with protocols.
By the end of this Learning Path, you'll be ready to use protocols in production to improve the effectiveness of your code. You’ll be a protocol programming expert!
About the Author
Hamish Knight is a Computer Science undergraduate at the University of Bath in the UK with a passion for Swift. Hamish is always interested in exploring how Swift operates at a lower level, and enjoy posting answers to Swift questions on Stack Overflow. Furthermore, he has over three years of experience developing mobile apps for iOS, with four apps currently on the App Store.
Before learning about how to define and use protocols, In this video we will start by exploring what protocols are in Swift.
In this video, you will be shown how to define and conform to your own protocols.
In this video, you will be shown how to extend protocols.
In this video, you will learn about mutating protocol requirements as well as class-bound protocols.
In this video, you will be shown how to define initialiser requirements.
In this video, you will be shown how to implement a workaround for adding stored properties to conforming types in protocol extensions.
In this video, you will learn about associated type requirements in protocols.
In this video, you will be shown how to use Self requirements in protocols, as well as the Self metatype in protocol extensions.
In this video, you will be shown how to define operator protocol requirements.
In this video, you will be shown how to constrain protocol extensions so that they only apply to specific conforming types.
In this video, you will be shown how to use protocols with generic placeholders.
In this video, you will be shown how to use the standard library protocols Equatable, Comparable & Hashable.
You will be shown a couple of inheritance patterns that are better implemented with protocols.
The aim of this video is to explain why protocols aren’t just made up of interface requirements.
In this video, you will be shown how to perform delegation with protocols.
In this video, you will be shown the power that protocols bring to unit tests.
In this video, you will be shown the OptionSet and Sequence standard library protocols.
You will be shown the collection family of protocols in the standard library, which describe a collection of elements.
In this video, you will be shown how protocols can be used in an iOS application.
We will be delving into how protocol-typed instances are stored in the memory.
You will be shown some of the differences between constrained generic placeholders and protocol types, mainly in the context of function parameters.
In this video, we will be taking a look at how casts to collections of protocol-typed elements can be cheapened using a “protocol tag”.
In this video, we will be taking a look at how in Swift 4, you will be able to use where clauses on associated types.
In this video, we will be taking a look at how a future version of the language will allow for conditional conformances.
This video aims to show how you can express the type of something that both inherits from a given class and conforms to one or more protocols in Swift 4.
Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.
With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.
From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.
Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.