GithubHelp home page GithubHelp logo

rxify's Introduction

Rxify

Started with a simple demo for the talk at droidconIN 2016, Banglore. Will keep adding more demos and new things here :)

Project Structure

This project :

Zip-yosa (ZipActivity)

Perform API calls asynchronously and wait for the result of both the calls to combine the result. For more information, checkout this article.

  • We are waiting for FluxWeed API call.

  • We are also waiting for Student API call to get hair of Crab.

  • Both the calls executing asynchronously.

  • Problem :

    • Initialise PolyJuice from the results of API calls.
    • Hide the loader after both calls have completed.

    Here's the demo :

    Here's the demo

Preserving Order in AutoComplete-Search (LibraryActivity)

Depicting the problem of Ordering the results in Auto-Search and solving it using concatMap(). For more information, checkout this [article] (https://medium.com/@ragdroid/rxify-maintaining-order-in-auto-complete-search-d5c46ba26578#.f367qiy0u)

  • Perform Auto-Complete Search using flatMap() - results in unordered results
  • Toggle state to fix it using concatMap()
  • used BookDataSource and calling getBooks(query) on the data source return the results after a delay which is inversely proportional to the length of query string. - this is done to depict the ordering problem
  • used the open-source library used at my current company Fueled - [reclaim] (https://github.com/Fueled/reclaim) which extracts the boiler plate for creation of recyclerview adapter, implementation of MVP for listview items.

Using flatMap() - Order is not maintained.

Using flatMap()

Using concatMap() - Order is maintained.

Using concatMap()

Ordering problem is fixed, but we shouldn't be updating the list this frequently. switchMap() will improve the results even further :

Using switchMap() - Order is maintained.

Using switchMap()

TO-DO

  • Implement more demos.

rxify's People

Contributors

ragdroid avatar

Watchers

Mohit Virmani avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.