Technical requirements
This chapter also relies on Elixir 1.12.x
and Erlang 23.2.x
. Most of this chapter includes extracting logic from the controller to the view component and exposing it in a way that makes sense. Therefore, while still recommended, it’s not required you code along while reading this chapter.
In this chapter, I will also assume that you’ve read through and followed along with the previous chapter’s code snippets. Since we will be expanding on how EEx
engines work, it is important that you understand how EEx
works and how we used EEx
in the previous chapter to respond with server-rendered HTML.
Also, since we will be building our own views, any experience with views in a Model-View-Controller (MVC) framework such as Phoenix or Rails will be helpful, although not required.
The code examples for this chapter can be found at https://github.com/PacktPublishing/Build-Your-Own-Web-Framework-in-Elixir/tree/main/chapter_07