This episode is part 7 in the Zero to Framework (building Alchemist Camp) series:
- Part 1 Making a site with just the Cowboy web server
- Part 2: Deploying with Nanobox (which no longer exists 😢)
- Part 3: Building a router and handling static assets
- Part 4: A minimal Plug.Conn clone to handle 404s
- Part 5: Adding EEx templates to a Cowboy web server
- Part 6: Putting an OTP app in our OTP app (pro)
- Part 7: this page
- Part 8: Creating a DSL for our router
Let's write some macros and make a lean view layer! We split our "kitchen sink controller" into reasonable framework abstractions for controllers and views and then take advantage of this work to create an episode controller for Alchemist.Camp.
(Source code available for premium members)
Update: The var!()
is unneeded since we don't need to modify name
or assigns
outside the macro.
No Comments