RxSwift: Reactive Programming with Swift

RxSwift: Reactive Programming with Swift

RxSwift: Reactive Programming with Swift
Автор: Bontognali Junior, Gardner Scott, Pillet Florent, Todorov Marin
Дата выхода: 2017
Издательство: Razeware LLC.
Количество страниц: 398
Размер файла: 4,0 МБ
Тип файла: PDF
Добавил: codelibs
 Проверить на вирусы  Дополнительные материалы 

Table of Contents : Extended

Introduction

What you need

Who this book is for

How to use this book

What’s in store

Book source code and forums

Book updates

License

About the cover

Section I: Getting Started with RxSwift

Chapter 1: Hello RxSwift!

Introduction to asynchronous programming

Foundation of RxSwift

App architecture

RxCocoa

Installing RxSwift

Community

Where to go from here?

Chapter 2: Observables

Getting started

What is an observable?

Lifecycle of an observable

Creating observables

Subscribing to observables

Disposing and terminating

Creating observable factories

Challenges

Chapter 3: Subjects

Getting started

What are subjects?

Working with PublishSubjects

Working with BehaviorSubjects

Working with ReplaySubjects

Working with Variables

Challenges

Chapter 4: Observables and Subjects in Practice

Getting started

Using a variable in a view controller

Talking to other view controllers via subjects

Which dispose bag to use?

Creating a custom observable

Challenges

Section II: Operators and Best Practices

Chapter 5: Filtering Operators

Getting started

Ignoring operators

Skipping operators

Taking operators

Distinct operators

Challenges

Chapter 6: Filtering Operators in Practice

Improving the Combinestagram project

Sharing subscriptions

Improving the photo selector

Trying out time based filter operators

Challenges

Chapter 7: Transforming Operators

Getting started

Transforming elements

Transforming inner observables

Challenges

Chapter 8: Transforming Operators in Practice

Getting started with GitFeed

Fetching data from the web

Transforming the response

Intermission: Handling erroneous input

Persisting objects to disk

Add a Last-Modified header to the request

Challenges

Chapter 9: Combining Operators

Getting started

Prefixing and concatenating

Merging

Combining elements

Triggers

Switches

Combining elements within a sequence

Challenges

Chapter 10: Combining Operators in Practice

Getting started

Preparing the web backend service

Categories view controller

Adding the event download service

Getting events for categories

Events view controller

Wiring the days selector

Splitting event downloads

Challenges

Chapter 11: Time Based Operators

Getting started

Buffering operators

Time-shifting operators

Timer operators

Challenges

Section III: iOS Apps with RxCocoa

Chapter 12: Beginning RxCocoa

Getting started

Using RxCocoa with basic UIKit controls

Binding observables

Improving the code with Traits

Disposing with RxCocoa

Where to go from here?

Challenges

Chapter 13: Intermediate RxCocoa

Getting started

Showing an activity while searching

Extending CCLocationManager to get the current position

How to extend a UIKit view

Conclusions about RxCocoa

Challenges

Section IV: Intermediate RxSwift/RxCocoa

Chapter 14: Error Handling in Practice

Getting started

Managing errors

Handle errors with catch

Catching errors

Retrying on error

Custom errors

Advanced error handling

Where to go from here?

Challenges

Chapter 15: Intro To Schedulers

What is a Scheduler?

Setting up the project

Switching schedulers

Pitfalls

Best practices and built-in schedulers

Where to go from here?

Chapter 16: Testing with RxTest

Getting started

Testing operators with RxTest

Testing RxSwift production code

Chapter 17: Creating Custom Reactive Extensions

Getting started

How to create extensions

Use custom wrappers

Testing custom wrappers

Common available wrappers

Where to go from here?

Challenges

Section V: RxSwift Community Cookbook

Chapter 18: Table and Collection Views

Basic table view

Multiple cell types

Providing additional functionality

RxDataSources

Chapter 19: Action

Creating an Action

Connecting buttons

Composing behavior

Passing work items to cells

Manual execution

Perfectly suited for MVVM

Chapter 20: RxGesture

Attaching gestures

Supported gestures

Advanced usage

Chapter 21: RxRealm

Auto-updating results

Arrays

Asynchronous first item

Changesets

Single objects

Adding objects

Deleting objects

Chapter 22: RxAlamofire

Basic requests

Request customization

Response validation

Downloading files

Upload tasks

Tracking progress

Section VI: Putting it All Together

Chapter 23: MVVM with RxSwift

Introducing MVVM

Getting started with Tweetie

Challenges

Chapter 24: Building a Complete RxSwift App

Introducing QuickTodo

Architecting the application

Bindable view controllers

Task model

Tasks service

Scenes

Coordinating scenes

Binding the tasks list with RxDataSources

Binding the Task cell

Editing tasks

Challenges

Conclusion

The popularity of reactive programming continues to grow on an ever-increasing number of platforms and languages. Rx lets developers easily and quickly build apps with code that can be understood by other Rx developers — even over different platforms.

Not only will you learn how to use the RxSwift port to create complex reactive applications on iOS, you’ll also see how to easily solve common application design issues by using RxSwift. Finally, you’ll discover how to exercise full control over the library and leverage the full power of reactive programming in your apps.

Who This Book Is For

This book is for iOS developers who already feel comfortable with iOS and Swift, and want to dive deep into development with RxSwift.

Topics Covered in RxSwift

  • Getting Started: Get an introduction to the reactive programming paradigm, learn the terminology involved and see how to begin using RxSwift in your projects.
  • Event Management: Learn how to handle asynchronous event sequences via two key concepts in Rx — Observables and Observers.
  • Being Selective: See how to work with various events using concepts such as filtering, transforming, combining, and time operators.
  • UI Development: RxSwift makes it easy to work with the UI of your apps using RxCocoa, which provides an integration of both UIKit and Cocoa.
  • Intermediate Topics: Level up your RxSwift knowledge with chapters on reactive networking, multi-threading, and error handling.
  • Advanced Topics: Round out your RxSwift education by learning about MVVM app architecture, scene-based navigation, and exposing data via services.
  • And much, much more!

By the end of this book, you’ll have hands-on experience solving common issues in a reactive paradigm — and you’ll be well on your way to coming up with your own Rx patterns and solutions!


Похожее:

Список отзывов:

Нет отзывов к книге.