Ruby on Rails, Hotwire, Ruby, Open Source Thursdays

Just Enough Hotwire with Chris Oliver

Just Enough Hotwire for Rails Developers with Chris Oliver Open Source Thursdays

Broadcasts callbacks

An introduction to Hotwire with Chris Oliver, from GoRails. Hotwire is the new way of making AJAX requests on Ruby on Rails. Learn how to build JavaScript-less Rails with turbo streams, Stimulus, and form_with.

Chris Oliver is the founder of GoRails, JumpStart Rails, Hatchbox and RailsBytes. He is also one of the hosts of the Remote Ruby podcast.

Chris showed us how to get started with Hotwire, how to inspect turbo streams. He also answered some questions from the audience, including how to migrate from Webpacker to jsbundling-rails, Websockets performance, and security.

Do you want to know how Chris Oliver got so good at building products? By reverse-engineering successful software to sharpen his skills. Learn all about his strategies on Get to Senior. You will also polish your skills by following guided exercises!

Is Hotwire going to become popular?

Chris says is going to take a while. Rails 7 already comes with Hotwire out of the box by default.

Hotwire gives you the possibility to turn a web app into a mobile app in 15 minutes. You can build an interactive app very easily with having to get out too much of your Ruby comfort zone.

It’s almost like the first days of Rails: “Look at what you can do with just one or two developers”. This movement is being called “Ruby Renaissance” or “Ruby Revival”.

Tip: the best way to make Hotwire popular is to use it and find the edge cases and bugs 🐞

Creating a new Rails 7 app with esbuild and Tailwind out of the box

rails -v # => Rails 7.0.0.alpha2

rails new todolist-example -j esbuild --css tailwind

You don’t have to install Tailwind separately!

Hotwire broadcast_to implementation

Tag builder class defines turbo streams methods: prepend, append - to use on views or controllers.

Broadcastable class defines the broadcast callbacks.

How Chris contributes to Open Source projects

Chris contributes to Open Source projects by trying out features that are not documented yet.

You’ll also probably find opportunities to implement new features when doing this. By documenting new features, you can find new bugs and new improvement opportunities to contribute to Rails.

Brand new projects are an easier one to contribute to because it’s got the most bugs. Big and well-used projects, like Rails, are hard to contribute to because it’s complicated and well used, not easy bugs to fix.

Enjoy it! 💅

We are working on the next expert sessions. The best way to get updates is by signing up for our newsletter: