Learn how to design the same system using POP.
- [Instructor] Now let's redesign our UI components…using a protocol oriented approach.…We start with defining our protocols first.…We're going to create dedicated protocols for…each feature set.…As a quick remark, we're going to follow…the swift naming guidelines.…Regarding protocol names, the rules are clear.…Protocols that describe what something is…should read as nouns.…For example collection.…Protocols that describe a capability should…be names using the suffixes able, ible, or ing.…
Like equatable or progress reporting.…Since our protocols describe capabilities,…we're going to use the second form.…Alright let's open up xcode and create a…playground project.…We need a playground.…Blank project is good.…And I'm going to call it protocol way.…Let's remove the unnecessary stuff.…
So let's create our first protocol.…I'm going to call it animatable.…It declares the only animation related…method that we're going to use.…That is called pulse.…It takes a duration argument of type time interval.…Next I provide the default implementation…
- Comparing object-oriented programming with protocol-oriented programming
- Methods and class-bound protocols
- Adopting a protocol
- Declaring asynchronous behavior
- Preparing and implementing fallback logic
- Implementing an app using protocol-oriented programming
Skill Level Intermediate
1. Protocol-Oriented Programming
4. Implement the Weather App Using POP
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.