⚡️ Hotwire dev newsletter - July 2022 edition

A curated, monthly roundup of the best Turbo (Native), Stimulus, and Strada articles, code, courses, and more by Joe Masilotti.

Welcome back to the July edition of the ⚡️ Hotwire dev newsletter! This newsletter was sent to almost 2000 developers – I appreciate each and every one of you. 🤗

If you missed RailsConf this year now’s your chance to catch up on the recordings. All 67 videos have been uploaded to YouTube. Not sure where to start? I list my favorite talks below.

Speaking of YouTube, I’m doing my first Turbo Native live stream later today. And I’d love if you could come and say hi! I’ll be fielding questions at the end if you have anything you’d like to ask.

We also have so much content from Matt Swanson he gets his own section this month. 😆

📰 News

RailsConf 2022 videos on YouTube

All 67 (!) videos from RailsConf 2022 are now live on YouTube. If you missed the conference this is a great way to catch up on what’s going on in the community. Some of my favorites include Meditations on Software by Vaidehi Joshi, Your Service Layer Needn’t be Fancy, It Just Needs to Exist by David Copeland, and The Mrs Triggs Problem by Andy Croll.

by Joe Masilotti @joemasilotti

I’m live streaming some Turbo Native content today at 4pm ET / 1pm PT! Learn how to add native navigation bar buttons to your iOS app. Set up the Swift code once to add them dynamically with JavaScript from Rails. If you miss the live stream the recording will be at the same link.

Top Ruby Companies

A listing of 45 public companies that are built on Ruby (or Rails) along with their market caps. An interesting insight into how Ruby has impacted the world at large. The most impressive number? $62.4 billion in revenue in the last 12 months. 😲

Shopify lays off 10% of staff

I don’t normally link to news like this, but this is too important to ignore. Shopify is a major contributors to the source code of Ruby and Rails. I feel for everyone who was affected by this and hope you can take some time to reflect and learn what you want to do next. Please, email me if you need any help – even if it’s just to chat. ❤️

🎓 Tutorials and guides

Get Started with Hotwire in Your Ruby on Rails App

by Sapan Diwakar @diwakarsapan

A lengthly dive into what Hotwire is and how to use it. Scroll about ⅓ down for the good stuff. Sapan covers how to implement endless scroll, dynamic forms, and how to append content to pages without reloading. Each example uses a different mix of Frames, Streams, and Stimulus.

How to Take Screenshots with Ruby on Rails

by Corinn Pope @corinnpope

I wish this article existed when I was building Mugshot Bot! I spent a ton of time trying to get JavaScript-based screenshots to work before throwing the towel in and building it myself. Corinn covers four different methods in this tutorial: Puppeteer & Grover, Cloudinary + URL2png, html2canvas, and Urlbox.

Micronaut integration with Hotwire Turbo

by Sergio Del Amo Caballero @ove seeing non-Rails integrations with Turbo! Micronaut is a Java-based full-stack framework. I haven’t used it directly, but the documentation looks quite polished. There are a few video demos in this article including ones on integrating Turbo Native on iOS and Android!

Turbo Frames vs. Turbo Streams

by Cezar Halmagean (Mix & Go) @chalmagean

Confused about the difference between Frames and Streams? Cezar (Mix & Go) explains the two in detail and dives into why you might use one over the other. He also calls out the shortcomings of each and when it makes sense to try a different approach.

👨‍💻 The Matt Swanson section

Matt released so much quality content in the last few weeks that I couldn’t decide what to cut. Instead of leaving anything out, here’s everything!

The most underrated Rails helper: dom_id

by Matt Swanson @_swanson

Even though dom_id has been around for over a decade, Hotwire breathes some new life into it. The helper generates HTML id values for Active Record models (and more) based on the ID and model name. Matt dives into using it for tag builders, deep linking anchor tags, and Turbo Frames + Streams.

Adding keyboard shortcuts and hotkeys to StimulusJS

by Matt Swanson @_swanson

Looking to add keyboard shortcuts to your Rails app but don’t know where to start? Matt reviews 4 different libraries and reasons why you would want to use one over the other. I’m hoping to adopt one of these soon for an upcoming feature I’m building.

Galaxy brain CSS tricks with Hotwire and Rails

by Matt Swanson @_swanson

OK, am I the the only one that didn’t know about the class_names helper?! This article covers how write class names dynamically without string interpolation. Matt also covers inline <style> tags and how they play nicely with caching.

Code with Jason #156 - Hotwire with Matt Swanson

by Matt Swanson @_swanson

One of the reasons I love the Code with Jason podcast is the tangents the interviews follow. This episode was particularly out there with Matt and Jason diving into their favorite books and pottery. Jason, if you’re reading this, I didn’t love the Foundation series either!

🎖 Achievement unlocked!

I hit a big achievement last week: shortest time from project kick-off to live in the App Store. I ported a client’s Ruby on Rails app to iOS and we went live in the App Store in 7 short weeks. 🎉

This is a huge milestone because it gets me closer to my dream of helping more folks get their businesses on iOS. I wrote about the process on my blog diving into how it worked, the shortcuts we used, and how it all fit together.

Thanks,
Joe Masilotti
@joemasilotti joe@masilotti.com