Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introduction to Hotwire
Search
Onur Ozer
October 11, 2023
Programming
86
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introduction to Hotwire
Onur Ozer
October 11, 2023
More Decks by Onur Ozer
See All by Onur Ozer
Breaking Rules to Ship Products: A Beginner's Rails Journey
onurozer
0
49
From Ruby to Revenue: Mastering Marketing for Developers
onurozer
0
29
Foundations of Marketing
onurozer
0
31
Other Decks in Programming
See All in Programming
OS アップデート対応の取り組み方がもっと共有されてほしい
andpad
0
110
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
15
3.1k
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
440
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.8k
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
350
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
160
Creating Composable Callables in Contemporary C++
rollbear
0
200
自作OSでスライド発表する
uyuki234
1
3.7k
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
360
【SRE NEXT 2026 Lunch Session】一人目専任SREの立ち上げを加速する ― AIと進めたオンボーディングで2分を0.04秒にした話
pkshadeck
PRO
0
2k
act1-costs.pdf
sumedhbala
0
200
AI時代の仕事技芸論〜ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ(スクフェス仙台 2026バージョン)
kuranuki
0
530
Featured
See All Featured
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
370
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
190
HDC tutorial
michielstock
2
740
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Facilitating Awesome Meetings
lara
57
7k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
490
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
260
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
180
Transcript
Onur Ozer Founder, Simple Matters Introduction to Hotwire ⚡ Ruby
Singapore Meetup, Sep 2023
My modern web development journey
(╯°□°)╯︵ ┻━┻
Rails and Javascript Prototype.js Script.aculo.us Rails 1 2005 jQuery
Co ff eescript Rails 3 2010 Webpacker Rails 6 2019 importmaps Rails 7 2021 Turbolinks 2015 ActionCable 2016 Stimulus.js 2018
How do you build modern web apps? • That are
fast and responsive • With a simple, productive work fl ow • While keeping template rendering on the server • Without introducing additional complexity
Traditional Web Apps Rails application HTTP Request HTML Response
JS Component Approach JS component AJAX Request JSON Response Rails
application
Single Page Applications (SPAs) Rails JSON API AJAX Request
JSON Response
H T M L O V E R T H
E W I R E
Philosophy • Responsiveness of an SPA without the complexity of
an SPA • Reuse partials • Sending HTML instead of JSON
Ingredients • Turbo • Turbo Drives • Turbo Frames •
Turbo Streams • Stimulus • Strada
Turbo Drive Accelerate navigation without full page reload <body> Rails
application AJAX GET/POST (Fetch) HTML Response <head>
Turbo Frames Partial page updates scoped to individual contexts Rails
application AJAX GET/POST HTML Partial (Turbo Frame) Turbo Frame <turbo frame id=“8”>
Turbo Streams Update multiple parts of a page in response
to a request Rails application AJAX GET/POST HTML Partial (Turbo Streams) Turbo Stream <turbo stream action=“replace” target=“content"> Turbo Stream <turbo stream action=“replace” target=“header”>
Turbo Streams Update multiple parts of a page in response
to a request Rails application (Action Cable) WebSocket Connection WebSocket Connection
Stimulus Organise Javascript with controllers and actions HTML Element HTML
Element Stimulus Controller Stimulus Controller
Demo: Todo App https://github.com/onurozer/hotwire-introduction
Getting Started • Rails 7 - comes by default •
Rails 6 - install turbo-rails and stimulus-rails gems https://github.com/hotwired/turbo-rails#installation https://github.com/hotwired/stimulus-rails#installing-with-installer • Others - install turbo and stimulus npm packages https://www.npmjs.com/package/@hotwired/turbo https://www.npmjs.com/package/stimulus
Resources • Hotwire for Rails Developers Course https://pragmaticstudio.com/hotwire-rails • Turbo
Rails Tutorial https://www.hotrails.dev/ • Hotwire Devs Newsletter https://masilotti.com/hotwire/ • Rails + Hotwire Jobs https://railshotwirejobs.com/
Thank You • Connect on LinkedIn https://www.linkedin.com/in/onurozer/ • Connect on
Mastodon https://ruby.social/@onurozer • My personal website https://onurozer.me/ • My company https://simplematters.co/