Coder Social home page Coder Social logo

forester-html's Introduction

Some of this code has served it's purpose as a proof of concept:

[[https://git.sr.ht/~jonsterling/ocaml-forester/tree/dream]] [[https://lists.sr.ht/~jonsterling/forester-devel/%[email protected]%3E]]

I will still be experimenting with this codebase, as there are still a lot of things worth exploring with Dream+HTMX.

Quickstart

Put some trees in ./static and run dune exec --watch forester_html

What

An alternative rendering architecture for forester which uses

instead XML and XSLT.

Here is the idea: Instead of rendering the entire forest to HTML in bulk and serving it statically, we use the Dream http framework and compute HTML fragments on demand. Jon has said that his large personal forest takes 20? seconds to build.

Why

HTMX extends HTML by allowing any element to perform HTTP transactions and allowing the programmer to replace any element in the DOM instead of the entire page. This means we can just write a bunch of functions f: forest -> HTML and use them in the UI in a flexible manner, allowing for more interactivity.

We can send diagnostics rendered to HTML to the browser via SSE and Websockets

Furthermore, it will allow us to get and render trees at runtime, which is useful if I want to transclude trees from other forests.

Possibilities

  • Managing forests from the frontend via http calls (e.g. "create new tree"-button)

  • cross-forest transclusions should (!?) be easy?

  • Teacher-student interactions

  • Showing diagnostics in the browser at relevant locations.

Blockers

I haven't figured out if it is possible to keep the server running when a fatal Asai error occurs. We want to report errors to the browser and keep running.

References

Hypermedia Systems by Carson Gross, Adam Stepinski and Deniz Akşimşek

forester-html's People

Contributors

kentookura avatar

Stargazers

Javier Garea avatar Lîm Tsú-thuàn avatar Tim Kersey avatar Masanori Ogino avatar Jon Sterling avatar favonia avatar

Watchers

Jon Sterling avatar Owen Lynch avatar  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.