April 2024
Beginner to intermediate
224 pages
5h 7m
English
Code organization has been and always will be a hot topic. People have many different opinions. Whether right or wrong, these opinions tend to solidify into best practices based on the community’s preference. A code organization technique called “contexts” has taken hold in the Elixir community.
Let’s break down what contexts are and then create one of our own.
Although they can be intimidating at first, contexts are simple. They are modules that group together related functions. This grouping is typically done based on the domain of the application you’re building—which means you get to decide the context boundaries.
Contexts define a public API between different parts of your application. This ...
Read now
Unlock full access