DEV Community

Jonathan Yeong
Jonathan Yeong

Posted on • Originally published at on

Phoenix & Elixir Learning Plan

I recently wrote about my experience (here) playing around with Phoenix and Elixir for the first time. Looking back on that experience, I copied a lot of code without fully understanding how things worked. Not knowing how things work is less than ideal. Because of this, I want to go back and take a more structured approach with learning Phoenix and Elixir. Which led me to make this learning plan! Below is what I think will be a good flow to help guide self-learning. I want to have achieved three things by the end of this plan:

  • Have a good grasp on Elixir and Functional programming fundamentals.
  • Be able to ship an application written in Phoenix to production.
  • Know how to extend a simple CRUD app to do fun things.

I’m also working through this plan, which means I’ll be continually updating it. I’ll make sure to add resources I find or make edits if there’s a better flow to learning a concept. Attached is a mindmap of the phases, and here’s a link to the mindmap.

Phase 0: Get setup with Phoenix & Elixir

The Phoenix installation page has a great guide on getting Phoenix and Elixir setup. You will also need to setup Postgres. I set up Postgres via docker.

Phase 1: Build a simple CRUD app

Some examples of CRUD apps are: a todo list, a blog, twitter clone. Ideally anything data you want to save, edit, or delete from a database. For this phase, aim to build a very small part of the app. For example, get something saving and be able to display it on the page.

Phoenix things to learn:

  • Directory Structure
  • Generating models
  • Routing
  • Controllers
  • Views & Templates
    • Forms

Elixir things to learn:

  • Debugging with IO
  • Maps & Structs
  • Pipe Operator
  • Loops & Control Flows

Resources for this phase:

Phase 1b: Deploy app to Heroku

There are probably other (better) options for deploying a Phoenix app. But you can’t beat Heroku on simplicity and speed to deploy. There’s two reasons for getting our app deployed early:

  1. We get the satisfaction of shipping something!
  2. We have a tight feedback loop of write code - test - deploy.

Here’s a link to the docs on deploying to Heroku.

Phase 2: Phoenix Deep Dive

By now we probably want to start adding more functionality to the CRUD app. Before that we will want to learn how to test and moving forward apply TDD to adding new features. Also, now that we’ve used mix a few times, it would be nice to understand what it is and how it works.

Phoenix things to learn:

  • Contexts
  • Testing
    • Syntax
    • Rolling back DB changes
    • Context testing
    • Controller Testing

Elixir things to learn:

  • Mix
  • OTP
  • (Optional) Deep dive into functional programming

Resources for this phase:

Phase 3: Phoenix Authentication & Monitoring

I’m super excited to explore Telemetry and Live Dashboard in Phoenix. I think this is a super powerful out of the box feature of Phoenix and I want to take advantage of it. I’m also going to roll up authentication into this phase for two reasons:

  • A lot of CRUD apps will have some sort of authentication.
  • If you want to see a prod instance of Live Dashboard we should put it behind authentication.

Phoenix things to learn:

  • Telemetry
    • How to add metrics?
  • Live Dashboard
    • How to put it behind an authenticated endpoint?
  • Background Jobs
    • Understand how to send emails.
  • Phoenix Auth Gen

(Optional) Phase 4: Live View

The only thing I know about Live View is that it lets me write server-side code and makes it look like I’m using a Javascript front-end.

Phoenix things to learn:

  • What is LiveView 😅?

Resource List

There’s always so much to learn when you pick up a new language. And we’re adding onto it by trying to learn a new framework as well! I’m hoping that having a more structured approach will make it a little less daunting! If you have any thoughts on the flow or resources to share please let me know in the comments below!

Top comments (5)

papey profile image
Jean Michel Functional Programming

Nice, thanks for all the pointers

cescquintero profile image
Francisco Quintero 🇨🇴

Hi Jonathan, very nice structure here to learn Elixir and Phoenix. I'm also studying Elixir and eventually Phoenix but I'm going a much simpler path which is learning Elixir first and then Phoenix.

I'm going to migrate a Ruby project to Elixir to see how everything glues. For Phoenix I'll also make a CRUD app and deploy it to Heroku 😅

Don't forget to take notes of your resources, annotate code with comments on specific things. Add as much detail as you can. Those repositories will be very useful later on when you start working more and more with Elixir.

I'm doing the same and probably will share my findings here in DEV. Let's see 😁

Awesome list and I'm taking some things here for my learning path as well. Wish you success! :D

jonoyeong profile image
Jonathan Yeong

Thank you for the encouraging words! I will definitely make sure to document my journey. Can't wait to see your updates as well!

eligoh profile image
Elijah Goh

I'm enjoying Phoenix, just never got the chance to use it production

mememe profile image

This is awesome! I have been wanting to learn Elixir and Phoenix for some time now.