Systems | Development | Analytics | API | Testing

Elixir

Enhancing Your Elixir Codebase with Gleam

Do you write Elixir but sometimes miss the benefits of type safety we have in other languages? If the answer is "yes", you may want to take a look at Gleam. It is a relatively young language that runs on top of the BEAM platform, which means it can be added as an enhancement to an Elixir codebase without you having to rewrite everything. In this article, we will add Gleam code to an Elixir project.

Advanced Dependency Injection in Elixir with Rewire

In our last post, we explored how Dependency Injection (DI) is a powerful design pattern that can improve our ExUnit tests. In this article, we will dive deeper into the topic of DI in Elixir, focusing on the Rewire library for Elixir projects. We will cover Rewire's core concepts, how to get started with it, and practical examples. We will also see how to use Rewire alongside Mox. Let's get started!

Using Dependency Injection in Elixir

While controversial in functional programming, dependency injection can be a useful pattern in Elixir for managing dependencies and improving testability. In this, the first part of a two-part series, we will cover the basic concepts, core principles, and types of dependency injection. We'll explore its benefits in terms of modularity, testability, and maintainability. Then, we will look into a specific scenario where dependency injection can be beneficial, in this case, testing.

How to Use Flume in your Elixir Application

As your Elixir app grows, you might need advanced control over how and where to perform background tasks or pull them off queues to manage back pressure. In this post, you will learn how to handle background jobs with Flume, a job processing system that uses GenStage and Redis. It provides durability, back pressure, job scheduling, rate limiting, and batch processing, among other things. We will expand on each of these features in detail.

Powerful Caching in Elixir with Cachex

Developers often initially look to the Elixir language and stack because it's known for being able to handle massive amounts of concurrent requests and scale easily. This makes Elixir a great choice for building highly performant applications. However, sometimes operations are computationally expensive and can slow down your application. This is where caching comes in.

Creating Custom Exceptions in Elixir

Exceptions and exception handling are widely accepted concepts in most modern programming languages. Even though they're not as prevalent in Elixir as in object-oriented languages, it's still important to learn about them. In this article, we will closely examine exceptions in Elixir, learning how to define and use them. Let's get started!

What's New in Elixir 1.16

The Elixir 1.16 release candidate is out now, and it comes with some compelling improvements to diagnostics, documentation, and a few other enhancements that make Elixir an even better choice for developers. We'll dive into some of these changes and highlight Elixir's continued focus on developer happiness and community building. Let's get started!

Advanced Multi-tenancy for Elixir Applications Using Ecto

Welcome to part two of this series. In the previous tutorial, we learned about multi-tenancy, including different multi-tenancy implementation strategies. We also started building a multi-tenant Phoenix link shortening app and added basic user authentication. In this final part of the series, we'll build the link resource, associate users to links, and set up the redirect functionality in our app.