What is Ruby on Rails?

Ruby on Rails is an open source (no licensing costs involved) web framework that is using the Ruby language with its main focus on building web applications quickly, and without requiring a large team of developers.

Convention over configuration

It does that by prioritizing convention over configuration. So instead of having you tinker with configuration settings every time you create a new project, you can start with a default configuration that makes sense for a large group of web applications.

In my experience, nine times out of ten, you don’t need to touch anything. The rare cases when you do need to mess with configuration settings are usually around the time when you need to scale up.

It’s very likely that you will need to create a number of new applications from scratch, especially when you’re just starting to learn Rails.

You can generate a new app with just one command, and you can have it ready to go in less than a minute. Add some code to it, ship it, and then either throw it away and start from scratch, or continue adding new features to it.

This kind of flexibility, together with the fact that you can plug and play different chunks of functionality by just adding third-party libraries with a single line of code makes Ruby on Rails ideal for startups, or startup-like environments where trying out different ideas quickly can make or break a business.

Developer happiness

Not only does it make a lot of sense to use Ruby on Rails from a business perspective, but it also makes sense for you the developer because you can skip a lot of the time-consuming parts that you don’t want to deal with anyway, and you can focus your attention on the one part that you enjoy the most; writing code.

To make this concept easier to relate to, you can imagine the common web application and its main features. Most web applications have users and need things like registration, login, logout, remember me, and password reset functionality. You can have all that by writing a single line of code (importing a third-party library).

And that kind of pre-built functionality can be found for different areas of your application. How much time would something like that save you?

I’ve been building Ruby on Rails apps for over a decade and I write code relatively fast. But it would still take me a few days to a week (or more) to rewrite all that functionality from scratch.

Also, these things add up quickly to a few months of coding if you were to write them yourself. You could use that time to add value to your product instead of reinventing the wheel.

And it’s not like you get something pre-built that you can’t customize to your liking. You can customize everything as long as you’re willing to trade your time for it.

Ruby code is very readable compared to other programming languages. This helps increase productivity and provides a better developer experience, because you don’t need to write and maintain documentation.

All-in-all, Ruby on Rails can make you a really productive developer. And if you’re running a business, you can pretty much build a product with a single developer that can handle millions of customers.

Performance / Speed

A lot has been said about both the Ruby language and the Rails framework in terms of their slowness compared to other languages. And this is somewhat true.

Bad code is slow in any language. But assuming you know what you’re doing Ruby is not the fastest language out there.

Both Ruby and Rails intentionally optimize for things like developer happiness, high productivity, and quick prototyping.

And in practice what this means is you need to be aware of the fact that not all applications are well suited to be built with Ruby on Rails. Especially the ones that have high demands in terms of performance.

It’s important to know ahead of time what type of application you are trying to build and optimize for. And you might decide that you will either build some parts of it with Ruby on Rails, or none of them.

In terms of the real-life applications that I’ve built, I can attest to the fact that it can scale up to millions of users without problems. After you’ve hit that milestone, you can think about pulling out parts of the application that are slow and rewrite them in a language that is more performance optimized.

There are also a lot of things you can do scale your Rails application. Like adding more hardware, caching, and code optimization.

If you found this article useful, please help others discover it by sharing it on your favorite social media platform.
Facebook
Twitter
LinkedIn
Reddit
Telegram
WhatsApp
Email