Article Complete

Ruby Devs Release Hanami V2.0

Ruby’s developers have released a new blazing-fast web framework.

Ruby Devs Release Hanami V2.0

Key takeaways

  • Hanami V2.0 is a new web framework for Ruby, optimised for speed and security.
  • It offers a modular structure, allowing developers to select components as needed.
  • The framework's code structure supports future upgrades without bloating the codebase.
  • Hanami is gaining popularity as an alternative to Ruby on Rails due to its efficiency and ease of maintenance.
  • The latest update includes significant speed optimisations, particularly in the HTTP routing engine.

Takeaways drafted with AI from the article text.

Ruby has been a longstanding favourite of developers due to its dynamic nature and capability to write efficient code. Now, the developers behind Ruby have released the v2.0 of a fast framework built on top of the language; Hanami.

Hanami is a web framework for Ruby that is optimised for speed and security. While the Ruby web framework space is dominated by Ruby on Rails, Hanami is quickly emerging as an alternative. It is gaining rapid popularity owing to low system resource consumption and its simple code syntax, which lends itself to easy maintenance. Moreover, it is still a very young framework, with the 1.0 version being released in 2019. It was developed by a small team of independent developers, headed up by Luca Guidi, Tim Riley, and Peter Solnica. 

Several are choosing Hanami over Ruby on Rails due to the former’s modular nature. While Ruby on Rails needs to be installed as a single package, developers using Hanami can pick and choose what parts of the framework they wish to include in their project.

Moreover, Hanami’s code structure also lends itself to future upgrades without bloating the codebase—a must-have for any modern framework. The framework is also supported by solid documentation and a rapidly-growing community. 

The Hanami 2.0 update brings a variety of added features to the already-powerful framework, starting with further optimisations for speed. The HTTP routing engine for the framework was completely rewritten, and the results were blazing fast. Their benchmarks have found that the new engine beats out almost every other engine on the market, down to the point where it needs to report actions served in microseconds. In a development environment, programmers can iterate on the product in almost real-time, owing to Hanami's smart code loading. 

In addition to this, the development team has also optimised the existing code organisation features in the framework. This takes the form of an app core, which is built around a container and components approach. 

They have also added important features such as code autoloading, slices for modularisation of app components, new providers, and redesigned action classes. Hanami 2.0 also includes always-there dependencies mixin, which allows programmers to bring together behaviours from multiple classes. 

Hanami 2.0 has been in development for nearly three years, and represents an important step forward for Ruby’s web ecosystem. It was built completely by a team of volunteer developers, with help from their small but robust community. Hanami 2.0 shows that Ruby’s web ecosystem is finally maturing; a much-needed alternative to existing solutions. 

Published

Corrections: AIM corrects errors of fact and notes the change on the story. Spotted one? Tell the editors. Read our editorial standards.

More in this story

5 stories
  1. You are here: Ruby Devs Release Hanami V2.0
  2. Anthropic Seeks Up to $64.4 Bn at $1.4 Tn Valuation With IPO
  3. IBM, Microsoft Launch Agentic AI Platform With Over 6,000 AI Agents
  4. HCLTech, PTC Launch Pre-Configured PLM Solution for Semiconductor Firms
  5. Kalshi to Develop Trading Platform for Compute Futures: Report
About the author

Contributor

I am an AI enthusiast and love keeping up with the latest events in the space. I love video games and pizza.

All stories
Belamy · Daily

The day’s AI news, before your first meeting.