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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Jay Hayes
May 10, 2017
Programming
370
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
86
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
99
Swift Introduction
iamvery
0
320
Data Integrity
iamvery
0
110
Pairing with tmux
iamvery
2
240
Other Decks in Programming
See All in Programming
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
260
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.5k
エンジニアと一緒にテストコードの設計と実装を改善した話
mototakatsu
0
230
ふつうのFeature Flag実践入門
irof
8
4.2k
Performance Engineering for Everyone
elenatanasoiu
0
230
Vite+ Unified Toolchain for the Web
naokihaba
0
360
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
190
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.5k
エージェンティックRAGにAWSで入門しよう!
har1101
9
1.8k
はてなアカウント基盤 State of the Union
cockscomb
1
900
Lessons from Spec-Driven Development
simas
PRO
0
220
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
180
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
1.8k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
350
BBQ
matthewcrist
89
10k
For a Future-Friendly Web
brad_frost
183
10k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Producing Creativity
orderedlist
PRO
348
40k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
Typedesign – Prime Four
hannesfritz
42
3.1k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
850
WCS-LA-2024
lcolladotor
0
660
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
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?