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
A Less Complex Web with Ratchet & Jank
Search
Jay Hayes
May 10, 2017
Programming
380
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
A Less Complex Web with Ratchet & Jank
https://conferences.oreilly.com/oscon/oscon-tx/public/schedule/detail/56904
Jay Hayes
May 10, 2017
More Decks by Jay Hayes
See All by Jay Hayes
Build Elixir Phoenix
iamvery
0
89
Elixir in Elixir
iamvery
1
160
Feature. Tests. Implementation.
iamvery
0
72
Ratchet & Jank
iamvery
0
200
Elixir in Elixir
iamvery
6
1.2k
Rubyist Does Swift
iamvery
0
100
Swift Introduction
iamvery
0
330
Data Integrity
iamvery
0
110
Pairing with tmux
iamvery
2
240
Other Decks in Programming
See All in Programming
えっ!!コードを読まずに開発を!?
hananouchi
0
230
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
9.2k
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
360k
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
150
才能?センス?知らん、 続けたもん勝ちだ。-- 結婚・出産・癌を越えてなお、私がプロダクトを創り続ける理由
16bitidol
2
890
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.2k
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
620
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
1
240
吝嗇家のためのAI活用 / AI development for miser - ChatGPT + Issue Driven Development
tooppoo
0
190
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1.2k
OSINT for SRE: 学術論文とポストモーテムから探る システム障害の共通パターン / SRE NEXT 2026
tomoyk
1
4.1k
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.9k
Featured
See All Featured
Statistics for Hackers
jakevdp
799
230k
Music & Morning Musume
bryan
47
7.3k
RailsConf 2023
tenderlove
30
1.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
The Curious Case for Waylosing
cassininazir
1
440
How to Ace a Technical Interview
jacobian
281
24k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
390
Code Review Best Practice
trishagee
74
20k
BBQ
matthewcrist
89
10k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
220
Amusing Abliteration
ianozsvald
1
240
Transcript
Ratchet+Jank live slides: bit.ly/2pV0PhP @iamvery ♥
@iamvery ♥ This is a talk about the web.
None
@iamvery ♥ This is a talk about the web.
@iamvery ♥ This is a talk about complexity.
None
None
None
@iamvery ♥ "
@iamvery ♥ COMPLEXITY
@iamvery ♥ git reset --hard 2004
@iamvery ♥ Turbolinks
View
@iamvery ♥ <% if [earth, moon, sun].all?(&:aligned?) %> <figure> <%=
moon.between?(earth..sun) ? sun.eclipsed : moon.eclipsed %> </figure> <% else %> <% if earth.daytime? %> <figure><%= sun.shine %></figure> <% else %> <figure><%= moon.shine %></figure> <% end %> <% end %>
@iamvery ♥ <figure>…</figure>
@iamvery ♥ <figure> <%= celestial_body.display %> </figure> <figure> {{ celestial_body.display
}} </figure>
@iamvery ♥ Logic-less
@iamvery ♥ HTML
The Web Something I’m building Something you’re building
@iamvery ♥ Plain HTML
@iamvery ♥ <article> <h2>The Post Title</h2> <p> The post body.
</p> </article>
@iamvery ♥ %{ posts: [ %{title: "Interesting Facts”, body: "Cats
are soft. Dogs are noisy."}, %{title: "Bears", body: "Bears eat beets."}, ] }
@iamvery ♥ <%= for post <- @data.posts %> <article> <h2><%=
post.title %></h2> <p><%= post.body %></p> </article> <% end %>
@iamvery ♥ <article data-prop="posts"> <h2 data-prop="title"></h2> <p data-prop="body"></p> </article>
@iamvery ♥ <article data-prop="posts"> <h2 data-prop=“title">Interesting Facts</h2> <p data-prop=“body”> Cats
are soft. Dogs are noisy. </p> </article> <article data-prop="posts"> <h2 data-prop="title">Bears</h2> <p data-prop=“body”> Bears eat beets. </p> </article>
@iamvery ♥ Content
@iamvery ♥ The 5 Forms of Data
@iamvery ♥ 1. Properties are mapped
@iamvery ♥ %{property: “value”}
@iamvery ♥ 2. Tag content
@iamvery ♥ “value” %{property: }
@iamvery ♥ 3. Tag attributes
@iamvery ♥ [href: “http://…”]
@iamvery ♥ 4. Combined content
@iamvery ♥ {“Click”, href: “http://…”}
@iamvery ♥ 5. Iteration
@iamvery ♥ <%= for post <- @data.posts %> <article> <h2><%=
post.title %></h2> <p><%= post.body %></p> </article> <% end %>
@iamvery ♥ %{items: [“first”, “second”]}
@iamvery ♥ %{ active_user: %{name: "Jay"}, posts: [ %{ title:
"Cats Facts", body: "Some cats are fuzzy.", comments: ["I like cats.", "I prefer dogs."], edit_link: {"Edit 'Cat Facts'", href: "http://example.com/posts/1"}, }, %{ title: "Sleepy Dog", body: "Dogs sleep a lot.", comments: [], edit_link: {"Edit 'Sleepy Dog'", href: "http://example.com/posts/2"}, }, ], new_post: [disabled: true], }
@iamvery ♥ Ratchet
@iamvery ♥ “A set of pre-defined transformations used to bind
content to elements” https://github.com/iamvery/ratchet
(Demo)
@iamvery ♥ Caching
@iamvery ♥ I Designers ❤
ERB EEX JSX %
@iamvery ♥ “It’s a mystery to me why we can’t
write plain HTML and CSS.” - Designer
Client
@iamvery ♥ But…
Data Transform View
@iamvery ♥ Jank
Controller Browser Model View Router JS DOM Jank Channel Hi
(Demo)
@iamvery ♥ “Like Ratchet, but more Janky” https://github.com/iamvery/jank
Jay Hayes https://iamvery.com — @iamvery
None
None
None
We develop.
We teach.
We write.
pakyow.org
@iamvery ♥ HTML Templates
@iamvery ♥ The web works.
@iamvery Questions?