3 ms·
I've only used Elixir/Phoenix as the backend with Elm as the frontend. If you're familiar with that, can you TL;DR what Phoenix Liveview does differently than
by ryan-duve 2y ago
I've only used Elixir/Phoenix as the backend with Elm as the frontend. If you're familiar with that, can you TL;DR what Phoenix Liveview does differently than a Phoenix/Elm/GraphQL stack?
- paradox460 2y agoLiveview nearly eliminates the boundary between backend and frontend. Your forms, inputs, outputs, whatever, just become another GenServer with a few special callbacks. You no longer have to worry about an API and syncing data from client to server. The transport layer becomes invisible
- krainboltgreene 2y agoIt's not even worth it to talk about GenServer or special callbacks. Any idiot can just think of it as "phx-{binding}" html attribute and "handle_event".
- krainboltgreene 2y agoYes. You get to drop the javascript compile and the graphql and you speak purely in three languages: 1. elixir: def handle_event("save_customer", params, socket)... 2. html: <form :for={@form} phx-submit="save_customer"> 3. And sometimes rarely javascript: this.pushEvent("reorder_customer_priorities") That's it. No compiler, no type annotations, no graphql layer.