javascript – Library(ies) to build a simple frontend for JSON-based data


I have a webservice which exposes some data via a RESTful interface, where each endpoint can take one or several filter parameters and returns tabular data as array-of-object in JSON. Think of the data behind the webservice as a relational database, and each API endpoint exposes one table (/ relation). Some of the columns contain foreign keys into other ‘tables’. The whole thing is read-only, no modifications are made through the webservice.

I want to build a simple frontend to look at the data in each table. I want one view per ‘table’ (i.e., webservice API endpoint). The table columns should have a way of adding filters – built filtering should not be done in the frontend; instead, when a filter is added, a new request (with the added filter) must be made to the webservice. The frontend does not need to handle pagination, this is also handled by the webservice.

Some minor data manipulation will be necessary in the front-end. For example, a table may contain two columns foo_a and foo_b, which I would like to display with a “hierarchical table header”, i.e., both columns should have a common header foo, and then the two individual columns should only be labeled a and b, respectively.

Tech Stack

  • I am a C++ backend dev. I know very little about front-end stuff, and I really don’t want to go into C++ GUI development.
  • I know a little JavaScript/HTML/CSS, and can probably dabble in adjacent things like JSX, TypeScript, …
  • For that reason (and because web frontends can be deployed centrally and accessed from many places) I thought about building the whole thing in JavaScript.
  • In principle I’m also pretty fluent in Python, so that would be an option, though I always found GUI development in Python not-much-better than in C++.
  • I do not care whether the solution uses Node, React, … However I do not want to deploy another server-side component. This has to run all client-side, i.e. in the browser if it is based on JavaScript.

What I have found so far

  • Danfo.js could probably handle reading the JSON results from the webservice into DataFrames. It also seems to have a way to render HTML tables. However, these tables come without any interactive functionality – it is unclear how easy it is to add e.g. the ‘click table header to add a filter’ functionality.
  • D3 is touted the ‘swiss army knife of data manipulation’, but as far as I can tell it’s more about plotting and less about tabular visualization.



Source link

Related Posts

About The Author

Add Comment