Advanced Swift: Protocol Oriented Programming

Mar 26 2019 · Video Course (21 mins) · Advanced

Swift protocol oriented programming gives you the power of object oriented programming with better composability and without the baggage of class inheritance.

5/5 5 Ratings

Version

  • Swift 4, iOS 12, Xcode 10

Introduction

1:03 Free

Let's review what you'll be learning in this course on protocol oriented programming in Swift, and why it's important.

1

Let's learn about how Swift gives you the ability to build polymorphic class types with different levels of dynamism.

2

Swift protocols can be used to provide customization points with default implementations in extensions.

3

Convert object oriented code to protocol oriented code and observe the key differences between the two.

4

In this video you'll see how protocols and retroactive modeling can be used as a tool for unifying types.

5

In this challenge, try using retroactive modeling to compute the bounding boxes for different shapes.

6

Conclusion

1:49

Protocol oriented thinking is nothing new but Swift provides a unique way to achieve reuse without requiring a specific data layout.

7

Who is this for?

This course is for developers interested in getting a deeper understanding of the Swift language. It expects you to be comfortable with the basic syntax of Swift and to have perhaps written an app or two. You should be familiar with basic types in the Swift standard library.

Covered concepts

This course focuses on:

  • Protocol oriented programming
  • Class dispatch
  • Protocol dispatch
  • Retroactive modeling

Contributors

Comments