Swift Protocol-Oriented Programming : Increase Productivity and Build Faster Applications with Swift 5, 4th Edition 🔍
Jon Hoffman Packt Publishing, Limited, 4th ed, Erscheinungsort nicht ermittelbar, 2019
英语 [en] · PDF · 2.9MB · 2019 · 📘 非小说类图书 · 🚀/lgli/lgrs/nexusstc/zlib · Save
描述
Get up to speed with the protocol-oriented programming paradigm to ensure better code maintainability and increased performance with Swift programming
Key Features Use protocol-oriented programming to enhance your applications Use generics to create flexible frameworks Learn how to implement common design patterns in a protocol-oriented way Book Description Protocol-oriented programming (POP) is an incredibly powerful concept at the heart of Swift's design. Swift's standard library was developed using POP techniques, generics, and first-class value semantics, which makes it important for every Swift developer to understand these core concepts and use them effectively. This updated fourth edition will help you get to grips with the latest version of the Swift programming language.
You will start by understanding what protocol-oriented programming is and how it is different from other programming paradigms such as object-oriented programming. Next, the book will systematically guide you through memory management, before progressing to cover essential topics such as generics, Copy-On-Write, extensions, and protocols. As you advance, you'll focus on adopting design patterns in Swift. The concluding chapters will even demonstrate how you can use protocol-oriented programming techniques with the help of real-world use cases.
By the end of this book, you will have learned how to use protocol-oriented programming techniques to build powerful and practical applications.
What you will learn Explore the differences between object-oriented programming and protocol-oriented programming Understand why value types should be prioritized over reference types Delve into protocols, protocol inheritance, protocol composition, and protocol extensions Become well-versed with implementing COW (Copy-On-Write) within your custom value types Understand how memory management works in Swift and how to avoid common pitfalls Design applications by starting with the protocol rather than the implementation Who this book is for This book is for Swift developers who have basic knowledge of the Swift programming language and are looking to understand how they can use protocol-oriented programming techniques in their applications.
Table of Contents Starting with the Protocol Our Type Choices Extensions Generics Memory Management Object-Oriented Programming Protocol-Oriented Programming Adopting Design Patterns in Swift Case Studies
备用文件名
lgli/hoffman_j_swift_protocoloriented_programming_increase_produc.pdf
备用文件名
lgrsnf/hoffman_j_swift_protocoloriented_programming_increase_produc.pdf
备用文件名
zlib/Computers/Jon Hoffman/Swift Protocol-Oriented Programming: Increase productivity and build faster applications with Swift 5, 4th Edition_6098995.pdf
备选标题
Swift protocol-oriented programming increase productivity and build faster applications with Swift 5, fourth edition
备选标题
Swift 5 Protocol Oriented Programming-- Fourth Edition
备选作者
Hoffman, Jon
备用版本
United Kingdom and Ireland, United Kingdom
备用版本
Packt Publishing, Birmingham, 2019
备用版本
Fourth edition, Birmingham, 2019
元数据中的注释
True PDF
元数据中的注释
lg2815761
元数据中的注释
{"edition":"4","isbns":["1789349028","9781789349023"],"last_page":224,"publisher":"Packt Publishing"}
备用描述
Cover
Title Page
Copyright and Credits
About Packt
Contributors
Table of Contents
Preface
Chapter 1: Starting with 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 with protocols
Protocols in the Swift standard library
Summary
Chapter 2: Our Type Choices
Classes
Structures
Access controls
Enumerations
Tuples
Protocols
Value and reference types
Recursive data types for reference types only
Inheritance for reference types only
Dynamic dispatch
Swift's built-in types
COW
Summary
Chapter 3: Extensions
Defining an extension
Protocol extensions
Text validation
Extensions with the Swift standard library
Conforming to the Equatable protocol
Summary
Chapter 4: Generics
Generic functions
Type constraints with generics
Generic types
Associated types
Generic subscripts
COW
Generics in a protocol-oriented design
Generics in the Swift standard library
Summary
Chapter 5: Memory Management
How ARC works
Strong reference cycles
Unowned references
Weak references
Summary
Chapter 6: Object-Oriented Programming
What is object-oriented programming?
Requirements for the sample code
Swift as an object-oriented programming language
Class diagrams
Object-oriented design
Vehicle superclass
Vehicle subclasses
Polymorphism
Issues with object-oriented design
Summary
Chapter 7: Protocol-Oriented Programming
Requirements for the sample code
Swift as a protocol-oriented programming language
Protocol inheritance
Protocol composition
Protocol extensions
The Vehicle protocol
Vehicle implementations
Summarizing protocol-oriented programming and object-oriented programming
Differences between object-oriented programming and protocol-oriented programming
Protocol and protocol extensions compared with superclasses
Implementing vehicle types
Using value and reference types
The winner is...
Summary
Chapter 8: 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 facade pattern
Understanding the problem
Understanding the solution
Implementing the facade 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 9: Case Studies
Logging services
Requirements
The design
Conclusion
The data access layer
Requirements
The design
The data model layer
The data helper layer
The bridge layer
Using the data-access layer
Conclusion
Summary
Other Books You May Enjoy
Index
备用描述
Embrace the Protocol-Oriented Programming paradigm, for better code maintainability and increased performance, with Swift programming.Key FeaturesLeverage the power of Protocol-Oriented Programming in your applications Leverage generics to create very flexible frameworksLearn how to implement common design patterns in a protocol-oriented wayBook DescriptionProtocol-oriented programming is an incredibly powerful concept at the heart of Swift's design. Swift's standard library was developed using POP techniques, generics, and first-class value semantics; therefore, it is important for every Swift developer to understand these core concepts and take advantage of them. The fourth edition of this book is improved and updated to the latest version of the Swift programming language.This book will help you understand what protocol-oriented programming is all about and how it is different from other programming paradigms such as object-oriented programming. This book covers topics such as generics, Copy-On-Write, extensions, and of course protocols. It also demonstrates how to use protocol-oriented programming techniques via real-world use cases. By the end of this book, you will know how to use protocol-oriented programming techniques to build powerful and practical applications.What you will learnLearn the differences between object-oriented programming and protocol-oriented programmingUnderstand why value types should be prioritized over reference typesDelve into protocols, protocol inheritance, protocol composition, and protocol extensionsLearn how to implement COW (Copy-On-Write) within your custom value typesUnderstand how memory management works in Swift and how to avoid common pitfallsDesign applications by starting with the protocol rather than the implementationWho this book is forThis book is intended for Swift developers who have, at minimum an introductory knowledge of the Swift programming language and would like to understand how they can use Protocol-Oriented Programming techniques in their applications.
备用描述
**Get up to speed with the protocol-oriented programming paradigm to ensure better code maintainability and increased performance with Swift programming**
* Use protocol-oriented programming to enhance your applications
* Use generics to create flexible frameworks
* Learn how to implement common design patterns in a protocol-oriented way
Protocol-oriented programming (POP) is an incredibly powerful concept at the heart of Swift's design. Swift's standard library was developed using POP techniques, generics, and first-class value semantics, which makes it important for every Swift developer to understand these core concepts and use them effectively. This updated fourth edition will help you get to grips with the latest version of the Swift programming language.
By the end of this book, you will have learned how to use protocol-oriented programming techniques to build powerful and practical applications.
* Explore the differences between object-oriented programming and protocol-oriented programming
* Understand why value types should be prioritized over reference types
* Delve into protocols, protocol inheritance, protocol composition, and protocol extensions
* Become well-versed with implementing COW (Copy-On-Write) within your custom value types
* Understand how memory management works in Swift and how to avoid common pitfalls
* Design applications by starting with the protocol rather than the implementation
This book is for Swift developers who have basic knowledge of the Swift programming language and are looking to understand how they can use protocol-oriented programming techniques in their applications.
1. Starting with the Protocol
2. Our Type Choices
3. Extensions
4. Generics
5. Memory Management
6. Object-Oriented Programming
7. Protocol-Oriented Programming
8. Adopting Design Patterns in Swift
9. Case Studies
备用描述
Protocol-oriented programming is an incredibly powerful concept at the heart of Swift's design. Swift's standard library was developed using POP techniques, generics, and first-class value semantics; therefore, it is important for every Swift developer to understand these core concepts and take advantage of them. The fourth edition of this book is improved and updated to the latest version of the Swift programming language. This book will help you understand what protocol-oriented programming is all about and how it is different from other programming paradigms such as object-oriented programming. This book covers topics such as generics, Copy-On-Write, extensions, and of course protocols. It also demonstrates how to use protocol-oriented programming techniques via real-world use cases. By the end of this book, you will know how to use protocol-oriented programming techniques to build powerful and practical applications
备用描述
The Swift standard library is developed using protocol-oriented programming techniques, generics, and first-class value semantics; therefore it is important that every Swift developer understand these powerful concepts and how to take advantage of them. This book will demonstrate how to use protocol-oriented programming techniques to build ..
开源日期
2020-10-24
更多信息……

🚀 快速下载

成为会员以支持书籍、论文等的长期保存。为了感谢您对我们的支持,您将获得高速下载权益。❤️

🐢 低速下载

由可信的合作方提供。 更多信息请参见常见问题解答。 (可能需要验证浏览器——无限次下载!)

所有选项下载的文件都相同,应该可以安全使用。即使这样,从互联网下载文件时始终要小心。例如,确保您的设备更新及时。
  • 对于大文件,我们建议使用下载管理器以防止中断。
    推荐的下载管理器:JDownloader
  • 您将需要一个电子书或 PDF 阅读器来打开文件,具体取决于文件格式。
    推荐的电子书阅读器:Anna的档案在线查看器ReadEraCalibre
  • 使用在线工具进行格式转换。
    推荐的转换工具:CloudConvertPrintFriendly
  • 您可以将 PDF 和 EPUB 文件发送到您的 Kindle 或 Kobo 电子阅读器。
    推荐的工具:亚马逊的“发送到 Kindle”djazz 的“发送到 Kobo/Kindle”
  • 支持作者和图书馆
    ✍️ 如果您喜欢这个并且能够负担得起,请考虑购买原版,或直接支持作者。
    📚 如果您当地的图书馆有这本书,请考虑在那里免费借阅。