Wednesday, August 17, 2022

Rubio-Radio Bookmarking & Async Gradual Fetching

Recently, I blogged about how I contributed Pagination/Filtering support to Rubio-Radio, an Internet radio application built with Ruby and Glimmer DSL for LibUI.

Again, a Rubio-Radio GitHub Pull Request that I submitted for Bookmarking & Async Gradual Fetching features has been accepted and merged into the project by its owner.

Async Gradual Fetching enables pulling radio stations from the Radio Browser web API gradually in small chunks when the app starts to avoid making the user wait when launching the app before they can play radio stations.

In this animated gif that demonstrates Async Gradual Fetching of radio stations upon app startup, note how the number of pages of radio stations is increasing gradually till it reaches the max (loading about 33,000 radio stations in 1,650 pages).


Bookmarking enables remembering radio stations that the user likes and then displaying them all together in one view. The user may even display the currently playing radio stations in case it gets lost with navigation to various pages of radio stations.

Check out this animated gif demo of bookmarking, viewing bookmarks, and viewing currently playing radio station.


In any case, the code of the Rubio-Radio project has been refactored to follow an official MVC pattern in its structure, separating the Views from the Models (Controllers are implicit in the View listeners, such as the `on_clicked` table listeners).

Here is the code of the Radio view, which makes use of the unidirectional/bidirectional data-binding DSL of Glimmer DSL for LibUI (using <= or <=> to indicate flow of data between View & Model):

And, that's all folks!

No comments: