Ruby's focus on simplicity and productivity makes it an excellent choice for modern application development. Despite being nearly 30 years old, Ruby remains a powerful language, filled with modern features and a reliable system that developers trust.
Today, Ruby is most commonly used to build scalable, dependable web applications. Its key strengths—efficiency, scalability, and cost-effective security—make it particularly well-suited for e-commerce marketplaces.
If you need a Ruby development team, we’re here to help. Just let us know your requirements, and within 72 hours, we can connect you with up to five companies that match your needs—completely free.
Major platforms like Kickstarter, Shopify, GitHub, and Twitch rely on Ruby to deliver critical services with maximum uptime. To achieve these goals, it's essential to pair Ruby with the right framework for your specific project. When done correctly, this approach simplifies the process of developing, testing, and delivering services at scale.
Frameworks vs Microframeworks
The decision over which framework to use to break ground on a new project can be daunting. It’s one that will influence the project for its entire duration and shape the way it develops right from day one.
Ruby development frameworks fall into two primary camps: frameworks, and microframeworks.
A microframework will allow you to fully customise every aspect of your application, even when each of an application’s individual components are built using two or more frameworks. A microframework, or a combination of complimenting frameworks, can provide a potentially more optimal solution over handling everything with one solution.
However, the overhead involved in integrating, maintaining, and developing a solution across multiple smaller frameworks can add additional costs too. Costs that, over the lifetime of an application or service, can add up to significant increase in the required investment.
There are, of course, no assurances that multiple smaller microframeworks will play well together in the way a single monolithic framework guarantees.
Choosing the solution to fit the project, and not the project to fit the solution is key to future success with Ruby design and development. It’s also a difficult task requiring technical experience, know-how, and careful evaluation of the available tools.
Part of making this right choice for your project is deciding what is the right approach to building your Ruby development team. Read our article on whether you should hire a freelance Ruby developer or a development team for more insight on this topic.
Ruby on Rails
Ruby on Rails, often referred to as just “Rails”, is the go-to solution when developers think of Ruby-based projects. Of the Ruby-based services mentioned—every one of them uses Ruby on Rails to deliver their products.
Over 15 years since its first release, the maturity of Ruby on rails lends the framework to inherent stability and a large pool of expert developers to draw on. Features that make for producing a highly cost-effective and efficient Minimum Viable Product (MVP) that can be extended later to a vast scale.
Rails is perhaps best known for its “convention over configuration” approach to application development. For developers, this means very little initial setup in it’s “out of the box” approach, with the framework favouring sensible defaults over painstaking explicit configuration.
An approach championed by rails since its earliest days, it’s one that has begun to spread to other web-based frameworks such as Angular in recent years.
Despite the longevity and immense popularity of Rails over the last 15 years or so, there are several reasons why developers may favour an alternate approach to application development. Some drawbacks often cited by developers seeking alternate solutions include:
- Runtime speed. Rails is often thought to be lacking performance in benchmark tests, particularly in comparison to more modern frameworks such as Node.JS or GoLang. In real-world applications, this is unlikely to provide a bottleneck to services until reaching the exceptionally large scales of social media or gaming platforms.
- Boot speed. Developers have many frustrations with Rails over the time it can take to start. Depending on the number of dependencies and files, it’s a problem that can grow to significantly hamper development efforts unless there is a conscious effort to address the issue.
- Documentation. One of the weaker elements of the framework, it can be difficult to find quality documentation for Rails. A problem that becomes particularly noticeable in less popular libraries.
- Multithreading. While Rails supports multithreading, some of its supporting libraries do not. In practice, this can result in real-world performance issues likely to have a noticeable impact.
Hanami
Hanami describes itself as “a modern web framework for Ruby”. The framework, renamed from Lotus a few years ago, features a few more modern tools and ideas over its Lotus iterations.
Unlike rails, Hanami encourages building applications from multiple modular sub-components. These modules, a core feature of the modern framework, can be used even independently of the wider framework.
Hanami’s advantages include faster response times, optimised performance, and claims 60% less memory use than comparable full-featured Ruby frameworks. Advantages that are hard to pass up as an application developer. It’s also notably less restrictive than Rails—allowing developers extra degrees of freedom.
The Hanami framework is designed with Robert C Martin’s Clean Architecture very firmly in mind. It assumes any number of active apps will reside within the same codebase.
The web app, the most commonly used in the framework, is generated automatically. The rest, apps that will deliver functionality to the user, are left for developers to implement themselves.
Hanami’s most notable departure from Ruby on Rails comes from the way it implements MVC design. Splitting the functionality of the model class to separate a model’s behaviour from its state—the framework mimics some more modern design patterns without departing too far from the foundations of conventional Ruby frameworks.
For developers looking to break with the standard Rails approach but stick with a fully-fledged framework design, Hanami is worth closer consideration.
Sinatra
Sinatra is the first framework on our list that could be more accurately described as a microframework. Exceptionally lightweight, with a small footprint, and flexible in application, it’s an ideal starting point for many services and applications.
Like both Rails and Hanami above, Sinatra leverages the rack web server interface to deliver web services. Rack is so widely adopted amongst Ruby frameworks precisely because it provides the ideal minimal, modular, and adaptable web application interface.
Unusually, amongst Ruby frameworks, Sinatra doesn’t follow a conventional MVC pattern in its design. Instead, it provides the developer with a domain-specific language (DSL) that they can define their own rules for. This has allowed Sinatra to be used as a core component of many related Ruby frameworks too.
Sinatra provides an ideal starting point for a wide range of applications belonging to both enterprise users and startup firms. Its lightweight and highly functional capabilities provide the minimum viable functionality to begin construction on and create a platform that developers could migrate to fuller-featured frameworks in the future.
Padrino
While deserving of its own status as a fully-fledged framework, Padrino can also be thought of as a natural extension to Sinatra. Using the smaller microframework at its core, Padrino extends the functionality of Sinatra into a more well-rounded full-framework platform for building advanced web applications.
Padrino builds on the ethos set by Sinatra by maintaining a small footprint, high-speed, and lightweight design. The modernised framework aims to maintain these qualities while extending the available functionality.
Perhaps the main selling point of Padrino is its application-agnostic design. The framework isn’t bundled with libraries to facilitate testing, mock components, or specific features by default. Instead, it allows the developer to bring their own requirements and preferences to the project from day one.
Grape
Another Ruby microframework, Grape is focused on creating REST APIs in Ruby. Like Rails, Hanami, and Sinatra, Grape runs on Rack to stand as a service on its own. Grape can also be used alongside these existing frameworks to create RESTful APIs.
Grape is one of the youngest Ruby frameworks in use. Its impact, in such a short time, has been more than notable. It’s already favoured by Gitlab to deliver critical web services to developers.
Designed to be a very structured framework, i.e., encourage developers to achieve goals in a specific way, it’s certainly one to watch in the future and perhaps worth further investigation for upcoming projects today.
If you are keeping up to date with Grape and want to know more on the direction Ruby is taking, we recommend our article on the future of Ruby development.
Alternate Ruby Frameworks
When asked to think about frameworks to support Ruby development, it can be hard to look past Rails as the default option. Rails is, however, the go-to solution for some very good reasons. Rails is renowned for being a highly capable, well-supported, and well-appreciated framework for web application development.
If you are looking to develop your own Ruby on Rails project, we have you covered: just tell us what you need. We can do the work for you and connect you with up to 5 companies within 72h that match your need- all for free.
There are cases where developers may want an alternate option, however. Whether pursuing new skills, seeking features that Rails can’t currently support, or making changes and additions to the platform—it pays to keep an eye on some of the options out there.
Often overlooked and undersold, the non-Rails frameworks mentioned here are themselves highly capable and more than suitable for many of your next projects.
Used instead of, or in conjunction with rails, and under the guidance of the right application development team—they can make the difference that ensures your applications are scalable, feature-rich, and highly dependable.