Systems | Development | Analytics | API | Testing

Rails

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 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.

A Complete Guide to Rails Caching

Application performance is always a concern when building in the modern, competitive web and mobile space. At Scout, it’s why we created application performance monitoring tools in the first place. That said, there are steps you can take to build a more performant application. If you are using Ruby on Rails, caching might be one of the best tools on your belt to build a better application.

Getting Started With System Tests in Rails With Minitest

In today’s post, we’ll look at system tests in Rails 6. System tests are meant to auto-test the way users interact with your application, including the Javascript in your user interface. Minitest, being the default testing framework in Rails, is a great match for system testing. With all the configuration that Rails handles for us, there are just a few steps needed before we have our first tests up and running.

Rails is Fast: Optimize Your View Performance

In this post, we’ll look into tried and true methods of improving Rails view performance. Specifically, I will focus on database efficiency, view manipulation, and caching. I think the phrase “premature optimization is the root of all evil” has been taken a little out of context. I’ve often heard developers use this during code reviews when simple optimization techniques are pointed out.

Pros and Cons of Using structure.sql in Your Ruby on Rails Application

In today’s post, we’ll cover the significant differences and benefits of using structure.sql versus the default schema.rb schema formats in your Ruby on Rails application. In a data-driven world, knowing how to exploit all of your database’s rich features can make the difference between a successful and unsuccessful enterprise.