Hacker News new | past | comments | ask | show | jobs | submit login

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?



Yes. 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.


Liveview 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


It'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".




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: