O'Reilly logo

Mastering Swift 3 - Linux by Jon Hoffman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Protocol-oriented design

Just like with the object-oriented design, we will start off with a type diagram that shows the types needed and the relationships between them. The following diagram shows our protocol-oriented design:

Protocol-oriented design

As we can see, our POP design is quite a bit different from our OOP design. In this design we use three techniques that make POP significantly different from OOP. These techniques are protocol inheritance, protocol composition, and protocol extensions. It is important to understand these concepts so, before we go into our design, let's look at what protocol inheritance and protocol composition are. We looked at protocol ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required