Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Prototyping 3 — Data
Search
Florian Plank
June 12, 2012
Programming
2
180
Prototyping 3 — Data
Brief overview over YAML and how to use it within a prototype for I18n and other purposes.
Florian Plank
June 12, 2012
Tweet
Share
More Decks by Florian Plank
See All by Florian Plank
Ready, set, immersion!
polarblau
0
190
Prototyping all the things
polarblau
2
180
CoffeeScript vs. ECMAScript 6
polarblau
5
3.5k
Design for a complex Reality — Siili Breakfast Edition
polarblau
0
150
Enabling Design for a Complex Reality
polarblau
2
130
A primer on Content Security Policy
polarblau
1
430
Rails and the future of the open web
polarblau
3
130
Brief Ruby/Ruby on Rails intro
polarblau
3
200
Ruby Idioms
polarblau
3
590
Other Decks in Programming
See All in Programming
愛される翻訳の秘訣
kishikawakatsumi
3
330
Cell-Based Architecture
larchanjo
0
120
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
830
Flutter On-device AI로 완성하는 오프라인 앱, 박제창 @DevFest INCHEON 2025
itsmedreamwalker
1
110
エディターってAIで操作できるんだぜ
kis9a
0
730
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
470
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
230
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
130
Building AI Agents with TypeScript #TSKaigiHokuriku
izumin5210
6
1.3k
生成AIを利用するだけでなく、投資できる組織へ
pospome
2
340
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
110
Go コードベースの構成と AI コンテキスト定義
andpad
0
130
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.3k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.7k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
KATA
mclloyd
PRO
33
15k
GraphQLとの向き合い方2022年版
quramy
50
14k
The Cost Of JavaScript in 2023
addyosmani
55
9.4k
Building an army of robots
kneath
306
46k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Transcript
Prototyping in the browser
III / Data
CONTENT
XML
<?xml version="1.0" encoding="UTF-8" ?> <books> <book id="1"> <title>Pride and Prejudice</title>
<author>Jane Austen</author> </book> <book id="2"> <title>Brave New World</title> <author>Aldous Huxley</author> </book> </books>
<?xml version="1.0" encoding="UTF-8" ?> <books> <book id="1"> <title>Pride and Prejudice</title>
<author>Jane Austen</author> </book> <book id="2"> <title>Brave New World</title> <author>Aldous Huxley</author> </book> </books>
“XML is like violence. — If it hasn’t solved your
problem, you’re not using enough of it.”
<?xml version="1.0" encoding="UTF-8" ?> <books> <book id="1"> <title>Pride and Prejudice</title>
<author>Jane Austen</author> </book> <book id="2"> <title>Brave New World</title> <author>Aldous Huxley</author> </book> </books>
<?xml version="1.0" encoding="UTF-8" ?> <books> <book id="1"> <title>Pride and Prejudice</title>
<author>Jane Austen</author> </book> <book id="2"> <title>Brave New World</title> <author>Aldous Huxley</author> </book> </books>
<?xml version="1.0" encoding="UTF-8" ?><books><book id="1"><title>Pride and Prejudice</title><author>Jane Austen</author></book><book id="2"><title>Brave New
World</title><author>Aldous Huxley</author></book></ books>
Length? => 216 Content length? => 60 Markup / Content
ratio? => 2.6:1
JSON
{ "books": { "book": [ { "id": 1, "title ":
" Pride and Prejudice", "author ": " Jane Austen" }, { "id": 2, "title": "Brave New World", "author": "Aldous Huxley" } ] } }
{ "books": { "book": [ { "id": 1, "title ":
"Pride and Prejudice", "author ": "Jane Austen" }, { "id": 2, "title": "Brave New World", "author": "Aldous Huxley" } ] } }
Length? => 148 Content length? => 60 Markup / Content
ratio? => 1.5:1
YAML
YAML Ain’t Markup Language* * recursive acronym
--- books: - id: 1 title: Pride and Prejudice author:
Jane Austen - id: 2 title: Brave New World author: Aldous Huxley
--- books: - id: 1 title: Pride and Prejudice author:
Jane Austen - id: 2 title: Brave New World author: Aldous Huxley
Length? => 139 (including whitespace and header) Content length? =>
60 Markup / Content ratio? => 1.3:1
I18n / serve
require File.join(File.dirname(__FILE__), 'lib', 'nested_ostruct')
require 'active_support/inflector' I18n.load_path = Dir['locale/**/*.yml'] I18n.reload!
module ViewHelpers # … def list(key, &block) data = t(key).clone
rescue {} raise data if data =~ /translation missing/ data = NestedOstruct.import(data) raise data unless data.is_a? Array data.each {|i| yield i } end def t(key, args={}) I18n.t(key, args) end end
--- en: foo: bar: Bat
#container %h2= t 'foo.bar'
--- books: - id: 1 title: Pride and Prejudice author:
Jane Austen - id: 2 title: Brave New World author: Aldous Huxley
#container %ul - list 'books' do |book| %li %strong= book.title
= "(#{book.author})"
<ul> <li> <strong>Pride and Prejudice</strong> (Jane Austen) </li> <li> <strong>Brave
New World</strong> (Aldous Huxley) </li> </ul>
PROTOTYPES