Summary
In this chapter, we learned the concept of a view and a view helper. We learned how Phoenix implements a view and how it makes defining templates a lot easier. We then learned how we can pass helper functions to an EEx
template and used that information to define our own view interface.
Finally, we wrapped up by combining all the previously written code and building a fully functional web application with an in-memory data store, using Elixir’s Agent
interface. This chapter also marks an end to the non-metaprogramming parts of this book. From here on out, our goal is to define a better and reusable interface for all the code we’ve written until now.