Chapter 9. Transforming data in your browser
This chapter covers
- Creating and editing items in the browser
- Creating new Phoenix routes, controllers, views, and templates
- Using Phoenix’s form-builder helpers to create HTML forms
You can create, edit, and delete auction items and persist the changes in a real database, but you currently have no way to use those functions in the browser. What you need are HTML forms that enable users of your site to do those things—you certainly aren’t giving them access to your IEx console.
In this chapter, you’ll create those forms. As you do so, you’ll touch almost every part of the route that data takes on its way through Phoenix—from the router to the template (we discussed that route in chapter 3).
Figure 9.1 shows how a user request travels through Phoenix. You can trace a user request through the server, endpoint, router, controller, view, and template, back to the user. With the exception of the endpoint, you’ll touch on each of these areas in this chapter.