Combine: Asynchronous Programming with Swift. 3 Ed

Оглавление⌄
Book LicenseWhat You NeedBook Source Code & ForumsAbout the AuthorsAcknowledgmentsChapter 1: Hello, Combine!Asynchronous programmingSwift’s Modern ConcurrencyFoundation of CombineCombine basicsWhat’s the benefit of Combine code over “standard” code?App architectureBook projectsKey pointsWhere to go from here?Chapter 2: Publishers & SubscribersGetting startedHello PublisherHello SubscriberHello CancellableUnderstanding what’s going onCreating a custom subscriberHello FutureHello SubjectDynamically adjusting demandType erasureBridging Combine publishers to async/awaitChallengeKey pointsWhere to go from here?Chapter 3: Transforming OperatorsGetting startedCollecting valuesMapping valuesFlattening publishersReplacing upstream outputIncrementally transforming outputChallengeKey pointsWhere to go from here?Chapter 4: Filtering OperatorsGetting startedFiltering basicsCompacting and ignoringFinding valuesDropping valuesLimiting valuesChallengeKey pointsWhere to go from here?Chapter 5: Combining OperatorsGetting startedPrependingAppendingAdvanced combiningKey pointsWhere to go from here?Chapter 6: Time Manipulation OperatorsGetting startedShifting timeCollecting valuesCollecting values (part 2)Holding off on eventsTiming outMeasuring timeChallengeKey pointsWhere to go from here?Chapter 7: Sequence OperatorsGetting startedFinding valuesQuerying the publisherKey pointsWhere to go from here?Chapter 8: In Practice: Project "Collage Neue"Getting started with “Collage Neue”Presenting viewsWrapping a callback function as a futureSharing subscriptionsOperators in practiceChallengesKey pointsWhere to go from here?Chapter 9: NetworkingURLSession extensionsCodable supportPublishing network data to multiple subscribersKey pointsWhere to go from here?Chapter 10: DebuggingPrinting eventsActing on events — performing side effectsUsing the debugger as a last resortKey pointsWhere to go from here?Chapter 11: TimersUsing RunLoopUsing the Timer classUsing DispatchQueueKey pointsWhere to go from here?Chapter 12: Key-Value ObservingIntroducing publisher(for:options:)Preparing and subscribing to your own KVO-compliant propertiesObservableObjectKey pointsWhere to go from here?Chapter 13: Resource ManagementThe share() operatorThe multicast(_:) operatorFutureKey pointsWhere to go from here?Chapter 14: In Practice: Project "News"Getting started with the Hacker News APIGetting a single storyMultiple stories via merging publishersGetting the latest storiesChallengesKey pointsWhere to go from here?Chapter 15: In Practice: Combine & SwiftUIHello, SwiftUI!Getting started with “News”A first taste of managing view stateFetching the latest storiesUsing ObservableObject for model typesDisplaying errorsSubscribing to an external publisherInitializing the app’s settingsEditing the keywords listChallengesKey pointsWhere to go from here?Chapter 16: Error HandlingGetting startedNeverDealing with failureKey pointsWhere to go from here?Chapter 17: SchedulersAn introduction to schedulersOperators for schedulingScheduler implementationsChallengesKey pointsWhere to go from here?Chapter 18: Custom Publishers & Handling BackpressureCreating your own publishersPublishers as extension methodsThe subscription mechanismPublishers emitting valuesPublishers transforming valuesHandling backpressureKey pointsWhere to go from here?Chapter 19: TestingGetting startedTesting Combine operatorsTesting production codeChallengesKey pointsWhere to go from here?Chapter 20: In Practice: Building a Complete AppGetting startedSetting goalsImplementing JokesViewModelWiring JokesViewModel up to the UIImplementing Core Data with CombineChallengeKey pointsWhere to go from here?Conclusion
Описание
Ниже — практический обзор по теме «combine».
Juggling all of these different mechanisms can be somewhat overwhelming. Writing asynchronous code can be challenging, with a variety of possible interfaces to represent, perform, and consume asynchronous work — delegates, notification center, KVO, closures, etc. Does it have to be this hard? Not anymore!
In this book, you'll learn about Combine — Apple’s framework to work with asynchronous events in a unified and reactive way that ensures your app is always up to date based on the latest state of its data.
Who This Book Is ForThis book is for intermediate iOS developers who already know the basics of iOS and Swift development but are interested in learning declarative/reactive programming and take their app and state management to the next level.
You'll also find this book interesting if you're interested in SwiftUI — as many of the reactive capabilities keeping your SwiftUI views up-to-date are built on top of Combine.
Topics Covered in Combine: Asynchronous Programming with SwiftWhat & Why: Learn what is Combine and reactive programming and the problems they solve, and how you can unify all of your asynchronous piece of work.Operators: Learn how to compose, transform, filter and otherwise manipulate different pieces of asynchronous work using operators.In Practice: You'll gain knowledge on various topics and techniques you'll leverage when writing your own real-life apps, as well as practice these techniques with actual hands-on apps and projects.SwiftUI: You'll learn about how Combine is deeply rooted within SwiftUI and provides it with the ability to reactively update its views based on the state of your app.Advanced Combine: Once you've got a handle on the basics, you'll dive into advanced Combine topics such as Error Handling, Schedulers, and Custom Publishers.By the end of this book, you'll be a pro in building full-fledged applications using Combine's various abilities.
Если материал оказался полезен — сохраните страницу.
Поделиться
Частые вопросы
Можно ли скачать «Combine: Asynchronous Programming with Swift. 3 Ed» бесплатно?
Да, «Combine: Asynchronous Programming with Swift. 3 Ed» доступна для бесплатного скачивания на нашем сайте в формате PDF. Ссылка на файл находится на этой странице.
В каком формате и какого размера файл?
Книга предоставляется в формате PDF, размер файла 3,0 МБ.
Кто автор и когда вышла книга?
автор — Gardner Scott , Mishali Shai , Pillet Florent , Todorov Marin, издательство Razeware LLC., год выпуска 2021, 432 страниц.
О чём книга «Combine: Asynchronous Programming with Swift. 3 Ed»?
Writing asynchronous code can be challenging, with a variety of possible interfaces to represent, perform, and consume asynchronous work — delegates, notification center, KVO, closures, etc.