- 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.
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
About the Author
Jon Hoffman has over 20 years of experience in the field of information technology. Over these 20 years, Jon has worked in the areas of system administration, network administration, network security, application development, and architecture. Currently, Jon works as a senior software engineer for Syn-Tech Systems.
Jon has been developing extensively for the iOS platform since 2008. This includes several apps that he has published in the app store―apps that he wrote for third parties and numerous enterprise applications.
Packt Publishing published Jon's first book, iOS and OS X Network Programming, in January 2014.
What really drives Jon is the challenges in the Information Technology field and there is nothing more exhilarating to him than overcoming a challenge. Some of Jon's other interests are watching baseball (go Sox) and basketball (go Celtics). Jon also really enjoys tae kwon do where he and his oldest daughter Kailey earned their black belts together early in 2014. Kim (his wife) earned her black belt in December 2014 and his youngest daughter is currently working towards her black belt.
Table of Contents
Chapter 1. Object-Oriented and Protocol-Oriented Programming
Chapter 2. Our Type Choices
Chapter 3. Catching Our Errors
Chapter 4. All about the Protocol
Chapter 5. Let's Extend Some Types
Chapter 6. Adopting Design Patterns in Swift
Chapter 7. Case Studies