• Protocol-Oriented programming with Swift:build fast and powerful applications by exploiting the power of protocol-oriented programming in Swift
  • 點閱:39
  • 作者: Jon Hoffman
  • 出版社:Packt Publishing Ltd.
  • 出版年:2016
  • ISBN:9781785882944; 9781785886348;
  • 格式:EPUB 流式,PDF

This book is about protocol-oriented programming. When Apple announced Swift 2 at the World Wide Developers Conference (WWDC) in 2015, they also declared that Swift was the world's first protocol-oriented programming language. By its name, we may assume that protocol-oriented programming is all about the protocol; however,that would be wrong assumption. Protocol-oriented programming is about so much more than just the protocol; it is actually a new way of not only writing applications, but thinking about programming as well.

One of the biggest misconceptions about protocol-oriented programming is that it is just another name for object-oriented programming. Chapter 1, Object-Oriented and Protocol-Oriented Programming, immediately takes on this myth by comparing protocol-oriented programming to object-oriented programming to see what is similar and what the differences are. We will also discuss the advantages and disadvantages of both programming paradigms.

From Chapter 2, Our Type Choices, to Chapter 5, Let's Extend Some Types, we will take an in-depth look at each of the components of the protocol-oriented programming paradigm. These chapters are designed to give the reader a solid understanding of the different components of protocol-oriented programming, so users will understand how they can use these components in their applications.

The last two chapters are written to help the reader understand how they can design their application in a protocol-oriented programming way. Chapter 6, Adopting Design Patterns in Swift, looks at how we would implement several design patterns in a protocol-oriented way and Chapter 7, Case Studies, looks at three real-world case studies to reinforce everything previously discussed in the book.

Jon Hoffman has over 20 years of experience in the field of information tec hnology.

Over these 20 years, Jon has worked in the areas of system administration, network administration, network security, application development, and architecture.

Currently, Jon works as a senior software engineer for Syn-Tech Systems.

Jon has been developing extensively for the iOS platform since 2008. This includes several apps that he has published in the app store—apps that he wrote for third parties and numerous enterprise applications.

Packt Publishing published Jon's first book, iOS and OS X Network Programming, in January 2014.

What really drives Jon is the challenges in the Information Technology field and there is nothing more exhilarating to him than overcoming a challenge. Some of Jon's other interests are watching baseball (go Sox) and basketball (go Celtics). Jon also really enjoys tae kwon do where he and his oldest daughter Kailey earned their black belts together early in 2014. Kim (his wife) earned her black belt in December 2014 and his youngest daughter is currently working towards her black belt.

  • Preface(第v頁)
  • Chapter 1 : Object - Oriented and Protocol - Oriented Programming(第1頁)
    • Swift as an object - oriented programming language(第2頁)
    • Swift as a protocol - oriented programming language(第13頁)
    • Summarizing protocol - oriented programming and object-oriented programming(第18頁)
    • Object - oriented programming versus protocol - oriented programming(第19頁)
    • The winner is...(第25頁)
    • Summary(第26頁)
  • Chapter 2 : Our Type Choices(第27頁)
    • The class(第28頁)
    • The structure(第30頁)
    • The enumerations(第31頁)
    • The tuple(第36頁)
    • Protocols(第37頁)
    • Value versus class types(第38頁)
    • Recursive data types (reference types only)(第44頁)
    • Inheritance (reference types only)(第46頁)
    • Swift built - in data types and data structures(第49頁)
    • Summary(第50頁)
  • Chapter 3 : Catching Our Errors(第51頁)
    • Using the guard statement(第52頁)
    • Error handling(第55頁)
    • Error handling with return values(第56頁)
    • Error handling with NSError(第58頁)
    • Error handling with Swift 2(第61頁)
    • When to use error handling(第70頁)
    • Summary(第72頁)
  • Chapter 4 : All about the Protocol(第73頁)
    • Protocol syntax(第75頁)
    • Protocol composition(第79頁)
    • Using protocols as a type(第81頁)
    • Polymorphism with protocols(第83頁)
    • Type casting with protocols(第84頁)
    • Associated types with protocols(第85頁)
    • Delegation(第87頁)
    • Designing and developing with protocols(第90頁)
    • Summary(第95頁)
  • Chapter 5 : Let's Extend Some Types(第97頁)
    • Defining an extension(第99頁)
    • Protocol extensions(第101頁)
    • Text validation(第106頁)
    • Summary(第114頁)
  • Chapter 6 : Adopting Design Patterns in Swift(第115頁)
    • What are design patterns ?(第116頁)
    • Creational patterns(第117頁)
    • Structural design patterns(第131頁)
    • Behavioral design patterns(第142頁)
    • Summary(第154頁)
  • Chapter 7 : Case Studies(第155頁)
    • Logging service(第156頁)
    • Data access layer with SQLite.swift(第166頁)
    • Calculator application(第181頁)
    • Summary(第187頁)
  • Index(第189頁)
紙本書 NT$ 1280
NT$ 1024

還沒安裝 HyRead 3 嗎?馬上免費安裝~
QR Code