Saturday, December 10, 2016

Swift 3, Protocol-Oriented Programming

My new book, Swift 3 Protocol Oriented Programming has been released.  I wrote the original Protocol Oriented Programming book when Swift 2 was released and since then a lot has changed with the language.  This new book is a major rewrite and includes an additional chapter on generics.  The following gives an overview of each chapter:

Chapter 1, Object-Oriented Programming vs Protocol-Oriented Programming, This chapter will show the differences between object-oriented programming and protocol-oriented programming giving the reader a good understanding of the difference paradigms.  By the end of the chapter the reader should have a basic understanding of protocol-oriented programming and what it offers.

Chapter 2, Our Type Choices, In this chapter we will look at the different types that Swift offers (Structs, Classes, Enums and Tuples).  We will show several examples of when to use the various types and when not too.

Chapter 3, Catching our Errors, This chapter will look at the various ways that we can catch and report errors.  This chapter will not only cover the new Swift 2 do-try-catch blocks but also the older error catching patterns

Chapter 4, It’s all about the Protocol, This chapter will be all about the protocol.  We will show the advantages of using protocols and why, in our design, we should always think about the protocol first and the actual types that conform to the protocol second.

Chapter 5, Lets extend some types, This chapter will cover extensions in great detail.  We will look at how to extend standard Swift types like structures and classes.  We will also look at protocol extensions and discuss why they are so important to Protocol-Oriented programming.

Chapter 6, Working with Generics, This chapter will cover generics.  We will look at how we generics can be used with the protocol-oriented programming paradigm to write flexible and reusable code.

Chapter 7, Design Patterns with Protocol-Oriented programming, We will be implementing several design patterns using protocol-oriented programming.  For each of the design patterns we will look at the problem they are designed to solve and how to implement the pattern.

Chapter 8, Case Studies, In this chapter we will explore three case studies.  This chapter is designed to pull everything from the first six chapters together to show the reader how to use Protocol-Oriented programming is real world situations.

This book will guide you through every aspect of protocol-oriented programming to help you take advantage of it in your applications.  You can purchase a copy of the book on Amazon.