Every year, thousands of publications announce the death of the Ruby programming language. Despite being a little over 20 years old, Ruby is still going strong in the world of programming.
You might be asking why to use Ruby for the development of your project? In many usage instances, Ruby really provides a better fit than any other tool.
So, is Ruby suitable for your project? Should you hire Ruby developers for your tasks?
To answer these questions, we interviewed Rick Belash, the Customer Success Specialist at the Singula team. We hope you enjoy the interview and find answers to most of your questions.
The Interview
Elizabeth: Could you tell me a bit about the history of Ruby? Where did it come from?
Rick: Sure! Ruby, the creation of independent programmer, Yukihiro Matsumoto, began life over 20 years ago. In 2003, Chicago-based 37Signals launched the popular project management system, Basecamp. 37Signals had developed Basecamp in Ruby, and in 2005, they made the web application framework they’d developed — Rails — public.
Thanks to the versatility and ease of use of the framework, Ruby on Rails became the first choice for web application developers all over the world. Airbnb, GitHub, and the first version of Twitter were all written in Ruby. Frameworks such as Hanami and Sinatra emerged alongside Rails. In 2006 Ruby placed first in the Tiobe language ranking and maintained that position for another two years.
Elizabeth: Sounds interesting. So, what makes Ruby and Ruby on Rails great?
Rick: Ruby on Rails was one of the first frameworks to use the now well-known Model-View-Controller (MVC) pattern for dividing apps into logical components distinguished by role rather than a general area of functionality. The framework promotes “agreement over configuration,” the result being that projects developed using MVC tend to have a similar basic structure and architecture, easing the transition of developers from project to project.
Elizabeth: And what about databases?
Rick: Rails introduced ActiveRecord, what’s known as an Object-Relational Mapping (ORM) system. Traditional web development involved manually embedding SQL statements into your code when you need to interact with a database such as PostgreSQL, Oracle, and MySQL. Whilst this approach is simple in principle, it’s fraught with complexity in practice, with every query that needs to be parameterized being a potential candidate for attack by malicious parties.
ActiveRecord works differently: it represents your database as Ruby objects, and you interact with them just as you would any other Ruby object. As you read and modify the objects in your code, ActiveRecord takes care of constructing and executing the correct — and safe — SQL queries for your chosen database behind the scenes. No more escaping rules. No more conditional blocks to deal with different SQL implementations. Just plain Ruby code injected with a little magic.
Elizabeth: Could you tell me a bit about the deployment and testing in Ruby?
Rick: The more complex an application, the harder it is to maintain. Fortunately, the Ruby ecosystem comes with a raft of standardized patterns and tools to ease the pain of verifying code quality, constructing and running automated test suites, and updating deployments. Tools such as Minitest, Rspec, Capybara, and Cucumber helped to popularise approaches such as test-driven development (TDD) and behaviour-driven development (BDD).
Elizabeth: And what about the development and release cycle?
Rick: Ruby and the Rails framework are both under active development and regular updates are released for both all year round. Rails 6, released in 2022, introduced a number of new features:
Many of the changes and improvements are made in response to the Rails developer community. For example, there is a number of community-made tools to manage with user-provided files, but none offer the simplicity of being integrated into the framework. According to Github, Rails has one of the largest number of active contributors out of all language frameworks on the platform.
The conclusion
We thank Rick for such an interesting interview and for sharing his knowledge on building projects in Ruby and Rails with the community.
If you choose Ruby and the Rails framework for your new project, you’ll benefit from a large and active community, tons of expert knowledge, and mature tools to help you get up and running quickly.