small medium large xlarge

Programming Phoenix 1.4: Productive |> Reliable |> Fast


Cover image for Programming Phoenix 1.4

Programming Phoenix 1.4

Productive |> Reliable |> Fast


Don’t accept the compromise between fast and beautiful: you can have it all. Phoenix creator Chris McCord, Elixir creator José Valim, and award-winning author Bruce Tate walk you through building an application that’s fast and reliable. At every step, you’ll learn from the Phoenix creators not just what to do, but why. Packed with insider insights and completely updated for Phoenix 1.4, this definitive guide will be your constant companion in your journey from Phoenix novice to expert as you build the next generation of web applications.

Customer Reviews

Programming Phoenix offers a very engaging hands-on approach without compromising
depth in content, making it a balanced source of knowledge for beginners
and hackers alike. The authors’ credibility comes not only from the fact that they
are creators of Elixir and Phoenix, but for their experience in the field designing,
building, and scaling big apps—and that completely shows in this book.

- João Augusto B.C. Alves

Software Consultant, Plataformatec

Programming Phoenix will provide you with the most in-depth, cutting-edge insights
into how to harness the full power of the Phoenix framework. If you want to be
the best, learn from the best.

- Tetiana Dushenkivska

Creator of ElixirCards, Clever Bunny

I write Elixir for a living, and Programming Phoenix was exactly what I needed. It
filled in the sticky details, like how to tie authentication into web applications and
channels. It also showed me how to layer services with OTP. The experience of
Chris and José makes all of the difference in the world.

- Eric Meadows-Jönsson

Elixir Core Team

Phoenix gives you all the tools needed to handle very complex problems in a very
elegant way. Programming Phoenix gives you all the tips you need to solve such
problems. It’s a must have.

- Marcos Ramos

Senior Elixir Developer, Plataformatec

Even if you have no current plans to write a Phoenix web app, you need to read
Programming Phoenix. The insights this book gives into Elixir, Erlang, and OTP—
their strengths, and the corresponding thoughtful design patterns that went into
the Phoenix framework—are invaluable to any developer in the Elixir/Erlang

- Mike Binns

Senior Software Engineer, Dockyard

See All Reviews

Choose Your Format(s)

  • $24.95 In Stock
  • Ebooks are DRM free.

  • Ebook delivery options.

What You Need

To work through this book, you will need a computer capable of running Erlang 18 or higher, Elixir 1.5 or higher, and Phoenix 1.4 or higher. A rudimentary knowledge of Elixir is also highly recommended.

Contents & Extracts

  • Preface
  • Introduction
  • Building with Functional MVC
    • The Lay of the Land
      • Simple Functions
      • Installing Your Development Environment
      • Creating a Throwaway Project
      • Building a Feature excerpt
      • Going Deeper: The Request Pipeline
      • Wrapping Up
    • Controllers
      • Understanding Controllers
      • Building a Controller
      • Coding Views
      • Using Helpers
      • Showing a User
      • Wrapping Up
    • Ecto and Changesets
      • Understanding Ecto
      • Defining the User Schema and Migration
      • Using the Repository to Add Data
      • Building Forms
      • Creating Resources
      • Wrapping Up
    • Authenticating Users
      • Preparing for Authentication
      • Managing Registration Changesets
      • Creating Users
      • The Anatomy of a Plug excerpt
      • Writing an Authentication Plug
      • Implementing Login and Logout
      • Presenting User Account Links
      • Wrapping Up
    • Generators and Relationships
      • Using Generators
      • Building Relationships
      • Managing Related Data
      • In-context Relationships
      • Wrapping Up
    • Ecto Queries and Constraints excerpt
      • Seeding and Associating Categories
      • Diving Deeper into Ecto Queries
      • Constraints
      • Wrapping Up
    • Testing MVC
      • Understanding ExUnit
      • Testing Contexts
      • Using Ecto Sandbox for Test Isolation and Concurrency
      • Integration Tests
      • Unit-Testing Plugs
      • Testing Views and Templates
      • Wrapping Up
  • Writing Interactive and Maintainable Applications
    • Watching Videos
      • Watching Videos
      • Adding JavaScript
      • Creating Slugs
      • Wrapping Up
    • Using Channels
      • The Channel
      • Phoenix Clients with ES6
      • Preparing Our Server for the Channel
      • Creating the Channel
      • Sending and Receiving Events
      • Socket Authentication
      • Persisting Annotations
      • Handling Disconnects
      • Tracking Presence on a Channel
      • Wrapping Up
    • Observer and Umbrellas
      • Introspecting Applications with Observer
      • Using Umbrellas
      • Extracting Rumbl and RumblWeb
      • Wrapping Up
    • OTP
      • Managing State with Processes
      • Building GenServers for OTP
      • Designing an Information System with OTP
      • Building the Wolfram Info System
      • Integrating OTP Services with Channels
      • Wrapping Up
    • Testing Channels and OTP
      • Testing the Information System
      • Isolating Wolfram
      • Adding Tests to Channels
      • Authenticating a Test Socket
      • Communicating with a Test Channel
      • Wrapping Up
    • What’s Next?
      • Other Interesting Features
      • Phoenix LiveView
      • Phoenix PubSub 2.0
      • Phoenix and Telemetry Integration
      • Good Luck!


This is the team that drove the implementation of Elixir and Phoenix. Chris McCord, the creator of Phoenix, professionally trains new developers for the rising framework and works with teams adapting it. Bruce Tate, the author of many award-winning books and creator of the Seven Languages in Seven Weeks series, is the founder of Groxio, which is already running Phoenix in production. José Valim, the creator of Elixir and member of the Phoenix core team, is the co-founder and director of research and development at Plataformatec.