HTML over the wire
open sourceMITself-hostablefree
Hotwire is 37signals' approach to building web apps with little JavaScript by sending HTML instead of JSON over the wire: pages render on the server, load fast and stay simple to develop, in any programming language. It's a set of frameworks that work together: Turbo, the heart of it, speeds up page changes and form submissions, splits pages into frames and streams partial updates over WebSocket; Stimulus adds small JavaScript controllers for the rest; and Hotwire Native wraps the web app in native iOS and Android apps. 37signals built them for HEY and Basecamp, and Rails uses Hotwire as its default front end.
Problems it solves
- build an interactive web app without writing and maintaining a separate single-page front end
- our small team can't keep up with a React front end and a JSON API for the same features
- keep rendering HTML on the server but make the app feel as fast as an SPA
- send HTML fragments from the server instead of JSON and let the page update itself
- one web codebase that also powers our iOS and Android apps
- live updates on a page when records change, without hand-written client-side code
- a modern front-end stack for a server-rendered app in Rails, Django, Laravel or Phoenix
Features
- Turbo: Drive, Frames, Streams and morphing page refreshes
- Stimulus: JavaScript controllers wired with data attributes
- Hotwire Native: native iOS and Android shells for the web app
- works with any server-side language
- default front end in Rails
Alternatives
The same job
These do what Hotwire does.
- Inertia.js Build frontend experiences with the backend you love
- React on Rails Integration of React + Webpack + Rails including server-side rendering of React
- Phoenix LiveView Rich, real-time user experiences with server-rendered HTML
- htmx High power tools for HTML
