Book Image

Protocol-Oriented Programming with Swift

By : Jon Hoffman
Book Image

Protocol-Oriented Programming with Swift

By: Jon Hoffman

Overview of this book

<p>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.</p> <p>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.</p> <p>By the end of this book readers will be able to harness the power of protocol-oriented programming to build real world applications.</p>
Table of Contents (14 chapters)
Protocol-Oriented Programming with Swift
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

What are design patterns?


Every experienced developer has a set of informal strategies that shape how he or she designs and writes applications. These strategies are shaped by their past experiences and the obstacles that they have had to overcome in their previous projects. While these developers might swear by their own strategies, it does not mean that their strategies have been fully vetted. The use of these strategies can also introduce inconsistent implementations between different projects and developers.

While the concept of design patterns dates back to the mid 80s, they did not gain popularity until the Gang of Four released their Design Patterns: Elements of Reusable Object-Oriented Software book, published in 1994. The book's authors, Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides (also known as the Gang of Four), discuss the pitfalls of object-oriented programming and describe 23 classic software design patterns. These 23 patterns are broken up into three categories...