moja-global/taswira

Pitch: Use Dash for the front-end

abhineet97 opened this issue · 3 comments

The front-end would be responsible for showing the raster files served by the back-end. In this document, I describe my rationale for using the Dash framework for this purpose.

Dash

A Python framework for creating web applications. Under the hood, it uses Flask, React.js and the Plotly.js (a graphing library). It's made specially for building data visualisation apps, which is why I came to know about it.

Why Dash?

The CLI tool taswira and the back-end are all written in Python. Wouldn't it be great if we could build even the front-end in Python?

This was my primary motivation behind selecting Dash. The idea of creating a web app written entirely in Python is incredibly appealing to me. It's something that I've never done. I believe that it would be a great learning opportunity for me.

The other reason is that Dash and Terracotta both use Flask. This means that it should be a straightforward process to combine the two. Dash has even provided us with the necessary documentation for this.

Apart from all that, Leaflet, the map library that I've planned to use, has Dash-specific bindings already available. This, I believe, would greatly simplify the process of building the front-end.

  • Looks good to me. Can you please also include other frameworks similar to dash which can be used as well ?

@kaskou, AFAIK Dash is actually one of its kind Python library.

Do you think that maybe I should include a description of the traditional JavaScript approach?

@kaskou @abhineet97 is this issue solved? If yes, can you please close it?