AstonJ
Programming Phoenix LiveView Book Club!
Welcome to our Programming Phoenix LiveView Book Club! ![]()
The book was recently updated for Phoenix 1.7 and LiveView 0.18 so we thought it was about time we had a book club on it!
The book cub is being led by @code-shoily and @mariusbutuc and participants are:
Everyone is welcome to join the book club or to simply comment on anything you find interesting ![]()
Most Liked
m4hi2
ericdouglas
Just started today reading the book! ![]()
I’ll share my learning strategy so maybe it can be useful to someone.
It consists of 4 steps:
- Read/watch the resource
- Copy the resource
- Transform the resource
- Build a project to validate and consolidate what I learned
1 - Read/watch
In this step, I consume the resource “passively”, without coding.
If I found the content not so good in this first step, I finish there and do not go to the next steps…
2 - Copy the resource
In this step, I copy the content (code) in the exact way the author of the book/course created it. Do not fight with the content. It also prevents you to make a small variation that later will become incompatible with the previous work.
3 - Transform the resource
In this step, I consume the resource again, but now creating a new project that is similar to the one taught. This will force your mind a bit but not too much…
E.g: the book taught you to create a to-do list, so in this step, you will create a book management system, something slightly more difficult.
4 - Build a project to validate and consolidate what I learned
In this final step, you should think about a new project that will use what you learned and maybe add some additional features to go beyond a little more to push your knowledge a little more and help you internalize better what you studied.
Tbobbe
Chapter 3
Fantastic chapter! It is basically a chapter about structuring Elixir software, and some very valuable concepts are introduced.
The most important takeaway for me from this chapter was the concept of the Context and the Core of a resource.
The Context
The context is the API to the resource, every interaction with the resource goes through the context module (in this case the Products module). Every unpure function goes here (functions that can perform I/O, might fail, etc.). The with function can often be put to good use in the context.
The Core
All pure functions go here. The schema, query builders, etc. Core functions are often suitable for piping.
Best quotes of the chapter:
- “The Context API is with-land”
- “The Core is pipe-land”
Now, in the code used so far, the context and the core is very easy to separate since it’s just the Products module and the Product module. I hope the book will keep referring to these concepts as the application grows.
Next up is the frontend in Chapter 4 ![]()
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









