jsonpified google spreadsheet (gtug munich)

28
Google Spreadsheet is the Database Wolfram Kriesing, uxebu @wolframkriesing JSONPified Google Spreadsheet Freitag, 24. Juli 2009

Upload: wolframkriesing

Post on 28-Nov-2014

3.847 views

Category:

Technology


1 download

DESCRIPTION

See how to use JSONP with a Google spreadsheet, even though it’s not exactly provided. I gave this talk at the Google Technology User Group Munich, Germany on 23rd July 2009. The blog article that goes with it: http://blog.uxebu.com/2009/04/30/jsonp-for-google-spreadsheets/

TRANSCRIPT

Page 1: JSONPified Google Spreadsheet (gtug Munich)

Google Spreadsheetis the Database

Wolfram Kriesing, uxebu@wolframkriesing

JSONPified Google Spreadsheet

Freitag, 24. Juli 2009

Page 2: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

JavaScript AJAX

CSSdojo

BrowserOpenSource

Web2.0

FrontEndUsability UserExperience

djangomobile

Freitag, 24. Juli 2009

Page 3: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

We Need

• The Use Case

• JSONP, CSV

• Google Spreadsheet

• JavaScript

Freitag, 24. Juli 2009

Page 4: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

The Use Case

Freitag, 24. Juli 2009

Page 5: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

Freitag, 24. Juli 2009

Page 6: JSONPified Google Spreadsheet (gtug Munich)

Source: Calendar

public data mashable use them as you like

Freitag, 24. Juli 2009

Page 7: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

Enrich

Freitag, 24. Juli 2009

Page 8: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

Events Custom DataJSONP ???

Freitag, 24. Juli 2009

Page 9: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

Custom Data

Freitag, 24. Juli 2009

Page 10: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

Google SpreadsheetWHY?

Freitag, 24. Juli 2009

Page 11: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

Google Doc - My DB

• Easy to maintain (by the customer)

• Permission handling included

• CDN for free

• Speed!

Freitag, 24. Juli 2009

Page 12: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

JSONP

Freitag, 24. Juli 2009

Page 13: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

JSONP

• JSON with Padding http://bit.ly/whatisjsonp

• wrap your JSON with a function name

• <script src="http://url/?callback=myFunc"></script>

• myFunc({whatever:"data"})

• function name given by "caller"

• easy cross domain (XD)

• widely spread (gCal, Yahoo!Pipes, etc.)

Freitag, 24. Juli 2009

Page 14: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

JSONP Pros

• Native JavaScript

• No Mapping, Parsing, Native Data

• Speed!

• Cross Domain

• Trigger when data loaded (async made easy)

Freitag, 24. Juli 2009

Page 15: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

Real Life

Freitag, 24. Juli 2009

Page 16: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

Freitag, 24. Juli 2009

Page 17: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

ATOM

not suited for spreadsheet data

cross domain - fail

Freitag, 24. Juli 2009

Page 18: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

ATOM as JSON

huge, man

cross domain!

Freitag, 24. Juli 2009

Page 19: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

CSV

so small, sweet

still no cross domain :(

Freitag, 24. Juli 2009

Page 20: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

@runnismus

Freitag, 24. Juli 2009

Page 21: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

Freitag, 24. Juli 2009

Page 22: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

JSONPed CSV

Freitag, 24. Juli 2009

Page 23: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

CSV as JSONP

Freitag, 24. Juli 2009

Page 24: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

The Client

http://static.uxebu.com/~cain/JSONPedCSV.html

Freitag, 24. Juli 2009

Page 25: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

Drawbacks

• Special format for some columns

• Little fault tolerance

• New lines denied

• Callback name is fix

Freitag, 24. Juli 2009

Page 26: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

Even Cooler

• Nathan Hammondhttp://nathanhammond.com/using-google-spreadsheets-to-make-testing-easier

• A converter macro

• Creates JSONPed sheet on save

• Sexy!

• Less drawbacks :-)

Freitag, 24. Juli 2009

Page 27: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

Actually

• Nobody wants this!

• Google: Please add JSONP to spreadsheets! Thanks!

Freitag, 24. Juli 2009

Page 28: JSONPified Google Spreadsheet (gtug Munich)

Wolfram Kriesing, uxebu @wolframkriesing

thxhttp://static.uxebu.com/~cain/JSONPedCSV.html

http://blog.uxebu.com/2009/04/30/jsonp-for-google-spreadsheets/

http://blog.uxebu.com

Wolfram Kriesing, [email protected]

http://twitter.com/uxebuhttp://twitter.com/wolframkriesing

Freitag, 24. Juli 2009