Live data from Hacker News

Use a Google Spreadsheet as your JSON backend

coderwall.com

11–20 of 69 posts

Re: Use a Google Spreadsheet as your JSON backend

#12
We use Google Spreadsheets for our sites Version history page. Makes it easy to maintain an up-to-date list of all the changes we push out.

Its pretty easy to setup your own:

http://open.qz.com/post/52146389669/build-your-own-versions-...

https://github.com/Quartz/tumblr/tree/master/open/examples/g...

Re: Use a Google Spreadsheet as your JSON backend

#13
This is great for prototypes but there's an edge case that breaks it's usefulness in live sites.

Sometimes google will make already logged in users reauthenticate. It will redirect to the authentication page and you'll get a bunch of HTML rather than json returned, and the user won't know why it's not working.

Re: Use a Google Spreadsheet as your JSON backend

#14

..FWIW, for those of you who haven't been enlightened with the power that Google Apps Script[1] offers yet, be sure to check it out: http://script.google.com . Layered on top of Spreadsheets, this pair takes prototyping to a whole new level. [1] https://developers.google.com/apps-script/

Apps Scripts are pretty amazing. You can add custom UI elements to Google Spreadsheets and have it talk to external services (even your own).

My team is currently using it as a makeshift JSON level editor for a mobile game where each tab represents a collection of objects and the schema is defined dynamically by whatever is in the frozen header row. (think Backbone collections and models).

Re: Use a Google Spreadsheet as your JSON backend

#15
I wrote a small library a while ago to use Google spreadsheets like this: https://github.com/Stuk/gooss (although it appears some better, more maintained ones have appeared in the mean time).

You can see it working at http://stuartk.com/bundle/ (data from https://docs.google.com/spreadsheet/ccc?key=0Ar35F5WUAjXedDY... )

This is combined with with Google forms to allow people to submit new data, and the publish to RSS feature, although the content of the RSS feed isn't very pretty.

Re: Use a Google Spreadsheet as your JSON backend

#16
Good for prototyping, thanks. I'd be wary of using this in a live system though: relying on Google's public APIs/services is risky enough (Checkout is one example, Reader, etc) let alone an undocumented feature like this which could change/disappear suddenly.

Edit: it has been pointed out that the criticism of their documented/public APIs may be unjustified. The issue here is that this particular feature is undocumented

Re: Use a Google Spreadsheet as your JSON backend

#17
post #8

This is a great way of putting a UI on top of JSON! I created http://jsonblob.com/ to accomplish the same thing, but a spreadsheet is much more familiar than a JSON editor.

Cool site. What's the development status? Seems well-polished in some regards but pretty broken in others (I can't get open/save/clear to work at all). [Edit: i'm using chrome latest release]

Re: Use a Google Spreadsheet as your JSON backend

#18
post #13

This is great for prototypes but there's an edge case that breaks it's usefulness in live sites. Sometimes google will make already logged in users reauthenticate. It will redirect to the authentication page and you'll get a bunch of HTML rather than json returned, and the user won't know why it's not working.

The URL has "public" in it; are you sure Google requires authentication at all for this?

Re: Use a Google Spreadsheet as your JSON backend

#19
post #16

Good for prototyping, thanks. I'd be wary of using this in a live system though: relying on Google's public APIs/services is risky enough (Checkout is one example, Reader, etc) let alone an undocumented feature like this which could change/disappear suddenly. Edit: it has been pointed out that the criticism of their documented/public APIs may be unjustified. The issue here is that this particular feature is undocumen…

Its using it behind an abstraction layer that decouples the substantive work of the rest of the app from the Google Spreadsheet API and storage backend, for the express purpose of limiting the impact of any later need to move to a different backend service. Given that Checkout and Reader -- the Google examples you cite as reasons to be wary of it for a live system -- were terminated with extensive notice, that doesn't seem like it would pose any problem with this approach.

Re: Use a Google Spreadsheet as your JSON backend

#20
Hmm, I would think thrice, before I go his path again. Thought it was a clever idea to use the mixture of easy to maintain spreadsheets, the cron service and JSON to feed huge satellite images into a tiling service (zoom.it) and let Google autonomously update and serve the list of daily mosaics as JSON.

I got used to daily time out messages, but waiting 1 min for a (cached!) 10 kb JSON list is far too much. However, organizing and correcting data using an online spreadsheet saves a lot of time and is kinda fun.

Post reply on HN