small medium large xlarge

Functional Web Development with Elixir, OTP, and Phoenix

March 22, 2017

The first patent for a laser was awarded on this day in 1960. Lasers have given us everything from printers, to surgical tools, to DNA sequencing instruments, and of course, cat toys. A breakthrough invention like that can literally change the future.

Which brings us to Elixir, OTP, and Phoenix. Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web applications. OTP has a rich and robust history as a secret weapon in the war to create incredibly robust, nine-nines uptime, scalable applications.

Learn how to harness this power for yourself. Come get copies of Functional Web Development with Elixir, OTP, and Phoenix: Rethink the Modern Web App for everyone on your team today from from

And if you really want to make a cat toy with it, we won't judge.

Functional Web Development with Elixir, OTP, and Phoenix: Rethink the Modern Web App

Elixir and OTP give us exceptional tools to build stateful back-end applications that really scale, with rock-solid reliability. In this book, you'll build a web application in ways that are radically different from the norm. The back end will be stateful, not stateless. Use persistent connections with Phoenix Channels instead of HTTP's request-response, and create the full application in distinct, decoupled layers.

In Part 1, start by building the business logic as a separate application, without Phoenix. Model the application domain with Elixir Agents and simple data structures. By keeping state in memory instead of a database, you can reduce latency and simplify your code. Then add OTP Behaviours such as gen_server and gen_fsm that make managing in-memory state a breeze. Create a supervision tree to boost fault tolerance while separating error handling from business logic.

Phoenix is a modern web framework you can layer on top of business logic while keeping the two completely decoupled. In Part 2, you'll do exactly that as you build a web interface with Phoenix. Bring in the application from Part 1 as a dependency to a new Phoenix project. Then use ultra-scalable Phoenix Channels to establish persistent connections between the stateful server and a stateful front-end client.

You're going to love this way of building web apps!

Now in beta from

Upcoming Author Appearances

  • 2017-03-23 Dave Thomas, GOTO Nights Chicago
  • 2017-03-25 Dave Thomas, Erlang Factory San Francisco
  • 2017-03-29 Alex Miller, Clojure/west 2017, Portland, OR
  • 2017-03-30 Janie Clayton, iOSCon 2017, London, England
  • 2017-04-10 Diana Larsen, Global Scrum Gathering San Diego, San Diego, CA, US
  • 2017-04-12 Diana Larsen, Global Scrum Gathering San Diego, San Diego, CA, US
  • 2017-04-18 Andrew Hunt, Philly Emerging Tech Conference
  • 2017-04-18 Alex Miller, Philly ETE, Philadelphia, PA
  • 2017-04-21 Chris Adamson, CocoaConf Chicago
  • 2017-04-21 Janie Clayton, CocoaConf Chicago
  • 2017-04-22 Chris Adamson, CocoaConf Chicago
  • 2017-04-25 Diana Larsen, Organization Design Forum Conference 2017, Santa Fe, New Mexico, US
  • 2017-05-04 Andrew Hunt, Agile and Beyond, Ypsilanti
  • 2017-05-08 Johanna Rothman, Practical Product Ownership Workshop (online)
  • 2017-05-09 Johanna Rothman, Influential Agile Leader, Toronto
  • 2017-05-16 Johanna Rothman, Secrets of Successful Non-Fiction Writers (Workshop 2)
  • 2017-05-17 Johanna Rothman, Non-Fiction Writing Workshop to Enhance Your Business (online workshop)
  • 2017-05-25 Diana Larsen, XP2017, Cologne, Germany
  • Did You Know?

    If you've bought a paperback copy of one of our titles, you can still buy the ebook at our discounted "combo" price—even if you bought the paperback from a book store. Look on the last page of your paper book for directions.

    Don't Get Left Out

    Are your friends jealous that you get these spiffy email newsletters and they don't? Clue them in that all they need to do is create an account on (email address and password is all it takes) and select the checkbox to receive newsletters.

    Are you following us on Twitter and/or Facebook? Here's where you can find us and keep up with the latest news and commentary, and occasional discounts:

    Tell your friends! Tweet this

    Follow us on Twitter: @pragprog, @pragpub, Andy Hunt @PragmaticAndy.

    Coming Soon:

    • iOS 10 SDK Development in print
    • Swift Style in print
    • Python Testing with pytest
    • Agile Web Development with Rails 5.1

    Recently Released:

    Thanks for your continued support,

    Andy Hunt Publisher, Pragmatic Bookshelf

    Books • eBooks • PragPub Magazine • Audiobooks and Screencasts