nerocoupon.blogg.se

Phoenix liveview examples
Phoenix liveview examples





phoenix liveview examples

Hippopotamuses have been the subjects of various African folktales.

phoenix liveview examples

Some interesting files: Live “view”, game logic, UI (leex)Ī Breakout clone written in pure Elixir, using Phoenix LiveView. Markdown Editor Demo, Markdown Editor Sourceįlappy Bird Clone written in LiveView. The server listens for changes in the textbox, re-renders the HTML, and sends the smallest possible change back to the client which then updates the DOM.

phoenix liveview examples

A websocket connection is opened between the client and the server. However, this is where things get interesting. In our case, what is initially rendered is a textarea prepopulated with some Markdown and the HTML view of that Markdown. When a client connects to the server they are initially served some HTML content. Observer Live, Erlang Observer Demo, Erlang Observer Source The docs are clear, accurate and provide a very smooth introduction to the capabilities of this interactive server-side rendering way of doing things. So I rolled up my sleeves, and surprisingly, four or five hours later I had the ant farm working, and this is how it was done…Ĭoncurrent ant farm with Elixir and Phoenix LiveView, Ant Farm Demo, Ant Farm SourceĪ port of observer_cli using LiveView. Finally gave the ant farm another go, this time using Elixir only. Originally straightforward, it got much bigger and eventually forgotten. Sometimes it’s best to learn by examples, here goes.Ī virtual ant farm where every ant was a GenServer process, simulating a basic AI behavior. Source projects, some with online demos and other where you can In the world of rich client apps, without having to go full-onĬlient-side framework. For Phoenix on Elixir is definitely scratching an itch







Phoenix liveview examples