4 ms·
Phoenix.LiveView — you can't ignore it, the coolest thing happening right now about server-side rendering. Demo: https://youtu.be/Z2DU0qLfPIY?t=2628 https://yo
by lelf 8y ago
Phoenix.LiveView — you can't ignore it, the coolest thing happening right now about server-side rendering.
Demo: https://youtu.be/Z2DU0qLfPIY?t=2628 https://youtu.be/Z2DU0qLfPIY?t=2628
Links: https://leveljournal.com/why-phoenix-liveview-is-a-big-deal https://leveljournal.com/why-phoenix-liveview-is-a-big-deal https://elixirforum.com/t/phoenix-liveview-info/16569 https://elixirforum.com/t/phoenix-liveview-info/16569
PS please stop calling it isomorphic — this is disgrace for the mathematics.
- jypepin 8y agoI've started to play around with LiveView by migrating something from ajax to it [0] and it seems very nice! It's still in beta tho and a lot to do still... but very promising indeed :) [0] http://jypepin.com/elixir-phoenix-liveview-with-a-real-world-example http://jypepin.com/elixir-phoenix-liveview-with-a-real-world...
- mercer 8y agoIt's quite impressive. Took me two hours to figure everything out, and just one hour to turn much of an existing 'old-fashioned' server-side rendered Phoenix app into a quite dynamic one where: - various page elements update when the server/db does (new users, new items, etc.) - sorting tables works dynamically - table cells are updated on click (toggle-type stuff) What made this so easy to do is that all I had to do was: - move chunks of controller logic to the LiveView mount() function. - add a phx-click and phx-value attribute to my existing templates (and rename them from .eex to .leex) - add click handlers to the LiveView modules - use the built-in PubSub functionality in my DB logic and subscribe from the LiveViews Obviously there are legitimate reasons why LiveView isn't good enough, but this is an incredibly simple solution provided you 1) are willing to use Phoenix, 2) can assume your clients have internet and you don't need offline capabilities I've honestly worked on very few SPA projects where I can't see LiveView being a good option.
- Tistel 8y agoalso, from a selfish programmer standpoint, programming in elixir is really such a joy.
- 0_gravitas 8y agoI've just recently gotten into elixir, and it really is the first time in a long time I've wanted to just "do things" just for the sake of doing them with a language.
- quickthrower2 8y agoCalling it isomorphic might be a disgrace for mathematics, but in terms of the Greek meaning of single form, it’s accurate.