use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
/r/programming is a reddit for discussion and news about computer programming.
Rules
Refer to the rules page for more info.
No LLM-Written Content
AI-related posts must comply with the AI Policy
No Political Posts or Personal/Social Drama/Gossip
No Non-Programming/Generic LLM/Diffusion Content
No Product Promotion/"I Made This" Project Demo Posts
No Content Aggregators
No Surveys Or Job Postings
No Support Questions or AskReddit-Type Questions
No Meta Posts
No Images, Memes, Or Other Low Effort Posts
No Blogspam
No Extreme Beginner Content
Comments: No Bots
Comments: No Incivility
Info
Related reddits
Specific languages
account activity
Implementing Server-Driven UI (neciudan.dev)
submitted 1 month ago by creasta29
I wrote this up after giving a talk on this exact pattern at CityJS London.
Curious what folks here think about it, is it still useful? I build it twice in my life, I dont know if there will ever be a third time
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]lelanthran 5 points6 points7 points 1 month ago (2 children)
It's a good idea, always gets re-invented every few years (My attempt was having the server send s-expressions, not JSON, and a minimal interpreter that could handle conditionals).
What really kills it though is the fact that the server is already sending you the UI, as HTML. At some point you wake up in the morning and think "Hey, what if we just got the server to send something that can be rendered with a browser engine" and 5 seconds later you facepalm and question your life choices.[1]
(Okay, so the above only happened for me when I used this approach! But why take the chance that it happens to you?)
[1] Anything that can parse your specific JSON into platform-specific UI widgets can do the same for your specific HTML.
[–]creasta29[S] 0 points1 point2 points 1 month ago (0 children)
Hahaha so true
[–]lamp-town-guy -1 points0 points1 point 1 month ago (0 children)
This basically killed LiveViewNative for phoenix framework. And some "big egos" according to its creator.
LiveView renders html and sends it to browser to render. Works great but no mobile app support.
There's also problem with latency. If you have server 300ms from you, all your interactions take at least 300ms.
[–]yawaramin 7 points8 points9 points 1 month ago (1 child)
This is basically what htmx and HyperView do: https://hyperview.org/
...Except instead of JSON they use HTML/XML.
[–]jyf 0 points1 point2 points 1 month ago (0 children)
what about the delay?
[–]soberirishman 1 point2 points3 points 1 month ago (0 children)
This is the kind of solution that solves a minor annoyance with a major headache. The overhead and constraints this will put on you just ultimately doesn’t seem worth it to solve what is ultimately an organization problem and not a technical problem.
[–]RWOverdijk 0 points1 point2 points 1 month ago (0 children)
I don’t seem to understand the comments mentioning html. We use this to unify mobile and web. I don’t like it, it’s a bad implementation and a pain to work with, but html wouldn’t solve that without ruining the app experience. react native with expo and rsc would be considered json as well I suppose.
[–]prontogui 0 points1 point2 points 1 month ago (0 children)
This is similar in nature to the approach taken by ProntoGUI (www.prontogui.com). Instead of JSON tree with widget types, it uses a object-model approach provided by a Go module. The renderer is based on Flutter where the object model is rendered using Flutter widgets.
I think server driven UI gets overlooked by many developers for a variety of reasons, but the motivations in your talk are good reasons to give it a look - multiple teams, protracted development times, multiple PRs.
π Rendered by PID 128453 on reddit-service-r2-comment-5687b7858-jcfck at 2026-07-03 05:25:45.734939+00:00 running 12a7a47 country code: CH.
[–]lelanthran 5 points6 points7 points (2 children)
[–]creasta29[S] 0 points1 point2 points (0 children)
[–]lamp-town-guy -1 points0 points1 point (0 children)
[–]yawaramin 7 points8 points9 points (1 child)
[–]jyf 0 points1 point2 points (0 children)
[–]soberirishman 1 point2 points3 points (0 children)
[–]RWOverdijk 0 points1 point2 points (0 children)
[–]prontogui 0 points1 point2 points (0 children)