April 2019
Beginner to intermediate
244 pages
6h 34m
English
When setting up schemas for the first time, it’s natural to add fields that exactly match your database tables. But this can have some unintended side effects down the line.
As we’ve seen, schemas become the backbone of our changesets. And changesets are what we to use parse user-submitted data and convey error messages about that data to the user.
For example, the phoenix_ecto package implements behaviors for the Phoenix web framework such that changesets can be used as the backing data structure for Phoenix forms. To take advantage of the conveniences provided by the Phoenix.Form module, your web forms need to match your changeset structure (and therefore the underlying schema) as much as possible.
Read now
Unlock full access