Jsoo, production use and user facing applications questions

wow… trip down memory-lane :slight_smile:
(partial list)

TZComet:

  • uses Bootstrap 4, trying to also import the Javascript from it
    • which is fine a long as it is used in “closed loop”, once you want to hack something with it you have to deal with jQuery and its weird event system which is annoying. I know there are jquery JSOO bindings but I just wanted to stay as far away as possible from that thing.
    • it’s all accessed through a Bootstrap sub-module that could be made into a library some day (I have seen other such libraries around but not using Lwd)
  • The first draft was made with the familiar Tyxml_js + react/reactiveData but then I switched everything the newer Lwd by @let-def
  • Interesting to write from scratch the HTML-fragment parsing/generation/updating. I guess there could be a library making that easier (but it would have to be so customizable that I don’t know how the API would have to look like).
  • it’s client-only, but talks to the API exposed by public Tezos nodes: it uses maybe 6 or 7 endpoints (?)

ni3.dance:

  • for a personal / music side-project (private repo, sorry)
  • CSS: voluntarily “old-school cyberpunk” so it loads some bootstrap theme as a base but then is mostly all custom incl. the “loading” animations (for images, youtube videos, …) made by just drawing on the canvas
  • the build-system also generates a no-JS version of the website
  • Uses the Tyxml_js + react + reactiveData combo

github.com/hammerlab/ketrew:

  • Used Bootstrap 3 but the CSS part only; all the interactions were written in OCaml.
  • Also Tyxml_js + react + reactiveData combo (first time I used it I think, took inspiration from Thomas’ blog-post on CueKeeper).
  • It has an actual server side, with an API that is also used by the command-line / terminal interface.

Genspio’s web-demo:

  • also a bootstrap theme’s CSS
  • the interesting part is the OCaml REPL running in a webworker and the communication with the main thread (that could also be turned into a higher-level library — maybe somebody already has).
  • binding to the codemirror text editor was hacky but relatively easy (but the semantics of HTML’s textareas are just crazy).

Intranet-WebUI at NYU-Biology:

  • first big webapp I worked on in OCaml
  • using all the power of Ocsigen around 2011/2013 (camlp4 multi-tier, services, scopes, “server-functions”)
  • some historical pain points I remember:
    • the backend libraries were all using JaneSt Core (before core-kernel or base existed) and at the time JSOO code had to be really pure OCaml
    • the build system was a terrifying mix of make and ocamlbuild
  • it had a completely custom CSS

Should mention a bit smartpy.io/ide that I presented this summer which is a mix of JSOO / custom JS / FB-React on the frontend and the project also uses JSOO to to make a node.js CLI application (easier distribution).

10 Likes