All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Published by Packt Publishing Ltd.
Birmingham B3 2PB, UK.
Credits
Author
Jon Hoffman
Reviewer
Chuck Gaffney
Commissioning Editor
Wilson D'souza
Acquisition Editor
Tushar Gupta
Content Development Editor
Sumeet Sawant
Technical Editor
Jayesh Sonawane
Copy Editors
Stephen Copestake
Akshata Lobo
Project Coordinator
Dinesh Rathe
Proofreader
Safis Editing
Indexer
Monica Ajmera Mehta
Graphics
Disha Haria
Production Coordinator
Nilesh Mohite
Cover Work
Nilesh Mohite
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 storeapps 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.
I would like to thank my wonderful wife Kim, without whose support, encouragement, patience, and understanding, this book would never have been written. I would also like to thank my two wonderful daughters Kailey and Kara who have both been my inspiration and driving force since the days they were born.
About the Reviewer
Chuck Gaffney is the owner of the website/store and indie studio Chuck's Anime Shrine as well as Anime.FM . He is a programmer by trade, ranging from games, non-games, VR, AR, and mobile applications. He has worked with iOS native (Swift/Objective-C/XCode) code, Flash animation, and game development as well as web design. Recently, he has been working almost exclusively in Unity/C#, making mobile applications that work with games, non-games, AR, VR, and third-party API integrations.
Interestingly, he is also a professional voice actor with work in games, museum experiences, movie dubs, and more. He is the owner of the long running fan site, store, and indie game studio Chuck's Anime Shrine. He recently worked with two major NYC studios and with clients that include some financial giants and the Late Show with Steven Colbert. He is currently developing an app for a major beer company.
I would like to thank my fiance Danielle for putting up with the late nights and all nighters that come with the territory of being a programmer, voice actor, and business owner.
www.PacktPub.com
Support files, eBooks, discount offers, and more
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at > for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.
Why subscribe?
- Fully searchable across every book published by Packt
- Copy and paste, print, and bookmark content
- On demand and accessible via a web browser
Free access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.
Preface
This book is about protocol-oriented programming. When Apple announced Swift 2 at the World Wide Developers Conference (WWDC) in 2015, they also declared that Swift was the world's first protocol-oriented programming language. By its name, we may assume that protocol-oriented programming is all about the protocol; however, that would be wrong assumption. Protocol-oriented programming is about so much more than just the protocol; it is actually a new way of not only writing applications, but thinking about programming as well.
One of the biggest misconceptions about protocol-oriented programming is that it is just another name for object-oriented programming. , Object-Oriented and Protocol-Oriented Programming , immediately takes on this myth by comparing protocol-oriented programming to object-oriented programming to see what is similar and what the differences are. We will also discuss the advantages and disadvantages of both programming paradigms.
From , Let's Extend Some Types , we will take an in-depth look at each of the components of the protocol-oriented programming paradigm. These chapters are designed to give the reader a solid understanding of the different components of protocol-oriented programming, so users will understand how they can use these components in their applications.
The last two chapters are written to help the reader understand how they can design their application in a protocol-oriented programming way. , Case Studies , looks at three real-world case studies to reinforce everything previously discussed in the book.