Reactive Programming with Swift 4: Build asynchronous reactive applications with easy-to-maintain and clean code using RxSwift and Xcode 9

Navdeep Singh

  • 出版商: Packt Publishing
  • 出版日期: 2018-02-26
  • 定價: $1,480
  • 售價: 6.0$888
  • 語言: 英文
  • 頁數: 320
  • 裝訂: Paperback
  • ISBN: 178712021X
  • ISBN-13: 9781787120211
  • 相關分類: Apple Developer
  • 立即出貨 (庫存=1)

買這商品的人也買了...

商品描述

Learn how to solve blocking user experience and build event based reactive applications with Swift.

Key Features

  • Build fast and scalable apps with RxSwift
  • Apply reactive programming to solve complex problems and build efficient programs with reactive user interfaces
  • Take expressiveness, scalability, and maintainability of your Swift code to the next level with this practical guide

Book Description

RxSwift belongs to a large family of Rx implementations in different programming languages that share almost identical syntax and semantics. Reactive approach will help you to write clean, cohesive, resilient, scalable, and maintainable code with highly configurable behavior.

This book will introduce you to the world of reactive programming, primarily focusing on mobile platforms. It will tell how you can benefit from using RxSwift in your projects, existing or new. Further on, the book will demonstrate the unbelievable ease of configuring asynchronous behavior and other aspects of the app that are traditionally considered to be hard to implement and maintain. It will explain what Rx is made of, and how to switch to reactive way of thinking to get the most out of it. Also, test production code using RxTest and the red/ green approach. Finally, the book will dive into real-world recipes and show you how to build a real-world app by applying the reactive paradigm.

By the end of the book, you'll be able to build a reactive swift application by leveraging all the concepts this book takes you through.

What you will learn

  • Understand the practical benefits of Rx on a mobile platform
  • Explore the building blocks of Rx, and Rx data flows with marble diagrams
  • Learn how to convert an existing code base into RxSwift code base
  • Learn how to debug and test your Rx Code
  • Work with Playgrounds to transform sequences by filtering them using map, flatmap and other operators
  • Learn how to combine different operators to work with Events in a more controlled manner.
  • Discover RxCocoa and convert your simple UI elements to Reactive components
  • Build a complete RxSwift app using MVVM as design pattern

Who This Book Is For

This book is for the developers who are familiar with Swift and iOS application development and are looking out to reduce the complexity of their apps. Prior experience of reactive programming is not necessary.

Table of Contents

  1. A new upgrade is available : Swift 3 to Swift 4
  2. FRP fundamentals, terminology and basic building blocks
  3. Setup RxSwift and convert a basic Login app to its RxSwift counterpart
  4. When to become Reactive?
  5. Filter, Transform and Simplify
  6. Reduce by combining and filtering and common trade offs
  7. React to UI events: start subscribing
  8. RxTest and Custom Rx Extensions : Testing with Rx
  9. Testing your RxCode- testing Asynchronous code
  10. Schedule your tasks, don't Queue!
  11. Subscribe to errors and save your app
  12. Functional and Reactive App-architecture
  13. Put your knowledge to practice : Finish a real world application

商品描述(中文翻譯)

學習如何解決阻塞使用者體驗並使用Swift建立基於事件的反應式應用程式。

主要特點:
- 使用RxSwift建立快速且可擴展的應用程式
- 應用反應式程式設計解決複雜問題並建立具有反應式使用者介面的高效程式
- 透過這本實用指南,將您的Swift程式碼的表達性、可擴展性和可維護性提升到新的水平

書籍描述:
RxSwift屬於不同程式語言中的Rx實現的大家族,它們幾乎具有相同的語法和語義。反應式方法將幫助您撰寫乾淨、具有連貫性、具有彈性、可擴展且易於維護的程式碼,並具有高度可配置的行為。

本書將介紹您進入反應式程式設計的世界,主要專注於移動平台。它將告訴您如何在現有或新的專案中使用RxSwift受益。此外,本書還將展示配置非同步行為和其他傳統上被認為難以實現和維護的應用程式方面的令人難以置信的簡單性。它將解釋Rx由何而成,以及如何轉換為反應式思維方式以充分利用它。此外,使用RxTest和紅/綠方法測試生產代碼。最後,本書將深入探討實際應用程式並展示如何應用反應式範式來建立真實應用程式。

通過閱讀本書,您將能夠利用本書介紹的所有概念來建立一個反應式的Swift應用程式。

您將學到:
- 了解在移動平台上使用Rx的實際好處
- 探索Rx的基本構建塊和Rx資料流程
- 學習如何將現有程式碼轉換為RxSwift程式碼庫
- 學習如何調試和測試您的Rx程式碼
- 使用Playgrounds來使用map、flatmap和其他運算子轉換序列
- 學習如何結合不同的運算子以更受控制地處理事件
- 探索RxCocoa並將簡單的UI元素轉換為反應式元件
- 使用MVVM作為設計模式來建立完整的RxSwift應用程式

本書適合對Swift和iOS應用程式開發熟悉並希望降低應用程式複雜性的開發人員。不需要有反應式程式設計的先前經驗。

目錄:
1. 升級提示:從Swift 3升級到Swift 4
2. FRP基礎知識、術語和基本構建塊
3. 設置RxSwift並將基本登入應用程式轉換為RxSwift版本
4. 何時轉為反應式程式設計?
5. 過濾、轉換和簡化
6. 通過組合和過濾減少和常見的折衷
7. 對UI事件做出反應:開始訂閱
8. RxTest和自定義Rx擴展:使用Rx進行測試
9. 測試您的Rx程式碼-測試非同步程式碼
10. 安排您的任務,不要排隊!
11. 訂閱錯誤並保存您的應用程式
12. 函數式和反應式應用程式架構
13. 將您的知識付諸實踐:完成一個真實應用程式