...

/

Who Should Take this Course and Why?

Who Should Take this Course and Why?

An overview of this course, along with the prerequisites and requirements.

Learning objectives

In this course, we’ll learn:

  • How to use a layer-based approach in designing Elixir applications.

  • How to make Elixir mix projects.

  • The different datatypes used in Elixir and their pros and cons. This will aid us in making important decisions later on.

  • How to use OTP GenServers.

  • Good coding practices that will make it easier for us to create and use our project.

  • Testing techniques that will be used to test some of the layers of our project.

Contents

We’ll go through the following phases in order:

  • Look at an overview of the six layers we’ll be using to build our main project.

  • Create a small mix project which demonstrates the behavior of a simple counter. It will contain only three of the six layers to give us an idea of how different layers work.

  • Discuss the following datatypes used in Elixir:

    • Primitive types

    • List

    • Stream

    • Map and Struct

    • String

    • Tuple

    • Function

  • Learn about the data layer and the properties of functional languages.

  • Create our second mix project, which will simulate the behavior of a user giving online quizzes.

  • Identify the main data that will track the user giving the quiz, and use structs to store this data in the project.

  • Create the functional core layer of this project which consists of functions to utilize the data defined previously in the data layer.

  • Learn the following techniques when writing functions:

    • How to use appropriate names for our functions.

    • How to break down our code into several small functions which perform one specific task.

    • Learn about abstractions in code.

  • Test our functional core using ExUnit, a unit testing library in Elixir.

  • Create a boundary layer to make our two GenserServers for storing and taking quizzes.

  • Create a lifecycle layer that will use dynamic supervisors to create and handle processes in our quiz. This will allow multiple users to give the quiz concurrently, each with a different process.

  • Learn how to use dependencies, concurrency, and how to pool resources together. These techniques can aid in creating our worker layer.

  • Build a third GenServer, which makes our quizzes timed.

  • Learn how to make a poncho project to manage different dependencies.

  • Create a Postgres table to store the user’s responses.

  • Get some insight on how to integrate our application into existing frameworks, including:

    • Phoenix Channels

    • LiveView

    • Scenic projects

  • Test our boundary layer using the same ExUnit library.

Prerequisites

This course requires a working knowledge of Elixir, including the following concepts:

  • mix projects

  • OTP GenServers

  • Supervisors and processes

Requirements

The mix projects we’ll build in the application use the following: