@bob592 yes since v7 the demos are probably a bit old - they should still work for the most part - if anyone runs into issues we can help sort them out
@flyboarder Can you summarize for me the operational semantics of javalin/hoplon vs react? I gather it's doing FRP, just differently, but I don't really get the details yet. The idea of modeling state change as "cells" in a spreadsheet is interesting and not unfamiliar (I worked with someone from more of a CL background who created a similar library, but it did more server-side computation). However, I'm not sure how that works with DOM re-rendering in the CLJS context. I get both React and Elm's approach, which rely on computing diffs of DOM state relative to a virtual DOM. Can you help me understand it?
^ great resource!
With hoplon we swap whats in the dom based on state, however there isnt really any computation done on the DOM, we just store the elements in cljs data collections and then when that changes we put the changes in the DOM
Yep you go it! No V-DOM and we do pay as you go templating so only the current screen elements are created, as you change screens templates are cached and created as you go
I've not read the source yet...how does javelin interact with Hoplon/hlisp ? If a cell changes, a node changes?
with a very special protocol
all the magic is implemented right here:
a “managed element” is an element where we track changes using cells
then when cells change we fire the attribute functions above, attribute-providers implement the logic for each attribute
and here is the magic for how the attributes are implemented:
I guess this would be a decent summary “If a cell changes, a node changes”
OK the video was helpful - I like javelin. But how to understand castra? IOW, MOAR please. 🙂
Also, one thing I want is whole-document control - for example I want different links to css and js depending on certain context (e.g., logged-in?) so that I can render different design if necessary. It looks like hoplon supports that with toplevel html, head and body tags. IOW, I want to mount the whole document, not just some div as in react.
Yup looks like you can do this.
Castra looks really interesting. I'm trying to wrap my head around the idea of component-izing both the back and front end as one unit (library). 🙂
IOW, there is no intermediary "V-DOM" representation of state to compute - data flow results in changing only what needs to be changed... no need to diff because there's no need to search the DOM to see what's "different"...?