5 ms·
Don't even need Ajax anymore. You can render on the fly, and deliver new HTML over websockets. The gap between SPA and classic server-side rendering is getting
by mrdoops 8y ago
Don't even need Ajax anymore. You can render on the fly, and deliver new HTML over websockets. The gap between SPA and classic server-side rendering is getting smaller fast.
https://youtu.be/Z2DU0qLfPIY?t=14m58s https://youtu.be/Z2DU0qLfPIY?t=14m58s
- Noumenon72 8y agoI watched 3:15 of that and he was still just getting started. Do you think you could provide a link to the good part?
- mercer 8y agoI can recommend watching the whole thing, but I thought this bit was a pretty cool demo: https://youtu.be/Z2DU0qLfPIY?t=41m20s https://youtu.be/Z2DU0qLfPIY?t=41m20s
- Noumenon72 8y agoThank you!
- ahsanejaz 8y agoJS is still required. Sending plain HTML is not the best path forward.
- mercer 8y agoThe idea in this case is that you'd have a bit of JS that would take care of updating the DOM, binding event handlers (which is specified and taken care of server-side), and so on. How Phoenix.LiveView would do this exactly is still being worked on, but [Drab](https://github.com/grych/drab https://github.com/grych/drab) will probably offer some inspiration.