Groxio is building a series targeted to beginner and intermediate Elixir developers at grox.io/series/quad. The first seven are free, and the rest will go for 10 bucks. The proceeds will go to fund coding diversity mentoring programs. I would love comments on the approaches, as I’ll use the same approach in the prag book.
In general, it’s the course my mentees to through (or the first part). I seem to have success teaching these concepts:
- Understand pattern matching first
- Organize modules into like concepts around DATA
- Organize code around the data concepts, with as many reducers over that type as possible
- Write tests as pipelines
Then, the LiveView discussion becomes easy:
- In LiveView, build a static screen first, with hardcoded data in mount
- Change the hardcoded data as your functions later will to flesh out your render
- If needed, extract render-text text into views
And next:
- Replace hardcoded mount with dynamic content (your true model)
- Change the data with handle_event and handle_info
- Keep the handle-callbacks skinny. If necessary have adapter functions in the Live module
Finally:
- Optimize the liveview difs, and tighten them up
- Extract common components
- Implement data rehydration concerns
- Implement pubsub concerns
Does the approach seem sound?