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
92
Elixir in Elixir
iamvery
1
160
Feature. Tests. Implementation.
iamvery
0
73
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
250
Other Decks in Programming
See All in Programming
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
550
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
570
AI時代のPHPer生存戦略 ~「言語、もうなんでもよくない?」に本気で向き合う~
vivion
0
360
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
510
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
260
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
490
AI Engineeringは、AIプロダクトだけのものか? 〜AIがソフトウェアを作る時代の新しい当たり前〜 / No AI in your product. AI Engineering in your development.
rkaga
4
410
Claude Code全社展開のためにやったことn選~プラグイン302個・コミッター271人を支えるために~
kenchan
5
1.5k
Lean は証明の正しさを確認するためだけのツールって思ってませんか?
inoueasei
1
160
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
260
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
330
VibeCodingからAgenticWorkflowへ
starfish719
0
440
Featured
See All Featured
Accessibility Awareness
sabderemane
1
170
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
340
Color Theory Basics | Prateek | Gurzu
gurzu
0
410
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
Fireside Chat
paigeccino
42
4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Building AI with AI
inesmontani
PRO
1
1.1k
From π to Pie charts
rasagy
0
280
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
480
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
430
Typedesign – Prime Four
hannesfritz
42
3.1k
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?