Special offers now — see discounted courses.
day
:
hour
:
min
:
sec
See special offers
Swift 5: Protocol-Oriented Programming

Swift 5: Protocol-Oriented Programming

1h 59mAdvanced2020-01-15

Authors

Károly Nyisztor

Károly Nyisztor

Mobile Developer, Instructor

Course details

Take a closer look at protocol-oriented programming (POP), a new paradigm introduced by Apple. In this course, instructor Károly Nyisztor explains what POP is, how it differs from classical approaches, and how to work with it to efficiently develop apps with Swift. Learn about the pillars of POP: protocol extensions, protocol inheritance, and protocol composition. Protocol extensions let you define default behavior for conforming types without defining a base class. Protocol inheritance is a powerful feature that lets you create more granular designs. Swift does not allow multiple inheritance for classes—but with protocol composition, Swift types can adopt multiple protocols. Plus, explore generics, and see how to implement a fully functional app using a protocol-oriented approach.

Learning objectives
Comparing OOP with POP
Adopting a protocol
Working with generic types
Using generics with protocols
Implementing an app using POP
Integrating a fallback service

Skills covered

SwiftiOSAppleProgramming LanguagesSoftware DevelopmentDeep Dive (X:Y)

Concepts

0. Introduction

  • 01 - Benefits - Protocol-oriented programming
  • 02 - What you should know

1. The Pillars of Protocol Orientation

  • 03 - What is protocol-oriented programming
  • 04 - Introducing the protocol
  • 05 - Adopting protocols
  • 06 - Conforming to protocols via extensions
  • 07 - Understanding polymorphism
  • 08 - Protocol inheritance
  • 09 - Adopting multiple protocols
  • 10 - Protocol extensions
  • 11 - Challenge - Removing tight coupling
  • 12 - Solution - Removing tight coupling

2. Protocol-Oriented Programming

  • 13 - Why protocols
  • 14 - From unstructured code to POP
  • 15 - Designing with classes - First try
  • 16 - Designing with classes - Subclassing
  • 17 - The benefits of thinking in protocols
  • 18 - Highlighting the differences

3. Generics

  • 19 - The importance of generics
  • 20 - Defining generic functions and methods
  • 21 - Working with generic types
  • 22 - Placeholder types in protocols
  • 23 - Using generics with protocols
  • 24 - Challenge - Implementing a generic stack
  • 25 - Solution - Implementing a generic stack

4. Implement the Weather App Using POP

  • 26 - Weather app design
  • 27 - Defining the UI using SwiftUI
  • 28 - The WebServiceController protocol
  • 29 - Working with a third-party API
  • 30 - Implementing the OpenWeatherMap controller
  • 31 - Completing the OpenWeatherMap controller
  • 32 - Introducing the view model
  • 33 - Presenting weather data
  • 34 - Challenge - Integrating a fallback service
  • 35 - Solution - Integrating a fallback service

Conclusion

  • 36 - Next steps

Related courses

Related learn paths

About us

LyndaKade is a leading learning platform that helps people learn business, software, technology, and creative skills to achieve personal and professional goals.

Phone numberAparat ChannelTelegram SupportTelegram ChannelInstagram Page

All rights to this site belong to LyndaKade.

Terms of Service|Privacy Policy

نماد الکترونیک enamad در صورت اتصال با آی‌پی داخل کشور، نمایش داده خواهد شد.
logo-samandehi - لوگو ساماندهی
zarinpal
zibal