In the past few years, there has been a consistent rise in Single Page Applications (SPA). A lot of today’s web application tech stacks rely on JSON APIs in the backend, with a frontend app modifying the DOM in the web browser, to help create a fast and seamless experience
Tag: Ruby on Rails
Rails 6.0 recently shared its amazing enhancements although most would consider these as feature upgrades. In my opinion, both are correct, as the actual state of multiple databases before rails 6.0 was not even considered it a completed feature. So, let’s dive into Rails < 6 state! Rails 6 introduced
Working with large controllers How many times have you encountered large controller methods? If you are lucky like me, probably many times. One of the most common practices to start refactoring a long controller is to move the code to a service. Services are great, and if we code them in an
This is an introductory post to Phoenix, Elixir’s web framework. It is not intended to be a complete guide, but rather a quick primer if you’re interested in Phoenix and have a background in Rails and Ruby. I’ll explore the differences and similarities using a classic blog setup example, although
Introduction Software is constantly evolving, both in specification and implementation. Keeping an extensible and maintainable codebase is, therefore, crucial to deal with these changes quickly and easily. Ruby on Rails comes with a lot of good techniques and patterns out of the box that facilitates this. Nevertheless, some of these
This article is about StimulusReflex, a new tool to help you bring Rails to the era of the backend-side-managed frontends. I was surprised to see that Phoenix LiveView and following with things like Motion and Sockpuppet use WebSockets to push updates from the server to the client and update the DOM accordingly. Luckily the team at StimulusReflex’s
If we want to write better and higher quality software, it is important we keep track of exceptions, crashes and errors happening in our environment, so we can deal with them. We, at Rootstrap, have created this OS exception tracking tool in order to ease the task of monitoring errors.
We usually try to solve performance problems by using #includes to get rid of N + 1 queries but this doesn’t always fix the issue; in fact, it can even create more queries under some circumstances. This post shows a few examples of when that happens and how to deal with it.
Are you new to Rails? Or maybe just looking for any cool gem to use in your new API? Here is a list of gems we have on our Rails API Base that we consider a must-have in every Rails API project.
Yet Another Active Form | Using form objects in Rails Apps Introducing Yet Another Active Form yaaf, a gem to ease the usage of the form object pattern in rails apps. Form Object Pain Points The form object pattern is widely used across Rails apps, and yet we tend to write