Swift 4. Programmation orientée protocole
184 pages
French
PDF
4.5

Swift 4. Programmation orientée protocole

Освойте современный Swift через протоколы

Auteur :

Année :

Résumé :

Introduction

The book «Swift 4 Protocol-Oriented Programming» by Jon Hoffman is a practical guide that introduces the reader to the protocol-oriented programming (POP) paradigm in the Swift language. Published in 2017, it remains relevant for anyone who wants to deepen their understanding of how protocols and protocol extensions allow writing more flexible, modular, and testable code for Apple platforms.

What this book is about

The book focuses on the transition from classical object-oriented programming (OOP) to the protocol-oriented approach, which Apple has been actively promoting since Swift 2.0. Hoffman explains in detail why protocols in Swift are not just interfaces but a powerful tool for building application architecture. The main focus is on:

  • The basics of protocols and their syntax in Swift 4.
  • Protocol extensions and default method implementations.
  • Protocol composition instead of class inheritance.
  • Comparison of POP with traditional OOP using concrete examples.
  • Using protocols to reduce code coupling and improve testability.
  • Practical techniques: from simple data structures to building full-fledged applications.

Who this book is for

The book is intended for developers already familiar with the basics of Swift and with experience in creating applications

Recommendations