4 ms·
There are some interesting implementations out there taking advantage of persistent connections to allow the server to handle the rendering while having targete
by toolz 8y ago
There are some interesting implementations out there taking advantage of persistent connections to allow the server to handle the rendering while having targeted fragment updates come from the server.
Here's a thread I posted about some FOSS I've been working on that relies entirely on the server for rendering and using VDOM diff/patching on the server for updates. I'm definitely biased, but in my opinion this approach is vastly more user friendly because it enables realtime data updates as easily as request/response style updates.
here's the thread https://news.ycombinator.com/item?id=18318415 https://news.ycombinator.com/item?id=18318415
if you need some click bait, here's a gif of me in seattle over cell phone internet interacting with a SSR realtime app with the server in cali. https://imgur.com/z8pKt8t https://imgur.com/z8pKt8t - all operations going round trip, with no application level JS written
- sj3k 8y agoIs this kinda how next.js works? I have not used it myself but I think it looks neat.
- thecatspaw 8y agohaving worked with JSF, I can safely say that me and server side rendering with peristent client connection to push updates are ... not friends. You have multiple scopes in the same document. You have the jsp scopes which gets rendered once, when the client requests the page, and the jsf scope which lives longer. Initially when rendering these scopes seem to share variables, but after the request is rendered, the jsp scope gets removed
- toolz 8y agoI promise you that your complains are with the abstractions chosen and implementation and not the concept. Texas doesn't have any of the issues you're talking about. You don't even worry about the data that populates the view. You simply write view code like any other templating engine that knows how to render itself and when data changes you send a small message to a process that handles updating the client and texas handles all the logic for efficiently updating its client.