Book Image

Phoenix Web Development

By : Brandon Richey
Book Image

Phoenix Web Development

By: Brandon Richey

Overview of this book

Phoenix is a modern web development framework that is used to build API’s and web applications. It is built on Elixir and runs on Erlang VM which makes it much faster than other options. With Elixir and Phoenix, you build your application the right way, ready to scale and ready for the increasing demands of real-time web applications. This book covers the basics of the Phoenix web framework, showing you how to build a community voting application, and is divided into three parts. In the first part, you will be introduced to Phoenix and Elixir and understand the core terminologies that are used to describe them. You will also learn to build controller pages, store and retrieve data, add users to your app pages and protect your database. In the second section you will be able to reinforce your knowledge of architecting real time applications in phoenix and not only debug these applications but also diagnose issues in them. In the third and final section you will have the complete understanding of deploying and running the phoenix application and should be comfortable to make your first application release By the end of this book, you'll have a strong grasp of all of the core fundamentals of the Phoenix framework, and will have built a full production-ready web application from scratch.
Table of Contents (14 chapters)
4
Introducing User Accounts and Sessions

Validations, Errors, and Tying Loose Ends

In the previous chapter, we worked on how to add user accounts to our web app, as well as how to add a new Hex package to our project to help us deal with password encryption.

In this chapter, we're going to spend some time putting the rest of everything together, filling the gaps we left in the previous chapter and then building on top of our application a little more. We'll work on cleaning up the interconnectivity of the different schemas and contexts and doing a better job of making sure our tests are sufficiently cover the majority of our application.

Finally, we'll do a deep dive into the different validation methods provided to us by Ecto out of the box (validation, in this case, meaning the validation of data before it is inserted into the database). We'll also work on improving user experience by displaying...