Exploring the Perfect Elixir Setup
Tags: elixir, tutorial, development, webdev
Published: 2024-03-18 13:00:00

I'd like to explore various ways of working with Elixir projects, diving into the tools, techniques, and processes that offer the most productivity and lowest cognitive load. There are many trade-offs to consider when starting and scaling any project, but today we'll focus on the choices available in the world of Elixir.

Our goal is to identify clean, uncluttered development processes and design patterns aimed at small team developments, whether starting a new project or scaling up an existing one.

## Elixir?
In case you're new to this language, Elixir is a dynamic, functional programming language from 2011, with a syntax inspired by Ruby. Much like Java builds on the Java Virtual Machine, Elixir builds on the _Erlang Abstract Machine_ (or BEAM for short). The BEAM started in the mid-80s and is renowned for running critical and highly fault-tolerant distributed systems at scale.

This series won't dive deep into the fundamentals of Elixir. All you'll need here is a general understanding of programming, an appetite for experimenting with various trade-offs, and a curiosity to see how it all fits into the Elixir context. If you want to learn more about Elixir fundamentals, I recommend starting with these great resources:

1. [Official Elixir Website and Documentation](https://elixir-lang.org/): The Elixir official website is the best starting point, with comprehensive documentation and a getting started guide.
2. [Thinking Elixir podcast](https://podcast.thinkingelixir.com): A great podcast to catch the latest news and understand what's happening in the community.
3. [The Elixir Forum](https://elixirforum.com): An excellent place to ask questions and engage with the community. It's known for being welcoming to newcomers.

## Exploring Elixir?
Now back to exploring. This will be an open learning journey: I'm new to Elixir, so this is genuinely a dive into the unknown to explore the permutations in setting up an Elixir project. We'll start with installing system dependencies and work towards deploying an app. Your feedback and insights are most welcome, as I'm bound to miss things you take for granted. Please join in the comments so we can explore together.

## Topics
### [2. Environment Setup](https://dev.to/jonlauridsen/perfect-elixir-environment-setup-1145)
> We need **Erlang** and **Elixir** installed, which might sound simple, but there are trade-offs to consider for a shared team environment. We'll also add a **PostgreSQL** database to keep our explorations relevant to real-world scenarios.

This article explores **asdf**, **Nix**, **pkgx**, and **mise** to set up a reproducible development environment.

### [3. Foundations of a Web App](https://dev.to/jonlauridsen/perfect-elixir-foundations-of-a-web-app-95l)
> Today we'll make a simple web app and explore the nuances and trade-offs between different solutions. By the end, we'll have examples of apps that call into our database and return some HTML. Let's see which solution stands out as the most applicable to our needs.

This article explores **Cowboy**, **Plug**, **Bandit**, and **Phoenix** to set up a web app.

### [4. Development Workflows](https://dev.to/jonlauridsen/perfect-elixir-development-workflows-26k6)
> Today we'll explore the tools and workflows essential for our daily development. Our goal is to create a streamlined onboarding experience and establish efficient mechanisms for code changes. Let's dive into some solutions to see how it all works out.

This article explores how to write and test **shell scripts** to set up effective and efficient workflows.