Turbo (Native), Stimulus, and Strada news and code.
Subscribe to the Hotwire dev newsletter.
My first RailsConf is officially over. 😢
But I had an amazing time meeting folks IRL for the first time! If we didn’t get to say hi then let me know and I’ll make sure we meet at the next conference.
All told, I learned a lot. My favorite technical talk was from Dave Copeland on why your app needs a service layer. Not necessarily service objects, but a spot where all of your business logic lives.
I took this to heart and have been slowly refactoring the railsdevs codebase to extract a service layer. I’m not 100% sure this will get merged in, but it is definitely fun to experiment with a new approach.
I know the word “service” gets a bad rep in the Rails world. But I think it’s worth exploring a new way to organize code every now and then.
Does your app have a service layer? Are you all in on a DSL/framework to help facilitate that? Or do you throw everything in Active Record models?
Following up on last month’s video, Dr. Nic published the next 2 parts of the tutorial on recreating Notion in Rails. These episodes cover inline editing and integrating Tip Tap for rich text editing.
I’m really loving these 5 minute videos on Hotwire on the Mix & Go YouTube channel. This time we are walked through building a buddy list of sorts - a live-updating screen that shows who is currently online. Make sure to watch until the end as there is a gotcha for using this code in production.
Turbo only provides 7 different Turbo Stream actions out of the box:
after. But what if you want your own custom action, like
redirect? Roland walks us through how to create your own custom Turbo Stream action with a Stimulus controller and a good ol’ helper.
Query Objects have been top of mind for me since adding filtering to railsdevs. They help keep all query-related business logic in a single model without ballooning the scope of your Active Record models. Here, Thiago walks through some steps to make your Query Objects easier to write and understand.
Leveraging popular pagination framework Pagy, Yaroslav and Phil progressively enhance a long list of items with Hotwire. What starts out as a button to load more results eventually becomes an infinitely scrolling list. There’s also a bonus section on building your own pagination without a third-party library.
The survey results are in! Every year Planet Argon runs the Ruby on Rails Community survey and this year they received over 2,500 responses. As always, they compare results to previous surveys with nice graphs and charts. I’m still diving in to all the results but there is a lot to learn here.
💎 RailsConf 2022 slides
RailsConf 2022 was last week and a ton of amazing talks and workshops were given.
According to the organizers, video recordings will be available publicly later this year. Until then, here are links to the slides from various talks throughout the week.
🙋♂️ Some personal updates
I took a hiatus from client work this month to focus on my side businesses. And boy have I been busy!
- Jumpstart Pro iOS got 11 new features and a script to get you started faster
- railsdevs had 25+ PRs merged and still has 10+ open issues up for grabs
- RailsConf inspired a long list of things I want to do
- I drafted an outline of my Turbo Native workshop
P.S. The Hotwire dev newsletter is accepting sponsorships and job postings! Email me if you're interested in reaching a dedicated group of Ruby on Rails developers.