• The only book that shows how to harness the power of Protocol-Oriented Programming in Swift to build real-world applications,
  • Get familiar with the protocol focused approach of application development,
  • Increase the overall productivity and performance of applications with Protocol Oriented Programming.

Book Description

At the heart of Swift's design is an incredibly powerful idea: protocol-oriented programming. Its many benefits include better code maintainability, increased developer productivity and superior application performance. The book will teach the reader how to apply the ideas behind the protocol oriented programing paradigm to improve the code they write.

This book will introduce the readers to the world of protocol-oriented programming in Swift and will demonstrate the ideas behind this new programming paradigm with real world examples. In addition to learning the concepts of Protocol Oriented programming, it also shows the reader how to reduce the complexity of their codebase using protocol extensions. Beginning with how to create simple protocols, readers will learn how to extend protocols and also to assign behaviors to them.

By the end of this book readers will be able to harness the power of protocol-oriented programming to build real world applications.

What you will learn

  • The difference between Object-Oriented programming and Protocol-Oriented programming
  • The difference between reference and value types and when to use each
  • How we can leverage tuples to reduce the complexity of our code
  • What are protocols and how to use them
  • How to implement protocol extensions to create a very flexible code base
  • How to implement several design patterns in a Protocol-Oriented approach
  • How to solve real world design issue with protocol oriented programming

Jon Hoffman

Jon Hoffman has over 20 years of experience in the information technology field. Over those 20 plus years, Jon has worked in the areas of system administration, network administration, network security, development, and architecture. Currently, he works as a software engineer for Syntech Systems. Over the past 7 years, Jon has developed extensively for the iOS platform. This includes several apps that he has published on the App Store, apps that he has written for third parties, and numerous enterprise applications. Packt Publishing also published Jon's first book, iOS and OS X Network Programming Cookbook. What really drives Jon are the challenges in the information technology field, and there is nothing more exhilarating for him than overcoming a challenge. Some of Jon's other interests are watching baseball (go Sox!) and basketball (go Celtics!). Jon also really enjoys fishing, kayaking, and just being out on the lake with his family.

  1. Object-Oriented and Protocol-Oriented Programming
  2. Our Type Choices
  3. Catching Our Errors
  4. All about the Protocol
  5. Let's Extend Some Types
  6. Adopting Design Patterns in Swift
  7. Case Studies