ENGLISH

Reactive Programming with Kotlin : Learn RX with RxJava, RxKotlin and RxAndroid

Book information

Publisher
Razeware LLC
Year
2021
ISBN
1950325253, 9781950325252
Language
english
Format
PDF
Filesize
38 MB (39725701 bytes)
Edition
Second
Pages
492\465
Time added
2022-02-28 19:54:15

Description

Learn Reactive Programming in Kotlin with RxJava! 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 RxJava to create complex reactive applications on Android, you'll also see how to solve common application design issues by using RxJava. 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 Android developers who already feel comfortable with the Android SDK and Kotlin, and want to dive deep into development with RxJava, RxKotlin, and RxAndroid. Topics Covered in Reactive Programming with Kotlin:Getting Started: Get an introduction to the reactive programming paradigm, learn the terminology involved, and see how to begin using RxJava 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 tools such as filtering, transforming, combining, and timing operators.UI Development: RxJava and companion libraries make it easy to work with the UI of your apps, providing a reactive approach to handling user events.Intermediate Topics: Level up your RxJava knowledge with chapters on reactive networking, error handling, and schedulers.Advanced Topics: Round out your RxJava education by learning about app architecture, repositories, and integrating RxJava with Android Jetpack.And much, much more! By the end of the 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! Book License Book Source Code & Forums What You Need Book Updates About the Cover Chapter 1: Hello, RxJava! Defining RxJava and RxKotlin Introducing asynchronous programming Learning the foundations of RxJava App architecture RxAndroid and RxBinding Installing RxJava Community Key points 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 The create operator Creating observable factories Using other observable types Challenges Key points Chapter 3: Subjects Getting started What are subjects? Working with publish subjects Working with behavior subjects Working with replay subjects Working with async subjects Working with the RxRelay library Challenge Key points Where to go from here? Chapter 4: Observables & Subjects in Practice Getting started Using a BehaviorSubject in a ViewModel Adding photos Communicating with other views via subjects Creating a custom observable Review: Single, Maybe, Completable Using Single in the app Key points Where to go from here? Chapter 5: Filtering Operators Getting started Ignoring operators Skipping operators Taking operators Distinct operators Challenge Key points Where to go from here? Chapter 6: Filtering Operators in Practice Improving the Combinestagram project Challenge Key points Where to go from here? Chapter 7: Transforming Operators Getting started Transforming elements Transforming inner observables Observing events Challenge Key points Where to go from here? Chapter 8: Transforming Operators in Practice Getting started with GitFeed Fetching data from the web Transforming the response Processing the response Persisting objects to disk Adding a last-modified header Challenge Key points Where to go from here? Chapter 9: Combining Operators Getting started Prefixing and concatenating Merging Combining elements Triggers Switches Combining elements within a sequence Challenge: The zip case Key points Where to go from here? Chapter 10: Combining Operators in Practice Getting started Preparing the EONET API class Add events into the mix Combining events and categories Downloading in parallel Wiring up the days seek bar Challenge: Adding a progress bar Key points Where to go from here? Chapter 11: Time-Based Operators Getting started Buffering operators Time-shifting operators Timer operators Challenge Key points Chapter 12: Error Handling in Practice Getting started Managing errors Handling errors with catch Catching errors Retrying on error Errors as objects Challenges Key points Where to go from here? Chapter 13: Intro to Schedulers What is a scheduler? Setting up the project Switching schedulers Pitfalls Best practices and built-in schedulers Key points Where to go from here? Chapter 14: Flowables & Backpressure Backpresssure Buffering danger! Natural backpressure Introduction to Flowables Backpressure strategies Flowables, Observables, Processors and Subjects — Oh, My! Key points Where to go from here? Chapter 15: Testing RxJava Code Getting started Introduction to TestObserver Using a TestScheduler Injecting schedulers Using Trampoline schedulers Using subjects with mocked data Testing ColorViewModel Key points Where to go from here? Chapter 16: Creating Custom Reactive Extensions Getting started Extending a framework class Wiring the extension up Wrapping the locations API The lift and compose functions Testing your custom reactive extension Key points Where to go from here? Chapter 17: RxBindings Getting started Extending ValueAnimator to be reactive Using RxBindings with Android widgets Dangerzone! Working around the issue Fetching colors from an API Displaying an information dialog Challenges Key points Where to go from here? Chapter 18: Retrofit Getting started Recap of Retrofit Including Rx adapters Creating a JSON object Updating the JSON Retrieving JSON Key points Where to go from here? Chapter 19: RxPreferences Getting started Using SharedPreferences Listening for preference updates Using RxPreferences Subscribing to preference changes Dealing with old versions of RxJava Saving custom objects Key points Where to go from here? Chapter 20: RxPermissions Getting started Requesting the location permission Using RxPermissions Requesting another permission Reading from external storage Writing the weather to external storage Reacting to orientation changes Key points Where to go from here? Chapter 21: RxJava & Jetpack Getting started RxJava and Room Reacting to database changes Updating individual items Starting the app with cached data Paging data in Key points Where to go from here? Chapter 22: Building a Complete RxJava App Introducing QuickTodo Architecting the application Task model Task data access object Task repository Replacing callbacks with observables Editing tasks Challenges Where to go from here? Conclusion

Similar books