Title Statements
- Full title :Protocol-Oriented Programming with Swift
Summary
Cover -- Copyright -- Credits -- About the Author -- About the Reviewer -- www.PacktPub.com -- Table of Contents -- Preface -- Chapter 1: Object-Oriented and Protocol-Oriented Programming -- Swift as an object-oriented programming language -- Swift as a protocol-oriented programming language -- Summarizing protocol-oriented programming and object-oriented programming -- Object-oriented programming versus protocol-oriented programming -- Protocol and protocol extensions versus superclasses -- Implementing drink types -- Value types vs reference types -- The winner is ... -- Summary
Chapter 2: Our Type Choices -- The class -- The structure -- The enumerations -- The tuple -- Protocols -- Value versus class types -- Recursive data types (reference types only) -- Inheritance (reference types only) -- Swift built-in data types and data structures -- Summary -- Chapter 3: Catching Our Errors -- Using the guard statement -- Error handling -- Error handling with return values -- Error handling with NSError -- Error handling with Swift 2 -- Representing errors -- Throwing errors -- Catching errors -- When to use error handling -- Summary -- Chapter 4: All about the Protocol
Protocol syntax -- Defining a protocol -- Property requirements -- Method requirements -- Optional requirements -- Protocol inheritance -- Protocol composition -- Using protocols as a type -- Polymorphism with protocols -- Type casting with protocols -- Associated types with protocols -- Delegation -- Designing and developing with protocols -- Summary -- Chapter 5: Let's Extend Some Types -- Defining an extension -- Protocol extensions -- Text validation -- Summary -- Chapter 6: Adopting Design Patterns in Swift -- What are design patterns? -- Creational patterns -- The singleton design pattern
Understanding the problem -- Understanding the solution -- Implementing the singleton pattern -- The builder design pattern -- Understanding the problem -- Understanding the solution -- Implementing the builder pattern -- The factory method pattern -- Understanding the problem -- Understanding the solution -- Implementing the factory method pattern -- Structural design patterns -- The bridge pattern -- Understanding the problem -- Understanding the solution -- Implementing the bridge pattern -- The façade pattern -- Understanding the problem -- Understanding the solution
Implementing the façade pattern -- The proxy design pattern -- Understanding the problem -- Understanding the solution -- Implementing the proxy pattern -- Behavioral design patterns -- The command design pattern -- Understanding the problem -- Understanding the solution -- Implementing the command pattern -- The strategy pattern -- Understanding the problem -- Understanding the solution -- Implementing the strategy pattern -- The observer pattern -- Understanding the problem -- Understanding the solution -- Implementing the observer pattern -- Summary -- Chapter 7: Case Studies
Edition Statements
- Publication Date:2016
Publication Statements
- Publisher(s):Packt Publishing
- Place of Publication:Birmingham
- Language:eng
- Publication Date:2016
Notes
IMD-Felder maschinell generiert
Logging service
The Physical Object
- Description:1 Online-Ressource (212 Seiten)
Edition Identifiers
- ISBN:9781785882944, 1785882945
- oclc:on1020670324
- LC Classification:T55.4-60.8
- Dewey Decimal:005.262
Rate & Review