Systems | Development | Analytics | API | Testing

AppSignal

Deploy Your Ruby on Rails App Using Capistrano

In this article, we will configure Capistrano in a Ruby on Rails application. We will then deploy the app to a cloud instance that runs Ubuntu as an operating system, independent of your hosting provider. You can use any cloud service, or even an on-premises server, to test or replicate the steps we'll take. Once we've deployed the app, we'll look briefly at how you can monitor your app's deployments using AppSignal. But first, you might ask: why should I use Capistrano in the first place?

Get Started with Hotwire in Your Ruby on Rails App

Hotwire is a hot topic at the moment for every Rails developer. If you work with Rails, there is a good chance you have already heard a lot about it. Hotwire is a completely new way of adding interactivity to your app with very few lines of code, and it works blazing fast by transmitting HTML over the wire. That means you can keep your hands clean from most Single Page Applications (SPA) frameworks.

LiveView Assigns: Three Common Pitfalls and Their Solutions

In the first part of this two-part series, we examined LiveView assigns in detail — demystifying assigns, looking at some key concepts, and debugging. Now, we'll turn our attention to three common mistakes that you might make with assigns and how to avoid them. Let's get started!

State Machines in Ruby: An Introduction

A state machine can hold all possible states of something and the allowed transitions between these states. For example, the state machine for a door would have only two states (open and closed) and only two transitions (opening and closing). On the other hand, complex state machines can have several different states with hundreds of transitions between them.

How to Handle Errors in React

Let's face it. Nobody wants to see a broken, empty page while surfing the web. It leaves you stranded and confused. You don't know what happened or what caused it, leaving you with a bad impression of the website. It is often better to communicate the error and let the user continue to use the app. The user will get less of a bad impression and can continue to use its features. In today's post, we'll go through different ways to handle errors in React applications.

A Guide to Phoenix LiveView Assigns

Phoenix LiveView lets you develop full-stack apps with client-side interactions while mostly avoiding cross-stack hassle. Assigns, managed by the LiveView socket, are a core tool for making that happen — allowing you to store, present, and update data effortlessly and efficiently. But as they do so much, assigns come with their own complexities and may backfire if misused.

Add Feature Flags in Ruby on Rails with Flipper

Picture this scenario: you are a Rails developer and have spent the last couple of days developing that awesome feature that everyone is waiting for. It's big and complex, but it went through rigorous testing, so you are confident everything works as it should. There are deadlines to meet, so you deploy. Immediately, all hell breaks loose. Your feature straight up breaks the entire app for some of your users. It's hard to say why. No bugs showed up during testing.

Build a Data Access Layer with PostgreSQL and Node.js

The Data Access Layer (DAL) is the most critical part of any application. This is where the code integrates with an external source of truth like a database. In this take, we'll show you how to build a DAL that talks to Postgres via Node. Then we'll go into best practices like Clean Architecture and what this means in practical terms. Ready? Let’s go! First, a quick note about the code: The code will have modern niceties like TypeScript, unit tests, and will tackle potential scalability issues.

Algebraic Data Types in Elixir

Elixir is a dynamically-typed language. Types in Elixir are checked when a program runs, not when it compiles. If they don’t match up, an exception is thrown. In statically-typed languages, types are checked during compile time. This can help us write code that is correct, understandable, and refactorable. But it also introduces a certain focus on types as the foundation for your application. One interesting concept is to use types to model your business domain.