Rails - The One Person Framework


I’ll make no bones about it. I love Ruby and I love Rails! I was lucky to see DHH’s seminal Ruby on Rails demo video How to build a blog engine in 15 minutes in 2005 while I was working at a startup in San Francisco. At the time I was leading a team building J2ME, Brew and WAP mobile ringtone apps, with the backend all implemented with Java Servlets and JSP running on Tomcat.

Having worked on large J2EE projects in the early 00’s, then tried to simplify somewhat with then new Java frameworks like Spring and Hibernate this, video was a breath of fresh air, and instantly resonated. It made so much sense and I immediately started to prototype some reporting interfaces with Ruby on Rails v1.0. Already in this early release, it was clear Rails was a good fit for my way of thinking.

I spent the next few years full time on Rails-backed consumer services at a couple more San Francisco startups before taking a leap to join Cookpad in Japan, which was known as one of the largest Ruby on Rails sites in the world. Over the ensuing 13+ years at Cookpad I got to write a lot of Ruby and a lot of Rails, building teams and the global recipe service, as well as a lot of new product ideas from scratch.

Scratching an Itch

Fast forward to 2023, and having been using MyFitnessPal to try and track meals and calories, I was really getting frustrated with the usability and the fact I couldn’t plan ahead easily. I knew I could do better and spent a couple of weekends building a simple website where I could add my 7 or 8 go to low carb, low calorie recipes I was rotating, and then schedule them over the week.

This is the magic of Rails development and central to the “One Person Framework” promise. You can have an idea, an itch to scratch, a real problem to solve, and just on your own, under your own steam, have something “real” up and running within an hour or two. Not just an HTML mockup, but a full stack, performant webapp, persisting data to a database, with a snappy hotwire UI.

The Rails Ecosystem

I expanded my webapp to be able to track the calories I’d burned from running and walking workouts. The first version had me opening the Fitness app on my iPhone, expanding each workout, and then manually entering the time, distance and calories burned shown there into a form in my web app. A bit tedious but it enabled me to track food against exercise and stick to my goals.

Excitingly, Turbo Native had caught my eye, and as part of the Rails ecosystem was a perfect fit when I started to think of a native iOS app to automatically sync the Health Kit data from my iPhone and post to the Rails server. Having not worked hands-on with Swift based iOS apps at all, there was a bit of a learning curve, but before long I had a native app that would grab the workout data automatically so I no longer needed to type it in!

Momentum is Infectious

The key with Rails is momentum. You can literally have an idea and iteratively implement it in a very short time as a solo dev. A small example I know, but I got some feedback from a couple of early users that 1500 calories was not enough as a target for them. I’d built the whole concept the premise of 1500 calories being fixed, since I made it for myself and that was my target, but understood now that needed to change.

I was able to simply create a rails migration with one shell command, adding a daily_target attribute to users. Then edit the user form to add an input box where a user can set their own target. Lastly I updated the couple of places I had previously hard coded 1500 in calculations and thats it. Added a couple of tests the basic test suite I had already and push. Done. Thats it in production. And thats not all of course, as my Turbo Native iOS app is a native shell around the webapp, this new feature was already implemented in the iOS app!

If I think back to my experiences with prior frameworks like J2EE, we had a huge team, dedicated DBA’s, huge amounts of boiler plate code, XML.. it was a lot of work, but that was “the way”. Even with PHP, or Perl projects before I found Rails, there was a lot of overhead, decisions to make and grunt work before I could even start implementing my projects.

With the Rails core principles of convention over configuration and omakase all that micro decision making and complexity is compressed into a simple to use paradigm, and frankly its a joy.

From idea to IPO

Lets not forget, while Rails is incredible for new projects and ideas, it doesn’t stop there. I can say from personal experience in my time as Global CTO at Cookpad, Rails can scale along with your team, product and audience to a hundred million and beyond.

The Rails Renaissance

The Rails Renaissance as DHH coined it in his Rails World 2023 Keynote and other writing is most definitely a thing. Rails 7 really was a significant release - a revolution as I called it with Rails, Hotwire, Turbo Native all finally coming of age - and with the incredible gifts coming this year in Rails 8 there really is no better time to get started, get back in, or double down!