Define the Functional Core in Elixir

Let's discuss what we will learn in the first part of the course.

Let’s begin

In this first part, we build all the logic for our game in a new Elixir project. We define the data and behavior that determines the essence of our application. We’ll do this in sequential Elixir, with only modules and functions.

There is a powerful opportunity at the beginning of a new application. We’ve got ideas about what we want to build, but we haven’t opened a terminal window or a text editor. The application is all potential and none of it is actualized yet.

This is the perfect place to examine our habitual approaches and choose new paths. The decisions we make here will shape the rest of the project in fundamental ways.

The path we’ll take is likely to be quite different from any we’re used to. However, it will simplify and clarify our code. It will build a foundation from which the rest of the application can grow. As web developers, we typically begin a new project by running a command in our favorite framework to generate a new application we can customize. We also think about how to persist the application state between requests. We define database schemas and write ORM models to do so.

Get hands-on with 1200+ tech skills courses.