3 ms·
> how would some typical frontend benefit from this At ElixirConf I built a simple supervisor DOM tree model. When we are ready to implement it for real we're
by bcardarella 7y ago
> how would some typical frontend benefit from this
At ElixirConf I built a simple supervisor DOM tree model. When we are ready to implement it for real we're going to experiment with mapping the DOM to a supervisor. Each node being an element. This way events and rendering take place in each node in the supervisor tree. Rendering would be diff based and merged its way back up. Events would be captured as messages in the idiomatic Erlang/Elixir way.
This is all guess work right now and we don't yet know what will be practical vs what sounds good in theory.
However, we are dedicated to the idea that the programming model of the BEAM is one that complex client-side applications will benefit from over what JavaScript current offers.
- mstade 7y agoThis sounds like an interesting experiment, do you have a repo or anything one could follow?
- bcardarella 7y agohttps://github.com/lumen/db_mon_demo https://github.com/lumen/db_mon_demo There is a db_mon-esque implementation within the source and ultimately this is where the demo will live but for now (and the purposes of that demo at ElixirConf) I went in a different direction
- hopia 7y agoOh wow sounds like a pretty fundamental overhaul of the current DOM model. Then again, various virtual DOM diff implementations have shown they can improve working with the DOM a lot.
- hsavit1 7y agoYeah, the undertaking would be quite extraordinary if they could get it working. Something tells me that this is going to take a few years to develop (preemptively giving a "bravo" if it could be done sooner ;) )
- lawik 7y agoThat sounds pretty close to what Scenic does for OpenGL-rendered UI. Scenic has some interesting properties in that if a specific component has a code problem and fails/crashes, the supervision tree will bring it back to life. I'm curious to see what similar things one could do with Lumen for the web. Components are already a very popular level of abstraction with Vue and React, probably others. So maybe there are useful things to bring from Scenic.
- bcardarella 7y agoScenic is one area that I've looked to for inspiration on what a GUI can be like in Elixir