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.
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
Introduction In the first part of this article we mentioned some important design principles and how they are not respected when overusing patterns and techniques that come with Ruby on Rails. In this part we will continue to investigate these and how we can mitigate the problems they cause to maintainability. Overused
When big development teams build an API, one of the main challenges that we face is being able to work together on different features while avoiding bottle-necks or other common issues such as conflicting perspectives or avoid overlapping efforts on particular features. Because of this, when we started working on
Introduction In the first part of this blog post we talked about how Rails and Phoenix compare on the web layer, if you haven’t read it go and check it out. Following on from that, we’ll see how data and the business layer are implemented on both frameworks. Migrations Let’s start
This is an introductory post to Phoenix, Elixir’s web framework. It is not intended to be a complete guide since it’s a big framework with lots of things to dive into, but rather to show a side by side comparison of how things are done in both frameworks using the
Introduction Software is constantly evolving, both in specification and implementation. Keeping an extensible and maintainable codebase is therefore crucial in order 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 facilitate this. Nevertheless, some
It’s common these days to see apps that offer to sell you in-app content on your mobile device. Sometimes they only sell virtual things like coins, diamonds, and credits that give users access to certain functionalities. But on a lot of e-commerce apps, like Amazon, you can buy physical goods. Both types of apps have platforms that manage payments. And there are many payment platform options to choose from. This article lists some of them, along with their pros and cons.
You can’t always use the payment platform you want. You might want to sell virtual or digital goods on your app like coins and credits, but you don’t provide another way to do that like a web page. In this case, you must use in-app purchases to be approved by Apple. But if you run an e-commerce page where you sell solid goods like clothes, you can use other payment methods.
Why you should stop blaming a programming language for your low quality work.
I’ve heard too many times that Ruby on Rails (also called RoR) doesn’t scale. Guess what? Java doesn’t scale, .NET doesn’t scale, PHP doesn’t scale, and Node.js doesn’t scale. No programming language scales if you build terrible software with it.
In this article, I focus on Ruby, but the information is valid for almost any programming language. If you typically benchmark Ruby against other languages like Python or C++, it’s probably slower in most contexts.
The real question is not how long it takes or how many resources it consumes to run some algorithms like regex redux, binary tree searches, or reading DNA sequences.
On an ActiveAdmin page, filters can help make information more usable. But sometimes, we need to add filters that are more complex than normal, going beyond a simple ‘where’ clause applied to only one column of the table. To achieve this, we’ll start by defining the filter like this: In