loading...

re: Where Web UI Libraries are Heading VIEW POST

TOP OF THREAD FULL DISCUSSION
re: What I mean is if you are streaming back a response with specific data from the server dynamically the value of service worker caching goes down. L...

What if there was no state management in the backend, and everything moved to the frontend? Sort of like a backend in the frontend. And the actual backend just streams modules of code, compiled or not, as needed by the frontend as soon as the frontend hits calls into those modules; or it streams preemptively in the background for "adjacent" modules?

And when you need something else besides frontend code, like actual data to display, I guess just go the normal way, like we do it now: hit an API endpoint but use some client-side caching mechanism (possibly with local persistance) like SWR or react-query.

Of course, for low power devices, SSR might still be needed... so maybe a solution would be having a mirrored frontend context in the backend, including all frontend platform features (like those that should be provided by a browser). So like having to delegate everything but the presentation layer (the actual UI rendering), to the backend.

This might have security issues that can't be tackled... I'm not sure, but I can't think of a better way.

You might be interested in CloudFlare Workers to pre-render the content:

github.com/tomByrer/awesome-cloudf...

Definitely interested in this, serving from the edge seems really interesting.

Code of Conduct Report abuse