Asynchronous Programming with SwiftUI and Combine

Functional Programming to Build UIs on Apple Platforms

Paperback Engels 2023 1e druk 9781484285718
€ 72,99
Levertijd ± 9 werkdagen
Gratis verzonden

Samenvatting

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

Specificaties

ISBN13:9781484285718
Trefwoorden:Programmeren, SwiftSUI
Taal:Engels
Bindwijze:paperback
Aantal pagina's:434
Uitgever:Apress
Druk:1
Verschijningsdatum:14-1-2023
Hoofdrubriek:IT-management / ICT

Lezersrecensies

Wees de eerste die een lezersrecensie schrijft!

Inhoudsopgave

Chapter 1: SwiftUI - A new Beginning
-Why a New UI framework?
-SwiftUI Principles
-Declarative vs Imperative
-State Management
-Composition over Inheritance
-Everything is a View
-UIs are a function of their state
-A quick tour of SwiftUI
-Creating a new app
-Anatomy of a SwiftUI app
-Two-way tooling
-Adding your first button
-Print “hello” to the console
-Explain live mode (need to turn on debug mode so you can see console output while in preview)
-A brief overview of statement management
-Use code editor and preview pane to update the “hello world” app to allow the user to give their name
-TextField, Label, (Button)
-@State to bind the TextField input
-Bind Label, so it gets updated automatically
-Run the app in live preview

Chapter 2: Getting Started with SwiftUI
Building Blocks
-Views
-View Modifiers
-Property Wrappers
-Simple UI Controls
Lists
Navigation
Composing UIs from simple UI elements
-Building a list row
-Making it reusable
-extracting parts into separate structs / views
-using ViewBuilders (properties / functions)

Chapter 3: SwiftUI Foundation
-Opaque return types
-Implicit returns from single-expression functions
-Function Builders
-View Builders
-Multiple Trailing Closures
Domain Specific languages -Property Wrappers
-The View Life Cycle

Chapter 4: State Management
-Managing State with Property Wrappers
@State
@ObservableObject
@ObservedObject
@StateObject
@EnvironmentObject
-SwiftUI Patterns and State Management
-Pattern: Drill-Down Navigation
-Pattern: Input form
-Pattern: Lookup field
-Pattern: Local state in a single dialog
-View Lifecycle
-See Michael Long’s article
-Maybe even build some sort of introspector?
-Build my own debugging utilities
Afgekapt op 61 regels

Managementboek Top 100

€ 72,99
Levertijd ongeveer 9 werkdagen
Gratis verzonden

Rubrieken

Producten

    Auteurs

      Trefwoorden

        Artikelen

          Asynchronous Programming with SwiftUI and Combine