Asynchronous Programming with Swiftui and Combine: Functional Programming to Build Uis on Apple Platforms
Friese, Peter
- 出版商: Apress
- 出版日期: 2023-01-14
- 售價: $2,290
- 貴賓價: 9.5 折 $2,176
- 語言: 英文
- 頁數: 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是蘋果的函數式反應式編程框架,它與SwiftUI和其他框架(如網絡API)自然地相輔相成。使用Combine,您可以訂閱事件並以無副作用的方式描述數據處理。這使得實現事件驅動的應用程式更加容易。
使用SwiftUI和Combine,在較短的時間內構建更少錯誤的應用程式,並且幾乎不需要額外的工作量,以支援蘋果的所有平台(iOS、iPadOS、watchOS、macOS、tvOS)。
通過閱讀本書,您將對使用SwiftUI、Combine和async/await以聲明式和函數式反應式方式架構和實現UI豐富的應用程式有扎實的理解。
您將會:
- 在SwiftUI中構建簡單且逐漸複雜的UI
- 理解SwiftUI的狀態管理系統
- 使用Combine和Swift的新的async/await API來訪問網絡和其他異步API
- 使用SwiftUI、Combine和async/await在蘋果平台上架構和結構現代應用程式。
作者簡介
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.
作者簡介(中文翻譯)
Peter Friese是Google Firebase團隊的開發者倡導者,協助全球開發者使用Firebase和其他技術來建立更好的應用程式。儘管他對iOS和Swift有著深厚的熱愛,但他成功說服Google雇用他。在開始從事電腦工作之前,Peter曾兼職作為放映師、園藝師,以及在一家圖書倉庫工作,而這是在亞馬遜成立之前的很久以前。