Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo
Programming Phoenix

Book Description

Don't accept the compromise between fast and beautiful: you can have it all. Phoenix creator Chris McCord, Elixir creator Jose 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, 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.

Table of Contents

  1.  Acknowledgments
    1. José Valim
    2. Bruce Tate
    3. Chris McCord
  2. 1. Introducing Phoenix
    1. Fast
    2. Concurrent
    3. Beautiful Code
    4. Interactive
    5. Reliable
    6. Is This Book for You?
    7. Online Resources
  3. Part I. Building with Functional MVC
    1. 2. The Lay of the Land
      1. Simple Functions
      2. Installing Your Development Environment
      3. Creating a Throwaway Project
      4. Building a Feature
      5. Going Deeper: The Request Pipeline
      6. Wrapping Up
    2. 3. Controllers, Views, and Templates
      1. The Controller
      2. Creating Some Users
      3. Building a Controller
      4. Coding Views
      5. Using Helpers
      6. Showing a User
      7. Wrapping Up
    3. 4. Ecto and Changesets
      1. Understanding Ecto
      2. Defining the User Schema and Migration
      3. Using the Repository to Add Data
      4. Building Forms
      5. Creating Resources
      6. Wrapping Up
    4. 5. Authenticating Users
      1. Preparing for Authentication
      2. Managing Registration Changesets
      3. Creating Users
      4. The Anatomy of a Plug
      5. Writing an Authentication Plug
      6. Implementing Login and Logout
      7. Presenting User Account Links
      8. Wrapping Up
    5. 6. Generators and Relationships
      1. Using Generators
      2. Building Relationships
      3. Managing Related Data
      4. Wrapping Up
    6. 7. Ecto Queries and Constraints
      1. Adding Categories
      2. Diving Deeper into Ecto Queries
      3. Constraints
      4. Wrapping Up
    7. 8. Testing MVC
      1. Understanding ExUnit
      2. Using Mix to Run Phoenix Tests
      3. Integration Tests
      4. Unit-Testing Plugs
      5. Testing Views and Templates
      6. Splitting Side Effects in Model Tests
      7. Wrapping Up
  4. Part II. Writing Interactive and Maintainable Applications
    1. 9. Watching Videos
      1. Watching Videos
      2. Adding JavaScript
      3. Creating Slugs
      4. Wrapping Up
    2. 10. Using Channels
      1. The Channel
      2. Phoenix Clients with ES6
      3. Preparing Our Server for the Channel
      4. Creating the Channel
      5. Sending and Receiving Events
      6. Socket Authentication
      7. Persisting Annotations
      8. Handling Disconnects
      9. Wrapping Up
    3. 11. OTP
      1. Managing State with Processes
      2. Building GenServers for OTP
      3. Supervision Strategies
      4. Designing an Information System with OTP
      5. Building the Wolfram Info System
      6. Wrapping Up
    4. 12. Observer and Umbrellas
      1. Introspecting with Observer
      2. Using Umbrellas
      3. Wrapping Up
    5. 13. Testing Channels and OTP
      1. Testing the Information System
      2. Isolating Wolfram
      3. Adding Tests to Channels
      4. Authenticating a Test Socket
      5. Communicating with a Test Channel
      6. Wrapping Up
    6. 14. What’s Next?What’s Next?
      1. Other Interesting Features
      2. What’s Coming Next
      3. Good Luck