Compare the object-oriented design with the protocol-oriented solution and see the differences.
- [Instructor] We can model the same system…with protocols or with super classes.…Yet protocols provide more flexibility.…They are all about abstraction.…Protocols tell conforming types what…to do rather than how to accomplish…a certain functionality.…With a protocol oriented approach…we can create more granular designs…that are easier to maintain and enhance.…Let's summarize the main differences…between the protocol oriented design…and the object oriented way of designing…the software system.…
Subclasses may inherit unnecessary functionality…and data from the super class.…The internals of super classes get exposed…through inheritance which leads to unnecessary…complexity being shared with classes.…With protocol conformance we get loose coupling.…In a protocol oriented design the inheritance…hierarchies are replaced by protocol conformance.…The protocol oriented design promotes loose coupling…between types.…Unlike with sub classing types don't inherit…unnecessary functionality or data.…
They only receive the methods and properties…
- 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.