In the world wide web of programming languages, frameworks and libraries, there are always new and shiny things which grab our attention. There are a thousand ways to build an API these days, including serverless and/or JamStack pseudo-API options as well. So why use Rails in 2020? Let me tell you why I do.

Rails has maintained its edge as a world-class application framework with savvy conventions that have been built on many years of experience from folks working to solve real-world problems from tiny startups to massive enterprise applications. Rails 6 was released in August 2019 and, to my delight, is full of incremental improvements without changing the fundamentals. Most of my Rails education occurred during the Rails 2 and Rails 3 years. I was able to quickly come up to speed and be productive in Rails 6 using many of the same conventions I learned years ago.

When so much is changing so fast, in web technology and especially in JavaScript, it is useful to have a rock-solid API framework that you can rely on. The conventions, the documentation, the testing strategies, and the major libraries have been battle-tested and have reached a level of stability that should not be taken for granted. Also Ruby is still Ruby. And Ruby is fun. And I like Ruby. Obviously different situations call for different solutions. But for my need to build a standard CRUD-oriented (Create Read Update Delete) database-driven (PostgreSQL) web API with authorization, authentication, good testing mechanics, reasonable caching strategies, and maybe some extras like email integration and websockets, I can't think of a better way of getting it done than with Rails 6. (Phoenix would be my next choice.)

I don't want to re-invent the wheel for the 100th time in Node.js. And I don't want to spend my time configuring an arsenel of byzantine online services and microservices. I want to spend my time writing Ruby. I want to be able to run it end-to-end on my old linux laptop, and deploy it to my own server without relying on external services or paying a monthly bill. And when Rails 7 or 8 or 9 comes out, I want to be able to easily stay up to date, and stay stable and keep things running without having to learn a bunch of new conventions.

To sum up: When I want to get things done quickly, and build something I can rely on for years, I'm going to reach for Rails, at least for the API side of things.

That's out of the way. Let's bulid an API.