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
Data on the Web
Search
Will Farrington
June 08, 2011
Technology
210
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Data on the Web
It's an intro to data on the web for some folks new to web development.
Will Farrington
June 08, 2011
More Decks by Will Farrington
See All by Will Farrington
test-queue makes your tests run fast
wfarr
0
490
Incident Response Done Right: From First Page to Postmortem
wfarr
0
600
Boxen: PuppetConf 2013
wfarr
6
920
Puppet at GitHub: PuppetConf 2013
wfarr
21
2.3k
Puppet at GitHub (PuppetCamp Raleigh 2013)
wfarr
1
500
Boxen: PuppetCamp SF 2013
wfarr
5
1.1k
Boxen: MWRC
wfarr
5
290
Boxen: PuppetCamp ATL
wfarr
0
340
BOXEN
wfarr
43
5.6k
Other Decks in Technology
See All in Technology
制約理論(ToC)入門 2026版
recruitengineers
PRO
8
2.3k
MulticaとPi Coding Agentで、小規模OSSを30本同時運用した流れ
eiei114
0
110
関東Kaggler会発表資料
takoi
1
230
[ChatGPT Work LT]事務作業が苦手な人のための バックオフィスの「半」自動化
chimaki_iot
0
280
モノリス Rails でも日中に rails db:migrate を走らせたい! / Daytime rails db:migrate on Monolithic Rails!
euglena1215
4
580
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.9k
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.2k
システム思考で問題に対処する
yussak
0
280
メルカリのグローバルアプリで挑んだ AlloyDB 運用と課題解決の実践記
hatappi
0
250
【CEDEC2026】『Relink』を拡張せよ - 『GRANBLUE FANTASY: Relink - Endless Ragnarok』の開発速度と品質を守るCI運用
cygames
PRO
0
170
PLATEAU で バーチャル花火大会
tatsuya1970
0
150
カートの信頼性を担保するWireMockを使ったe2eテスト
ykagano
0
270
Featured
See All Featured
The Mindset for Success: Future Career Progression
greggifford
PRO
0
440
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
570
The SEO Collaboration Effect
kristinabergwall1
1
520
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
640
It's Worth the Effort
3n
188
29k
How GitHub (no longer) Works
holman
316
150k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
390
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Ruling the World: When Life Gets Gamed
codingconduct
0
300
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
200
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Transcript
Data on the Web Will Farrington
File I/O
File I/O • Minimal reusability • No "correct" format •
Hard to maintain • Prone to problems caused by encoding changes
Standardize
CSV
Comma Separated Values
CSV • Used for tabular data • Small footprint •
Widely recognized and supported format • Many different flavors • Support in database systems and spreadsheets
Example CSV Id,Name,Desc,Points,Due 1,Homework 1,Nothing special,15,6/7/2011 15,"Project, número uno",,100,6/21/2001
XML
Extensible Markup Language
XML • Open, standard specification • Unicode-friendly • Came to
prominence with Java and .NET • Widely used on the web • Good at representing tree-like data
Example XML <?xml version="1.0" encoding="UTF-8"?> <statuses type="array"> <status> <created_at>Tue Jun
07 21:30:50 +0000 2011</created_at> <id>78212343649140736</id> <text>@skalnik Looks good.</text> <source><a href="http://itunes.apple.com/us/app/twitter/id409789998?mt=12" rel="nofollow">Twitter for Mac</a></source> <truncated>false</truncated> <favorited>false</favorited> <in_reply_to_status_id>78211453777231872</in_reply_to_status_id> <in_reply_to_user_id>15878923</in_reply_to_user_id> <in_reply_to_screen_name>skalnik</in_reply_to_screen_name> <retweet_count>0</retweet_count> <retweeted>false</retweeted> <user> <id>10403812</id> </user> <geo/> <coordinates/> <place/> <contributors/> </status> </statuses>
Criticisms of XML • Very verbose • Parsers can be
extremely complicated • Does not map well to some type systems • Does not represent highly structured data well
JSON
JavaScript Object Notation
JSON • Based on a subset of JavaScript circa 2003
• Lightweight • Simple to parse • Designed to be human-readable • Well-suited to structured data as well as trees
Example JSON [{ "coordinates":null, "created_at":"Tue Jun 07 21:30:50 +0000 2011",
"truncated":false, "favorited":false, "contributors":null, "text":"@skalnik Looks good.", "id":78212343649140736, "retweet_count":0, "geo":null, "retweeted":false, "in_reply_to_user_id":15878923, "source":"<a href=\"http://itunes.apple.com/us/app/twitter/id409789998?mt=12\" rel= \"nofollow\">Twitter for Mac</a>", "place":null, "in_reply_to_screen_name":"skalnik", "user":{"id":10403812}, "in_reply_to_status_id":78211453777231872 }]
More on JSON • eval() (is bad) • JSON.parse() •
Built-in browser support • Popular for AJAX: both single-domain and cross-domain
JSONP • JSON with Padding • Used for cross-domain requests
• Alternative to Cross-Origin Resource Sharing • Only supports GET
BSON • Binary JSON • Superset of JSON • Used
by MongoDB for storage of binary data
YAML
YAML Ain't Markup Language
YAML • Not often used over the network • Popular
for configuration files • Human-readable • Data-oriented • No execution means no injection
Example YAML --- - coordinates: created_at: Tue Jun 07 21:30:50
+0000 2011 truncated: false favorited: false contributors: text: "@skalnik Looks good." id: 78212343649140736 retweet_count: 0 geo: retweeted: false in_reply_to_user_id: 15878923 source: <a href="http://itunes.apple.com/us/app/twitter/id409789998?mt=12" rel="nofollow">Twitter for Mac</a> place: in_reply_to_screen_name: skalnik user: id: 10403812 in_reply_to_status_id: 78211453777231872
What to do with all these formats?
APIs
Application Programming Interfaces
APIs • Websites tell you what formats they support •
Websites document their URL structure • Developers use these APIs to integrate products • You can even consume your own APIs
But...
Not everyone offers APIs
What do?
Screen-scraping
Screen-scraping • Requests the full HTML for a page •
Parses out the content you want • Slow • Website layout may change and break yours
Demo!
Questions?
Will Farrington
[email protected]
http://speakerdeck.com/u/wfarr