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/5Version
- Swift 4, iOS 12, Xcode 10
Let's review what you'll be learning in this course on protocol oriented programming in Swift, and why it's important.
1Class Dispatch
6:11Let's learn about how Swift gives you the ability to build polymorphic class types with different levels of dynamism.
2Protocol Dispatch
4:40Swift protocols can be used to provide customization points with default implementations in extensions.
3Convert object oriented code to protocol oriented code and observe the key differences between the two.
4In this video you'll see how protocols and retroactive modeling can be used as a tool for unifying types.
5In this challenge, try using retroactive modeling to compute the bounding boxes for different shapes.
6Conclusion
1:49Protocol oriented thinking is nothing new but Swift provides a unique way to achieve reuse without requiring a specific data layout.
7Who 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
Comments