As I was thinking about this article a few weeks ago, I was excited when I saw that Chris McCord, creator of the Phoenix Framework in Elixir, was on the Elixir Fountain podcast. One of the things they mentioned on the show was that they were tired of the comparison being made between Rails and Phoenix. The bias of coming from a Rails background may cloud your view of the framework and cause you to
Whenever you do something like MyClass.new, Ruby creates a new object, which uses a little bit of memory. But that's not the only way you are creating objects. Many actions will create objects, including strings and arrays. Even if you don't say String.new or Array.new, it's still a new object that is being created for you. Because memory is not unlimited and memory allocation has an impact on per
A couple of years ago, I found a few methods in my Rails application that were called several thousand times and accounted for more than 30 percent of my website's page load time. Each of these methods were strictly focused on file pathnames. Along with that, I came across a blog post that said “Rust to the Rescue of Ruby,” which showed me that I could write my slow-performing Ruby code in Rust an
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 three ways to avoid performance issues with GraphQL in your Rails app, and then at a
Enumeration by definition is “the action of mentioning a number of things one by one.” In programming, instead of mentioning, we choose any action we may want to perform, whether it simply be printing out the item to a display or performing some sort of selection and/or transformation on the item. In programming, we can perform many ways to select and process a collection at one time by chaining o
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 build a realtime map application that allows you to broadcast your location to
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 benc
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 going to talk about doing server rendering with our React components inside of Rails. An
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 new API mode, serving up data via RESTful
ActionCable was introduced to Rails as of version 5. It allows you to create pub/sub WebSocket connections in your Rails application, which brings live updates to your user experience. ActionCable upgrades an HTTP connection between the server and client to a WebSocket. Some of the benefits of a WebSocket is that the amount of data transferred per transmission is considerably less as it removes un
When it comes to software development, a majority of the tools available to us are command-line applications. It is also well worth noting that many of the tools used on the command line are quite powerful in what they can accomplish, from the trivial to the tedious. Taking this further, you can combine command-line applications to chain together a sequence of work to attain a desired output. Lear
Elixir and Go have both grown significantly in popularity over the past few years, and both are often reached for by developers looking for high concurrency solutions. The two languages follow many similar principles, but both have made some core tradeoffs that affect their potential use cases. Let's compare the two by taking a look at their backgrounds, their programming styles, and how they deal
If you've used Rails, you've likely used Active Record as a way to access and record database transactions in a more Ruby-like manner. Active Record goes a long way in simplifying the use of a database. But more then that, it's designed in such a way that we don't have to worry about the particulars for working with specific databases. The mapping for each database is stored and handled within Act
Ruby on Rails controllers are like the bouncers of a nightclub. No identification at a club? You aren’t getting in. Without the proper clothes, you can expect to be turned away. Oh, you wanna say something slick? You’re definitely not getting in, and you might be getting a beatdown on your way out. Controllers are the bouncers of the Rails software stack. You aren’t logged in? See ya. You aren't a
Sidekiq is one of the first gems that I install when doing a significant Rails project. If you plan to or already have Redis running, it provides an almost effortless ability to process background jobs. Aside from that, I've always thought that one of the most powerful components of Sidekiq was the web UI that it ships with. Prior to Sidekiq 4.2, the Web UI was implemented as a Sinatra app that yo
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く