Chapter 4. Phoenix is not your application

 

This chapter covers

  • How Phoenix interacts with the business logic of an application
  • Creating an Elixir module
  • The role of a repo and its usage

Part 1 of this book covered the basics of Elixir and Phoenix and got you up to speed regarding basic syntax, as well as the flow of a web request from the user, through the Phoenix framework, and back to the user. In part 2, you’ll create a full-featured web application from the ground up. This application will be a simple live auction site, something like eBay. Your feature list won’t be nearly as long as eBay’s, but there will be plenty of opportunities for you to add your own features as we go along.

Your simple auction site will allow users to view items that are up for auction. These items will be owned and created by registered users of the site. A visitor will be able to create an account and, once they’re logged in, create new items for bid and bid on other users’ items. Some areas of the site will be restricted, by authorization logic you’ll write, to logged-in users or specific users. Figure 4.1 illustrates the major parts of the application.

Figure 4.1. The major parts of your auction application

Ready to dive in? Let’s get going.

4.1. I thought this book was about Phoenix

4.2. The first steps in building your application

4.3. Next steps

Summary