Search⌘ K
AI Features

Phoenix Is Not Your Application

Explore how to keep your Phoenix web interface separate from your core application logic. This lesson helps you understand the pitfalls of tightly coupling domain models with frameworks, and demonstrates how to build modular, decoupled Elixir applications by layering Phoenix as a pure interface to your existing logic.

We'll cover the following...

It’s important to think about how we got into this situation, so we know how to get out of it.

Web applications

The way we talk about web applications gets us in trouble right away. We say, “I’m building a Rails app” or an Ember app or a Phoenix app, or an Elm app.

However, that’s not true. What we’re really doing is building a chat app, a banking app, or a game called Islands with a Phoenix, Ember, or Elm interface.

The problem is deeper than that, though. There are a number of ways to look at it, but this makes the most sense. ORMsObject-relational mapping lead us directly into this coupling of business logic and framework components.

ActiveRecord models in Rails ...