Add a Web Interface with Phoenix
Explore how to add a web interface to your Elixir application using Phoenix. Learn to generate a modular interface that keeps your stateful game engine separate, using Phoenix channels for persistent communication and maintaining clean architectural separation.
We'll cover the following...
Now that we have our game engine, it’s time to provide a way to interact with that logic via the web. Phoenix does a fabulous job at this. We’ll generate a fresh Phoenix application and pull in our game engine as a dependency. Since our game engine maintains its state, we are in an ideal situation to use the persistent, multiplexed connections that Phoenix channels provide.
Let’s get to it!
Phoenix is a great fast web framework. Its components are familiar and easy to work with. Phoenix is lightweight, modular, and explicit. There’s almost no hidden magic. That’s a big boost for maintainability.
Frameworks are nearly ubiquitous in web development today. For either the front or back-end, almost everyone uses a framework to build web applications.
There’s ...