Elixir & Phoenix

Learn Elixir and Phoenix: pattern matching, pipes, processes, GenServer, supervisors, Ecto, LiveView, PubSub, testing with ExUnit and deploying releases.

Start course →

What you'll learn

  • Explain the BEAM and set up Elixir projects with Mix, Hex and IEx.
  • Write functional Elixir with pattern matching, multi-clause functions, pipelines, Enum and Stream.
  • Model data with structs, protocols and behaviours, and handle errors with tagged tuples and with.
  • Build concurrent, fault-tolerant systems with processes, GenServers, supervisors, Tasks and ETS.
  • Create Phoenix applications with contexts, Ecto, JSON APIs, LiveView, PubSub and Channels.
  • Test with ExUnit, keep quality with Credo and Dialyzer, and deploy releases with runtime configuration.

Syllabus

Getting Started with Elixir

  1. What Elixir Is and Why the BEAM Matters
  2. Installing Elixir: IEx, Mix and Hex
  3. Basic Types and Immutability

Pattern Matching, Functions and Pipelines

  1. The Match Operator and Pattern Matching
  2. Modules, Functions and Guards
  3. The Pipe Operator, Enum and Stream

Control Flow, Structs and Errors

  1. case, cond, if and with
  2. Structs, Protocols and Behaviours
  3. Errors: Tagged Tuples, Exceptions and Bang Functions

Processes and OTP

  1. Processes and Message Passing
  2. GenServer: Stateful Servers
  3. Supervisors and Fault Tolerance

Tasks, ETS and Metaprogramming

  1. Tasks and Concurrent Work
  2. ETS, Agents and Shared State
  3. Macros and Metaprogramming

Phoenix and Ecto

  1. Phoenix Fundamentals
  2. Ecto: Schemas, Changesets and Queries
  3. Contexts, JSON APIs and Authentication

Real-Time Features and Testing

  1. Phoenix LiveView
  2. Channels, PubSub and Presence
  3. Testing with ExUnit

Deployment, Quality, Idioms and Revision

  1. Releases, Configuration and Deployment
  2. Code Quality: Formatter, Credo, Dialyzer and Types
  3. Idiomatic Elixir and Common Pitfalls
  4. Revision and Interview Questions