Jump to content

Topic on Talk:Design System Team/Server rendering background info

Server-only rendering using other technologies

1
Adamw (talkcontribs)

Looking at the next step after Vue, I've become aware of Elixir's Phoenix LiveView while working on personal projects, and it shows how a better model of SSR might work. I'll briefly explain here in the hope of giving us an ideal to keep in mind—obviously it isn't feasible to rewrite our backend in another language.

The short background is that Phoenix does all rendering on the server, and if JS is available on the client then a websocket connection is opened and interactivity is implemented by sending data, events, and HTML deltas through this socket.

  • (+) Constant render performance.
  • (+) Low requirements for client JS support.
  • (+) No need to expose custom APIs for fetching data, for example the database can be queried directly.
  • (+) Reactivity is transparent to the application.
  • (+) UI is declared as HTML and components, much like Vue.
  • (-) Application latency is dominated by upstream network latency so there is a tradeoff along the lines of "thin vs. thick" client.
  • (-) Tech stack is unfamiliar to most MediaWiki developers and SRE.

Something similar has been developed for PHP: Livewire.

Reply to "Server-only rendering using other technologies"