HTML and htmx
#1123
Replies: 2 comments 1 reply
-
Thank you for the suggestion! After we finish implementing WebGPU (#507) and GopherJS (#974) along with hardware accelerated rendering and other improvements, we will see whether the performance is sufficient with our current approach, or whether it would make more sense to make the entire app be dynamic HTML/CSS/JS instead. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Oh I meant that you already have html output and a rendering loop . So the idea is to just extend it . Not to drop the GPU rendering |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
this is just a high level idea / proposal …
Cogent has a great way to output html for SEO purposes, whilst also running the Canvas for humans. It’s very smart and I am glad to see this addressed.
About this feature to set some context :
Google calls this “ cloaking”, but don’t ban it. However it’s used for phishing attacks and ad fraud attacks etc . That’s not a deal breaker , but it’s worth knowing about .
Some users have low quality devices or bandwidth, so it’s useful for them too .
Many apps built and used by government / financial / medical must use very little client side code in order to pass their security audits and federal compliance. So it’s great in that regards .
The html renderer of cogent looks like it can pretty easily satisfy to be a htmx loop, so that the html can be updated in response to buttons, forms, etc . It’s now dynamic . So we go from static to dynamic and are still able to serve Desktop and Monile too from the same system.
In fact you could run both html render and canvas rendering at the same time.
3d etc is out of scope. Just too much work ; although A-Frame definitely is related and could be adapted in later.
How to do this well ?
SSR is the default , and gets everyone happy. The js / WASM is sent asynchronously to the client using standard am async loading .
The actual js / WASM send to the client is the exact same code that is running on the server . Yes this is isomorphic.
In CSR mode, the html / htmx is round tripping in only the client . Calls to the server is only fot JSON from the API.
The API being the developers own API.
Devs can choose to not use CSR and stay in SSR mode too though . Thee is no code changes because it’s isomorphic .
Some other bonuses to this:
ARIA , screen reading etc that is required for many compliance situations.
Playing video is now easy . Hard for desktop and mobile until that’s ready one day.
can even be a home page for an app with links to download the desktop and mobile versions.
Beta Was this translation helpful? Give feedback.
All reactions