Systems | Development | Analytics | API | Testing

March 2020

Facade Pattern in Rails for Performance and Maintainability

In today’s post, we will be looking into a software design pattern called Facade. When I first adopted it, it felt a little bit awkward, but the more I used it in my Rails apps, the more I started to appreciate its usefulness. More importantly, it allowed me to test my code more thoroughly, to clean out my controllers, to reduce the logic within my views and to make me think more clearly about an application’s code’s overall structure.

Building Compile-time Tools With Elixir's Compiler Tracing Features

Elixir 1.10 was recently released, and with that release came a little-known, but very interesting feature—compiler tracing. This feature means that as the Elixir compiler is compiling your code, it can emit messages whenever certain kinds of things are compiled. This ability to know what’s going on when Elixir is compiling our code might seem simple, but it actually opens up a lot of doors for opportunities to build customized compile-time tooling for Elixir applications.

Building a Rails App With Multiple Subdomains

In today’s post, we’ll learn how to build a Rails app that can support multiple subdomains. Let’s assume that we have a gaming website funkygames.co and we want to support multiple subdomains such as app.funkygames.co, api.funkygames.co, and dev.funkygames.co with a single Rails application. We want to ensure that proper authentication is performed for all subdomains and that there are no duplicate routes.

Elixir Package 1.12: Phoenix 1.5 Support & Better Channel Error Handling

Great news for all the Elixir alchemists, we’ve just released AppSignal for Elixir package version 1.12.0 which adds support for the upcoming 1.5 version of the Phoenix framework, and improves in-channel error handling. If you’re not an AppSignal user yet, make sure to check out the product tour and see how errors, performance, host metrics and triggers all come together in one tool. Phoenix 1.5 isn’t here yet, but AppSignal 1.12 is ready for it.