Skip to main content
Full Stack Radio

151: DHH – Building HEY with Hotwire

74 min episode · 2 min read

Episode

74 min

Read time

2 min

AI-Generated Summary

Key Takeaways

  • Turbo Frames for component isolation: Wrap page segments in frames to update independently without full page reloads. Each frame maintains its own caching schedule—inbox content churns constantly while label menus cache for months, reducing server load and preventing form state loss during concurrent operations.
  • Progressive enhancement ladder: Start with Turbo Drive for zero-config AJAX navigation, add Turbo Frames for partial updates, use Turbo Streams for multi-element mutations via WebSocket or form responses, then Stimulus for JavaScript sprinkles. Pay complexity costs only when needed, not upfront for simple CRUD screens.
  • Server-side template reuse: Single HTML partials render initial pages, lazy-loaded frames, form responses, and WebSocket updates. HEY ships 40KB compressed JavaScript with zero client-side templates by keeping domain logic, permissions, and database queries server-side where SQL executes in 50-70 milliseconds versus HTTP round-trips.
  • HTTP/2 multiplexing enables frames: Multiple frame requests over one connection with minimal ping penalty makes lazy-loading viable. Separate frames with distinct cache lifecycles outperform monolithic pages—five segments with independent expiration beats single-key cache invalidation when any segment changes.
  • Training concessions with designers: Developers propose UI adjustments that simplify implementation—moving buttons to enable frame replacement versus custom TurboStream responses. Designers approve when trade-offs are minor, reject when design integrity matters, creating collaborative optimization without sacrificing either development velocity or user experience quality.

What It Covers

DHH explains Hotwire, a framework for building modern web applications using server-side rendering with HTML over the wire, eliminating the need to duplicate templates in JavaScript while maintaining rich interactivity through Turbo Drive, Turbo Frames, and Turbo Streams.

Key Questions Answered

  • Turbo Frames for component isolation: Wrap page segments in frames to update independently without full page reloads. Each frame maintains its own caching schedule—inbox content churns constantly while label menus cache for months, reducing server load and preventing form state loss during concurrent operations.
  • Progressive enhancement ladder: Start with Turbo Drive for zero-config AJAX navigation, add Turbo Frames for partial updates, use Turbo Streams for multi-element mutations via WebSocket or form responses, then Stimulus for JavaScript sprinkles. Pay complexity costs only when needed, not upfront for simple CRUD screens.
  • Server-side template reuse: Single HTML partials render initial pages, lazy-loaded frames, form responses, and WebSocket updates. HEY ships 40KB compressed JavaScript with zero client-side templates by keeping domain logic, permissions, and database queries server-side where SQL executes in 50-70 milliseconds versus HTTP round-trips.
  • HTTP/2 multiplexing enables frames: Multiple frame requests over one connection with minimal ping penalty makes lazy-loading viable. Separate frames with distinct cache lifecycles outperform monolithic pages—five segments with independent expiration beats single-key cache invalidation when any segment changes.
  • Training concessions with designers: Developers propose UI adjustments that simplify implementation—moving buttons to enable frame replacement versus custom TurboStream responses. Designers approve when trade-offs are minor, reject when design integrity matters, creating collaborative optimization without sacrificing either development velocity or user experience quality.

Notable Moment

DHH reveals Basecamp originally had a controller with 22 actions before REST constraints forced decomposition into six focused controllers. He argues similar constraints in TurboStreams—limiting DOM mutations to append, replace, update, delete—prevent bloated responses and encourage cleaner architecture versus unlimited JavaScript eval capabilities.

Know someone who'd find this useful?

You just read a 3-minute summary of a 71-minute episode.

Get Full Stack Radio summarized like this every Monday — plus up to 2 more podcasts, free.

Pick Your Podcasts — Free

Keep Reading

More from Full Stack Radio

We summarize every new episode. Want them in your inbox?

Similar Episodes

Related episodes from other podcasts

This podcast is featured in Best Cybersecurity Podcasts (2026) — ranked and reviewed with AI summaries.

You're clearly into Full Stack Radio.

Every Monday, we deliver AI summaries of the latest episodes from Full Stack Radio and 192+ other podcasts. Free for up to 3 shows.

Start My Monday Digest

No credit card · Unsubscribe anytime