Sunday, March 8, 2020

Protocol-Oriented Programming (POP)

Protocol Wikipedia

Protocol Object Oriented Programming

https://www.pluralsight.com/guides/protocol-oriented-programming-in-swift

When designing a software system, we try to identify the elements needed to satisfy the requirements of a given system. We then model the relationships between these elements. We can start with a superclass and model its relationships through inheritance. Or we can start with a protocol and model the relationship as a protocol implementation. Swift provides full support for both interpretations. However, Apple tells us:
“Don’t start with a class, start with a protocol.”
Why? Protocols serve as better abstractions than classes.
Subclassing

https://eprint.iacr.org/2018/403.pdf

https://www.linkedin.com/learning/swift-5-protocol-oriented-programming/benefits-protocol-oriented-programming?autoplay=true&trk=course_preview&upsellOrderOrigin=public_profile_recommended_course_learning_card_title

https://www.raywenderlich.com/6742901-protocol-oriented-programming-tutorial-in-swift-5-1-getting-started


No comments: