O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Swift 4 Protocol-Oriented Programming

Video Description

Master multithreading and concurrent processing with C++

About This Video

  • Leverage the power of Protocol-Oriented Programming in your applications and learn from real-world use cases
  • Create a flexible code base with protocols and protocol extensions
  • Leverage the power of generics in Swift 4 to create very flexible frameworks

In Detail

Swift has become the number one language used in iOS and macOS development. The Swift standard library is developed using Protocol-Oriented Programming techniques, generics, and first-class value semantics; therefore, every Swift developer should understand these powerful concepts and how to take advantage of them in their application design.

This course will help you understand the differences between Object-Oriented Programming and Protocol-Oriented Programming. It demonstrates how to work with Protocol-Oriented Programming using real-world use cases. You will gain a solid knowledge of the various types that can be used in Swift and the differences between value and reference types. You will be taught how Protocol-Oriented Programming techniques can be used to develop very flexible and easy-to-maintain code.

By the end of the course, you will have a thorough understanding of Protocol-Oriented Programming and how to utilize it to build powerful and practical applications.

Table of Contents

  1. Chapter 1 : Starting with the Protocol
    1. The Course Overview 00:02:31
    2. Protocol Syntax and Inheritance 00:05:26
    3. Using Protocols as a Type 00:02:08
    4. Polymorphism with Protocols 00:01:38
    5. Type Casting and Associated Types with Protocols 00:04:09
    6. Delegation 00:04:15
    7. Designing with Protocols 00:07:13
  2. Chapter 2 : Our Type Choices
    1. Classes 00:01:54
    2. Access Controls and Enumerations 00:07:47
    3. Tuples 00:02:14
    4. Value and Reference Types 00:07:08
    5. Recursive Data Types and Inheritance for Reference Types 00:05:41
    6. Dynamic Dispatch 00:01:58
  3. Chapter 3 : Extensions
    1. Defining an Extension 00:03:15
    2. Protocol Extensions 00:03:33
    3. Text Validation 00:06:39
    4. Extensions with the Swift Standard Library 00:01:14
    5. Conforming to the Equatable Protocol 00:01:56
  4. Chapter 4 : Generics
    1. Generic Functions and Type Constraints 00:05:12
    2. Generic Types 00:05:18
    3. Associated Types 00:01:35
    4. Generic Subscripts 00:02:27
    5. Copy-on-write 00:05:55
    6. Generics in a Protocol-Oriented Design 00:03:55
  5. Chapter 5 : Object-Oriented Programming
    1. Swift as an Object-Oriented Programming Language 00:11:22
    2. Issues with the Object-Oriented Design 00:02:54
  6. Chapter 6 : Protocol-Oriented Programming
    1. Swift as a Protocol-Oriented Programming Language 00:09:34
    2. Object-Oriented Programming versus Protocol-Oriented Programming 00:05:12
  7. Chapter 7 : Adopting Design Patterns in Swift
    1. Creational Patterns 00:13:46
    2. Structural Design Patterns 00:09:53
    3. Behavioral Design Patterns 00:09:16
  8. Chapter 8 : Case Studies
    1. Logging Service 00:08:46
    2. Data Access Layer 00:09:04