What exactly is Hotwire?

Hotwire is not a single technology but a combination of three different technologies: Turbo, Stimulus, and Strada. While this may initially sound confusing, it’s quite simple once you understand how each technology works.

Some History

In 2017 Rails 5 offered the option to include Turbolinks in your application.

Turbolinks® makes navigating your web application faster.

Then in August 2018, Stimulus , a modest JavaScript framework for the HTML you already have, was introduced.

… designed to augment your HTML with just enough behavior to make it shine.

Around the same time Action Cable, a solution to seamlessly integrate WebSockets with the rest of your Rails application was introduced.

Introducing Hotwire

In December 2020 Hotwire was introduced to the world.
It comprises three technologies;

Turbo

Turbo replaces the now deprecated Turbolinks and adds the ability to stream partial page updates over WebSockets.

Stimulus

Ideal for where you require sprinkles of JavaScript in your application

Strada (not released yet)

Standardizes the way that web and native parts of a mobile hybrid application talk to each other via HTML bridge attributes. This makes it easy to progressively level-up web interactions with native replacements

Summary:

Turbo replaces the now deprecated Turbolinks and adds the ability to stream partial page updates over WebSockets. Stimulus is ideal for where you require sprinkles of JavaScript in your application. Strada, which is not yet released, standardizes how web and native parts of a mobile hybrid application talk to each other via HTML bridge attributes.

Key takeaways:

  1. Hotwire is not a single technology but a combination of several technologies that work together.
  2. Hotwire can make modern web application development faster by removing the overhead of more complex frameworks and by leveraging streaming partial page updates over WebSockets.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
David Teren

David Teren

70 Followers

Software Engineering Team Lead @ Prodigy Finance. All things Ruby on Rails.