Replies: 1 comment 2 replies
-
I'm curious if you have looked into Liveview at all (https://fly.io/blog/liveview-its-alive/). It has lots of cool idea imo about really building a UI thats controlled by the server. Thought i'd throw that out there as both have similar goals as doing as much on the server so may have some ideas could borrow. But will be digging more into your library. I've been looking for an excuse to dive into HTMX. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I just wanted to drop a note about a few things I am thinking about exploring with Elementary:
AsyncHTML
I intend to add an async version of the rendering into the base library, that should (maybe?) help with the leanest possible streaming to an async stream writer (ie: streaming the HTML into a NIO channel with back-pressure more or less directly)
Now that alone is not that exciting, but once we have this, we could add a few things as an add on library:
An AsyncHTML type that takes an async closure which will produce an HTML later, for naturally awaiting things inside you UI component.
An AsyncForEach element, that takes a stream of objects and maps it to HTML (think streaming database cursors directly into HTML views.
And (with a few sendability problems to tackle), maybe a "parallel" option, that would render each list/tuple element in parallel - and reassemble it into an ordered final rendering stream. Not sure about that one though. Thoughts?
ElementaryWasm
Take the core (which I tried to keep very lean) and slap some form of @observable based state-tracking on top to re-render a view tree to the DOM via javascript bindings. Obviously the "reconciling" is a bit of work, but should be doable.
Currently, things should work with embedded, but I have not tried it yet. Keeping things embedded-compatible is quite tricky, so a bit of thinking would need to be done.
At least we could experiment with very lean, reactive WASM web components written in swift.
I would love some help or discussion on this, so feel free to reach out!
Beta Was this translation helpful? Give feedback.
All reactions