Learn how to solve blocking user experience and build event based reactive applications with Swift.
About This Book
- 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
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.
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
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.
Style and approach
This book is a definite tutorial in FRP with Swift filled with well-described examples.
Downloading the example code for this book You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.
Table of contents
- Title Page
- Copyright and Credits
- Packt Upsell
Migrating from Swift 3 to Swift 4
What's new in Swift 4?
- Setting up the environment
- Changes/improvements in Dictionary
- Changes/improvements in Strings
- Access modifiers
- What's new
Migrating to Swift 4
- Preparation before migration
- Swift migration assistant
- Swift 4 migration changes overview
- SDK changes
- Notable special cases
- After migration
- Known migration issues
- Using Carthage/CocoaPods projects
- What's new in Swift 4?
FRP Fundamentals, Terminology, and Basic Building Blocks
- Functional reactive programming
- Set up RxSwift and Convert a Basic Login App to its RxSwift Counterpart
When to Become Reactive?
- Creating and subscribing to Observables
- Understanding traits and its types
- Filter, Transform, and Simplify
- Reduce by Combining and Filtering and Common Trade Offs
- React to UI Events – Start Subscribing
- RxTest and Custom Rx Extensions – Testing with Rx
- Testing Your RxCode – Testing Asynchronous Code
- Schedule Your Tasks, Don't Queue!
- Subscribe to Errors and Save Your App
Functional and Reactive App-Architecture
- Design patterns
- Finish a Real-World Application
- Other Books You May Enjoy
- Title: Reactive Programming with Swift 4
- Release date: February 2018
- Publisher(s): Packt Publishing
- ISBN: 9781787120211
You might also like
Mastering Swift 4 - Fourth Edition
Dive into the latest release of the Swift programming language with this advanced development book for …
Grokking Algorithms is a friendly take on this core computer science topic. In it, you'll learn …
Clean Code: A Handbook of Agile Software Craftsmanship
Even bad code can function. But if code isn't clean, it can bring a development organization …
Pro iPhone Development with Swift 5: Design and Manage Top Quality Apps
If you’ve already learned the basics of Swift and iOS programming, it’s time to take your …