What is Phoenix Framework?
Why Interviewers Ask This
Interviewers use this question to quickly assess whether a candidate has the foundational knowledge required for Elixir development. It reveals whether you understand the building blocks that more complex concepts rely on.
Answer
Phoenix is the web framework for Elixir, analogous to Rails for Ruby or Laravel for PHP. It is known for exceptional performance — handling millions of WebSocket connections on a single server. Key components: Router: maps HTTP requests to controller actions. Controllers: handle requests, call contexts, return responses. Views/Templates: render HTML with HEEx templates. Contexts: bounded domain logic modules (like service layers). Channels: real-time WebSocket communication — each connected user is a lightweight BEAM process. LiveView: server-rendered, real-time interactive UIs — HTML diffs are sent over WebSocket, eliminating most JavaScript. Ecto: database library with changesets for validation. Phoenix leverages BEAM's concurrency — unlike Node.js or Rails, it handles long-lived connections natively without blocking. It is used by Fly.io, Discord (millions of concurrent users), Bleacher Report, and many others.
Pro Tip
Before answering, structure your response: one-line definition → real-world analogy → concrete example from a project. This makes even complex Elixir answers easy to follow.