Creating Observables - Getting Started with RxKotlin in Android - raywenderlich.com HD

13.12.2018
Go over several methods you can use to create observables from individual values and collections of values. View the playlist here: https://www.youtube.com/playlist?list=PL23Revp-82LJQpmHuuwe4fvjkXg6pWxv0 View the episode / download course materials: https://www.raywenderlich.com/7419-beginning-rxkotlin/lessons/4 View the complete course here: https://www.raywenderlich.com/7419-beginning-rxkotlin/lessons/1 --- About www.raywenderlich.com: https://www.raywenderlich.com/384-reactive-programming-with-rxandroid-in-kotlin-an-introduction raywenderlich.com is a website focused on developing high quality programming tutorials. Our goal is to take the coolest and most challenging topics and make them easy for everyone to learn – so we can all make amazing apps. We are also focused on developing a strong community. Our goal is to help each other reach our dreams through friendship and cooperation. As you can see below, a bunch of us have joined forces to make this happen: authors, editors, subject matter experts, app reviewers, and most importantly our amazing readers! --- From raywenderlich.com: Reactive programming is not just another API. It’s a whole new paradigm and a very useful one. RxJava is a reactive implementation used on Android. Android is a perfect place to start your exploration of the reactive world. It’s made even easier with RxAndroid, a library that wraps asynchronous UI events to be more RxJava like. Don’t be scared — I’ll bet the basic concept of reactive programming is known to you even if you are not aware of it yet. :] Before creating your first observable, indulge yourself with a bit of a theory first. :] In imperative programming, an expression is evaluated once and a value is assigned to a variable. On the other hand, reactive programming is all about responding to value changes. You have probably done some reactive programming — even if you didn’t realize it at the time. Defining cell values in spreadsheets is similar to defining variables in imperative programming. Defining cell expressions in spreadsheets is similar to defining and operating on observables in reactive programming. The spreadsheet assigns cell B1 with a value of 2, cell B2 with a value of 3 and a third cell, B3, with an expression that multiplies the value of B1 by the value of B2. When the value of either of the the components referenced in the expression changes, the change is observed and the expression is re-evaluated automagically in B3: As you probably know, it’s possible to use Java libraries in Kotlin projects thanks to Kotlin’s language compatibility with Java. If that’s the case, then why was RxKotlin created in the first place? RxKotlin is a Kotlin wrapper around RxJava, which also provides plenty of quite useful extension functions. Effectively, RxKotlin makes working with RxJava more Kotlin-y. In this article, we’ll focus on using RxJava, since it’s critical to understand the core concepts of this approach, however everything

Похожие видео

Показать еще