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
87
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
51
From Ruby to Revenue: Mastering Marketing for Developers
onurozer
0
29
Foundations of Marketing
onurozer
0
32
Other Decks in Programming
See All in Programming
『コードを書く以外の』エンジニアリング〜課金基盤移行プロジェクト推進のためのTips4選
yuriko1211
0
560
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.6k
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
140
コーディングルールの鮮度を保ちたい for SRE NEXT 2026 / keep-fresh-go-internal-conventions-sre-next-2026
handlename
0
160
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
390
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
2.7k
使用 Meilisearch 建立新聞搜尋工具
johnroyer
0
210
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
1k
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
17k
Lean は証明の正しさを確認するためだけのツールって思ってませんか?
inoueasei
1
130
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
290
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
460
Featured
See All Featured
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
370
Mobile First: as difficult as doing things right
swwweet
225
10k
First, design no harm
axbom
PRO
2
1.2k
Building AI with AI
inesmontani
PRO
1
1.1k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
450
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
310
Optimising Largest Contentful Paint
csswizardry
37
3.9k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
420
The SEO Collaboration Effect
kristinabergwall1
1
510
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
820
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
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/