March 2, 2023
Monterail has been using Ruby on Rails for a long time. So much so that we were already writing about Rails back in 2008! During that period, we successfully delivered over 100 projects powered by Ruby or Ruby on Rails.
With its smart choices such as convention-over-configuration software design, Ruby is comfortable for developers. That results in faster development and lower time to market.
A common criticism is that Ruby, originally released in 2004, might be too ancient. Why not give it up in favor of a newer stack? For one, it has had many waves when devs thought it was dying… and survived them all by adopting new features. We could take RoR 7 with Hotwire as an example.
But the gist is: Rails delivers. Customers seem to love it and RoR is very much relevant in 2023.
Table of Contents
During 12 years of Monterail, we developed something like a spin-off of the Rails Way - we call it Monterail Way. Why? Because we want to build easy-to-scale apps (for both mobile and web).
This approach is different from the default Rails Way of building apps with templates because we want to separate BE (Backend) and FE (Frontend) as much as possible. This gives us flexibility in future releases.
For example, say you want to develop cross-platform mobile apps. With our approach, no problem. Just use API (GraphQL or REST, depending on client needs), and here you go, you have options.
With the classic Rails Way, you would couple FE and BE through Rails templates. This approach gives you fast results thanks to Rails advantages (generators, rails magic, etc.), but when you cut corners you lose something - in this case, flexibility.
The modern Rails Way is also different because when you use HotWire you rebel against the Single Page Application approach. It will be hard to bind your app with Vue.js, React.js, Svelte, or Angular. I’m not saying it will be impossible but it will be hard.
You might ask: “OK, you are using Ruby on Rails, but this is not a fresh tech so why do you want to build apps with Ruby?” The answer is simple: we love Ruby! This language has great conventions with the leverage of Ruby On Rails, we have a nice package of community/features and a mature ecosystem for building robust web & mobile applications.
From the business perspective, there is no difference when choosing tech. The only concern you want to handle is the ability to move forward and Ruby, when used by a competent team, delivers just that.
With our Monterail Way, you could easily update your application or even in the future migrate to another language without harm to your business. We are separating business logic from boilerplate and scaffolded code, so essentially we working closely with the client to build value.
A common fear with legacy code is that only a complete rewrite can address it fully. A complete overhaul might mean all hands on deck and fixing bugs, repairing everything that was the result of a big-bang rewrite, which is a no-no.
But we have an example that shows you can handle legacy code slowly and safely - and that Ruby is your friend in that journey. I’m talking about Cooleaf (an HR Tech incentive program platform).
We started this project more than a decade from now! At first, we based the project on Angular.js and Ruby on Rails. Thanks to our approach, we separated the API from the FE application. Now we are developing a React Native Web application with Web Frontend also in React Native Web, without problem, because our backend is ready to handle needs from modern FE frameworks.
Yes, you read correctly, we adopt modern FE frameworks to legacy code!
We are doing this in an incremental way and not a big-bang rewrite. There are still parts with Angular.js and legacy code in Rails, but we handle those during day-to-day work, without interrupting availability.
You can read more about this approach in our Increment article, “Ask an expert: What’s the best way to upgrade an outdated codebase?”. On it, I address this very common request from clients with an old Ruby product that is slow and barely able to serve their growing user base.
The Cooleaf project is the best example of our approach to building MVPs. We delivered the first app in two weeks! Together with our team you could plan and scope your application without losing time.
Cooleaf was a startup, with an app released on VPS servers. Right now it’s a huge app for B2B clients. Two years ago we migrated VPS infrastructure to AWS (Amazon Web Services) custom Kubernetes (K8s) cluster, giving us flexibility for demanding clients. Our past decisions give us more freedom. Also thanks to good documentation and easy-to-find solutions we can move forward.
When we started our cooperation with Systems Engineering A/G, they had already worked with different agencies with a PoC (Proof of Concept) approach. With us, they wanted to build a full-blown product. With the help of our mature understanding of Ruby and Vue.js, we built an app that just works!
The goal we started with was to rewrite the existing prototype for efficiency and scalability. To handle such immense numbers of elements, the new app was supposed to use a more efficient Neo4J graph database, and Vue.js on the Frontend.
The project’s scope is as enterprise as it gets: it involves handling billions of elements in a scalable and efficient environment.
And still, backing it up, we have Ruby.
With all that said, it’s clear we plan to keep adopting Ruby in future projects.
Ruby is fast, scalable, and reliable. As long as it helps us deliver great software, it will be part of Monterail.