Asynchronous Programming with Swiftui and Combine: Functional Programming to Build Uis on Apple Platforms
暫譯: 使用 SwiftUI 和 Combine 的非同步程式設計:在 Apple 平台上構建 UI 的函數式程式設計

Friese, Peter

  • 出版商: Apress
  • 出版日期: 2023-01-14
  • 售價: $2,350
  • 貴賓價: 9.5$2,233
  • 語言: 英文
  • 頁數: 418
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1484285719
  • ISBN-13: 9781484285718
  • 相關分類: Apple Developer使用者介面 UI
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

Develop UI-heavy applications more easily, faster, and error-free. Based on several enhancements to the Swift language, SwiftUI takes a declarative approach to building UIs. Instead of imperatively coding the UI, this book will show you how to describe how you want your UI to look.

SwiftUI treats the UI as a function of its state, thereby making managing your app's state a lot easier. Change the underlying data model to redraw all parts of the UI that are connected to that particular slice of data. Likewise, easily update the underlying data model from the UI elements your data model is connected to. Combine is Apple's Functional Reactive Programming framework. It complements SwiftUI and other frameworks, such as the networking APIs, in a natural way. Using Combine, you can subscribe to events and describe data processing in a way that is free of side effects. This allows for an easier implementation of event-driven applications.

 

Using SwiftUI and Combine build more error-free apps in a shorter amount of time, targeting all of Apple's platforms (iOS, iPadOS, watchOS, macOS, tvOS) with little to no overhead.

By the end of the book you will have a solid understanding for architecting and implementing UI-heavy apps in a declarative and functional reactive way using SwiftUI, Combine, and async/await.

 

You will:

- Build simple and gradually more complex UIs in SwiftUI

- Understand SwiftUI's state management system

- Work with Combine and Swift's new async/await APIs to access the network and access other asynchronous APIs

- Architect and structure modern applications on Apple platforms using SwiftUI, Combine, and async/await

 

商品描述(中文翻譯)

開發以 UI 為重的應用程式變得更簡單、更快速且無錯誤。基於對 Swift 語言的幾項增強,SwiftUI 採取了一種聲明式的方法來構建 UI。本書將向您展示如何描述您希望 UI 的外觀,而不是以命令式的方式編寫 UI 代碼。

SwiftUI 將 UI 視為其狀態的函數,從而使管理應用程式的狀態變得更加容易。更改底層數據模型以重新繪製所有與該特定數據片段相連的 UI 部分。同樣,您可以輕鬆地從與數據模型相連的 UI 元素更新底層數據模型。Combine 是 Apple 的函數式反應式編程框架。它以自然的方式補充了 SwiftUI 和其他框架,例如網絡 API。使用 Combine,您可以訂閱事件並以無副作用的方式描述數據處理。這使得事件驅動應用程式的實現變得更容易。

使用 SwiftUI 和 Combine 在更短的時間內構建更無錯誤的應用程式,針對所有 Apple 平台(iOS、iPadOS、watchOS、macOS、tvOS)幾乎沒有開銷。

到本書結束時,您將對使用 SwiftUI、Combine 和 async/await 以聲明式和函數式反應式的方式架構和實現以 UI 為重的應用程式有扎實的理解。

您將:

- 在 SwiftUI 中構建簡單且逐漸更複雜的 UI
- 理解 SwiftUI 的狀態管理系統
- 使用 Combine 和 Swift 的新 async/await API 訪問網絡和其他異步 API
- 使用 SwiftUI、Combine 和 async/await 在 Apple 平台上架構和結構現代應用程式

作者簡介

Peter Friese is a Developer Advocate on the Firebase team at Google, helping developers worldwide to build better apps using Firebase and other technologies. He managed to convince Google into hiring him despite or just because of his deep-rooted love for iOS and Swift. Before he started working with computers, Peter worked part-time as a projectionist, landscape gardener, and in a book warehouse long before Amazon was founded.

作者簡介(中文翻譯)

彼得·弗里斯是谷歌Firebase團隊的開發者倡導者,幫助全球開發者使用Firebase和其他技術來構建更好的應用程式。他成功說服谷歌聘用他,儘管或正因為他對iOS和Swift的深厚熱愛。在開始從事計算機工作之前,彼得曾在亞馬遜成立之前,兼職擔任放映師、園藝師和書籍倉庫工作。