Hi guys, what are your thoughts about lightweight labs, datastar, server side rendering? I admit that I don't understand how it works with js deps and I don't have any clue how the fulcro app could be served as a datastar.
@bhlieberman93 sse fulcro remote?
Yeah, I guess since datastar seems mostly about sending back HTML it wouldn't really work with a VDOM-based library like react, but I suppose you could use dangerouslySetInnerHTML if you could conceive of a reason to do so
The recommended approach with these server side libraries is the other way around, to use v-dom libraries as embedded islands when needed.
Island as one virtual table on the page?
What do you mean by one virtual table?
To have a normal fulcro app with one html element rendered with SSE. Like a huge report.
All that stuff is just SSE right? I suppose you could make an SSE remote
About server side rendering, I have been working on a Clojure + HTMX app for last 2 years now. Honestly I'm impressed with how much we got done just with HTMX alone. UIs are non trivial, things like Kanban boards with SSE for real time collaboration, drag and drop etc.. The codebase is also a lot leaner since we barely have any client side code to worry about, so no routing, auth, complex build system, etc.. The page loads themselves are measured in kilobytes so it's very performant on slow networks. It's simple. My 2 cents: for most CRUD apps there's no need for complex client frameworks, you can sprinkle in Alpine, Hyperscript, Reagent / for smaller components or Fulcro for subsections of the app when needed.
Out of curiosity, what does deployment look like? One single machine? I was wondering how htmx / datastar would work with HA deployments, ie. multiple server replicates.
Pretty much one single machine at the moment. It's both in startup phase and distributed smaller systems accross few smaller tenants. To scale up we'd need to add some kind of state accros the tenant's machines for the SSE clients. As side note, one Clojure machine can be beefed up and take a lot of traffic so you typically can get away with worrying about these things when the time comes.
By that time you likely can afford a few more devs too 🙂
yeah makes sense.
I'm not very familiar with Fulcro actually. React and friends do not like it if you change some of the dom it's operating on. It's architecturally awkward as these tools (HTMX / Datastar) embrace HTML over the wire instead client side rendering - I'd assume the same thing can be said for Fulcro. If I'd want to integrate SSE with a small part of a client side rendered app I'd make the SSE event update some state and let client side rendering do it's thing.
Yeah thats why I said at the outset that I think the correct way to do SSE is to create Fulcro remote that handles it, but as far as I know this is incompatible with Datastar's model
@jj974 any particular use cases in mind or is this just for exploration?
I'm just curious. it looks like an interesting concept.
If I'd want to integrate SSE with a small part of a client side rendered app I'd make the SSE event update some state and let client side rendering do it's thing.I like it. Simple component that just renders the state directly. and sse is mutation