Phoenix Framework is a web development framework written in Elixir which uses the Erlang virtual machine - BEAM. You can build fast and performant websites which can scale to millions of connections.

Similar to Ruby on Rails - Phoenix uses convention over configuration. This means the directory structure and locations of files within are important for the web framework to find the files it needs.

Live views

Live views use channels in Elixir linked to long lived web sockets in a users browser to be able to change the state of the webpage on the fly.

For a live view 3 functions are important:

# Mount called to set up live view
def mount() do

{:ok, socket}
end

# Render called when data changes
def render() do

{:noreply, socket}
end

# Event handler called when event happens
def handle_event() do

{:noreply, socket}
end

See also: