Home » Rails » Page 2

Tag Archives: Rails

VueJS as a Frontend for Rails

VueJS is one of the fastest rising stars in the JavaScript frontend ecosystem. It largely embodies simplicity and composability of frontend design solutions without going overboard. It provides a more elegant way to reduce complexity in both scripting and your styling by grouping them into components. This protects your site’s styles from conflicts and also provides logical organization for individual ...

Read More »

Integrating React in a 6+ Year Old Rails App

When it comes to modern JavaScript frameworks, it’s tempting to think of them as belonging to the bleeding edge as far as web technologies. But it can be a momentous task to install a modern framework into an older application — that can actually be the downfall of using these frameworks. Last year, we were approached by one of our ...

Read More »

GraphQL and Performance in Rails

We looked previously at getting set up with GraphQL on Rails. We defined some queries, some mutations, and had a good time doing so! But what if I told you that with only a few hundred records in the database, it’s possible to write a query that brings our server grinding to a halt? In this article, we’ll look at ...

Read More »

How to Implement a GraphQL API in Rails

GraphQL came out of Facebook a number of years ago as a way to solve a few different issues that typical RESTful APIs are prone to. One of those was the issue of under- or over-fetching data. Under-fetching is when the client has to make multiple roundtrips to the server just to satisfy the data needs they have. For example, ...

Read More »

Realtime with React and Rails

When I was thinking about creating something to showcase using ActionCable (websockets) in a Rails app with React, I first thought of building a chat. But everybody builds a chat. So next, I thought about a realtime dashboard. But then I realized I had no data in this demo app with all but one user (me). So I decided to ...

Read More »

Graphing Benchmark Results in Ruby

Nothing presents performance statistics quite as well as having graphs for benchmarks. Whether you want to present an alternative way for code guidelines based on performance or show a presentation, seeing the difference makes a difference. What we’ll cover here will show you how to generate graph data images from your own Ruby codebase’s benchmark suite, with presentation-worthy quality. The ...

Read More »

Server Rendering React on Rails

React apps give us incredible power in the browser, and with the react_on_rails gem from the folks at ShakaCode, we now have an easy way to use React inside of our new and existing Rails apps. In a previous article, I talked about how to get up and running with React in your Rails app. In this article, we are ...

Read More »

Using React Inside Your Rails Apps

I have never felt as productive as I do in Rails. Yet, with front-end seemingly moving further away from server-rendered views toward React, Angular, Vue, and Ember, I was unsure where Rails fit into this picture. Would it be relegated only to apps with “simple” front-ends, where holding things together with jQuery still managed to work, or perhaps to its ...

Read More »

Refactoring and Design Patterns

Refactoring is a simple concept, and yet it takes some learning to come to a point where refactoring is beneficial. Refactoring means making small adjustments to code throughout the life of a system in order to improve many aspects and give better long-term results. Why Refactor Your Code? The purpose for refactoring code can be for readability, creating a more ...

Read More »