Programming Phoenix 1.4
Productive |> Reliable |> Fast
by Chris McCord, Bruce Tate, Jos Valim
Version: B8.0 (June 13, 2019)
Copyright 2019 The Pragmatic Programmers, LLC. This book is licensed to the individual who purchased it. We don't copy-protect it because that would limit your ability to use it for your own purposes. Please don't break this trustyou can use this across all of your devices but please do not share this copy with other members of your team, with friends, or via file sharing services. Thanks.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and The Pragmatic Programmers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Programming, Pragmatic Bookshelf and the linking g device are trademarks of The Pragmatic Programmers, LLC.
Every precaution was taken in the preparation of this book. However, the publisher assumes no responsibility for errors or omissions, or for damages that may result from the use of information (including program listings) contained herein.
About the Pragmatic Bookshelf
The Pragmatic Bookshelf is an agile publishing company. Were here because we want to improve the lives of developers. We do this by creating timely, practical titles, written by programmers for programmers.
Our Pragmatic courses, workshops, and other products can help you and your team create better software and have more fun. For more information, as well as the latest Pragmatic titles, please visit us at http://pragprog.com.
Our ebooks do not contain any Digital Restrictions Management, and have always been DRM-free. We pioneered the beta book concept, where you can purchase and read a book while its still being written, and provide feedback to the author to help make a better book for everyone. Free resources for all purchasers include source code downloads (if applicable), errata and discussion forums, all available on the book's home page at pragprog.com. Were here to make your life easier.
New Book Announcements
Want to keep up on our latest titles and announcements, and occasional special offers? Just create an account on pragprog.com (an email address and a password is all it takes) and select the checkbox to receive newsletters. You can also follow us on twitter as @pragprog.
About Ebook Formats
If you buy directly from pragprog.com, you get ebooks in all available formats for one price. You can synch your ebooks amongst all your devices (including iPhone/iPad, Android, laptops, etc.) via Dropbox. You get free updates for the life of the edition. And, of course, you can always come back and re-download your books when needed. Ebooks bought from the Amazon Kindle store are subject to Amazon's polices. Limitations in Amazon's file format may cause ebooks to display differently on different devices. For more information, please see our FAQ at pragprog.com/frequently-asked-questions/ebooks. To learn more about this book and access the free resources, go to https://pragprog.com/book/phoenix14, the book's homepage.
Thanks for your continued support,
Andy Hunt
The Pragmatic Programmers
Table of Contents
Copyright 2019, The Pragmatic Bookshelf.
Change History
B8.0: June 13, 2019
This is the last beta! With this release, were content complete. Among the changes are these:
You now have the last chapter: Chapter 14, . In it we address LiveView, PubSub 2.0, and the coming additions to Phoenix.
We aligned the configuration with the deployment strategies necessary to build a release to prepare for Elixirs deployment changes.
We have taken an extensive pass through the entire text, cleaning up each chapter along the way and making things consistent.
We have also taken an extensive pass through the errata. Thanks for all of your help with this! For those of you who have been keeping us busy, please accept our thanks. Youve gotten us through to the production process when our editors and reviewers will go over the book in detail.
The next time you see this page, well be in production! Thanks for all of your help.
B7.0: March 19, 2019
The last update to the regular chapters is IN! We finished the Testing OTP chapter. Due to some major restructuring of the OTP design, the testing chapter took a while to get right. We can see the finish line. Heres whats coming.
We still owe you a treatment of Channel Presence.
We will align the configuration with the deployment strategies necessary to build a release.
We will add a treatment of LiveView in the last chapter.
We hope youre enjoying the rewrite so far. Happy reading!
B6.0: January 25, 2019
Has it really been this long? Chris has been heads down on LiveView so its been a little longer than we wanted. We have a bit of reorganization to do before the next beta, but it should be faster this time around. We know that we owe you a channel presence discussion. Sit tight.
We added a new chapter: Chapter 11, . It took us a while to get it right because this part of the Phoenix tooling has changed. We had a couple of false starts because we tried to reshape the existing apps, then use mix.new and finally we settled on mix phx.new with the --umbrella option.
We addressed another big chunk of of the technical errors. It seems youve been busy too! Thanks for all of your help and keep them coming.
Were working on a treatment of channel presence; that will come in about a month or so.
We hope youre enjoying the rewrite so far. Happy reading!
B5.0: October 19, 2018
One of the best parts of writing on this team is folks like Jos and Chris. They have insight that no one else has as the creators of Phoenix and Elixir. Unfortunately, when the confluence of the development of a major new feature like LiveView coincides with ElixirConf and Phoenix 1.4, the time between betas can be a little longer than wed like. We humbly apologize. But youll see that weve been busy!
We added a new chapter: Chapter 12, . Its the most heavily revised chapter yet with changes to the dynamic supervision and new child specs added in Elixir 1.5.
We addressed another big chunk of of the technical errors. It seems youve been busy too! Thanks for all of your help and keep them coming.
We know we still owe you a treatment of channel presence; that will come in about a month or so.
We hope you enjoy reading about dynamic supervision. Its a powerful and interesting concept. Expect the next chapter in early November since we have one more major conference. GigCityElixir will have both Bruce and Chris, the primary contributors for the final chapters, indisposed, but we hope to see you there! The Southeast is particularly beautiful in the Fall. Who knows? We may even see some Fall colors.
Happy reading!
B4.0: August 15, 2018
Thanks for all of the comments. Its what makes writing worthwhile. We have a great community.
We added a new chapter: Chapter 10, . Its the core concept in Phoenix. Weve updated from models to contexts and sprinkled in a few new features.
We addressed all of the technical errors. Thanks for all of your help and keep them coming!