Swift 4. Programmation orientée protocole
Освойте современный Swift через протоколы
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
Développement d'API en C# (.NET) : des bases à l'application industrielle
Clean Code en TypeScript : Guide pratique pour écrire un code maintenable et efficace
Entretien Swift (iOS/macOS) : 200 questions et réponses
Metal by Tutorials (Tutoriels sur Metal)
Kotlin for Java Developers
TypeScript en 50 leçons