Live data from Hacker News

Use a Google Spreadsheet as your JSON backend

coderwall.com

21–30 of 69 posts

Re: Use a Google Spreadsheet as your JSON backend

#21

..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/

From personal experience, Google Apps Script is not ready for Enterprise / Production. It's simply too unreliable.

However I do enjoy the API. It's wonderful how easy it is to prototype an idea and get it off the ground with minimal effort.

Re: Use a Google Spreadsheet as your JSON backend

#22
We use a Google Spreadsheet as the DB for the TinkerPop Book preview sign up form (http://www.tinkerpopbook.com), however, we used the old-style Google Docs Form (https://spreadsheets.google.com/formResponse), which allows anyone to add an entry to the spreadsheet while protecting against anyone from edititing existing entries.

This postContactToGoogle function gets around the cross-domain issue: http://www.tinkerpopbook.com/js/script.js -- props to the base22 team for the tip (https://wiki.base22.com/pages/viewpage.action?pageId=7294200...).

Unfortunately the option for creating the old-style Google Form is not directly available since Google switched everything over to Google Drive (if anyone knows how to access it please let me know) so I cloned/copied an existing old-style form for future use.

Re: Use a Google Spreadsheet as your JSON backend

#23
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'…

Maybe the comparison wasn't the wisest, valid point.

But I stand by the fact that this seems like hacking an undocumented feature: "Copy the key=... part [...] and put it into this URL: [...]", which means it could easily be modified/removed with no notice period, and is therefore risky in a production system, no?

Re: Use a Google Spreadsheet as your JSON backend

#24
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]

It was something that I built a while back, mostly over a weekend, but haven't really touched since. It's running on a free Heroku dyno and coming close to the 512M limit (grails is quite the memory hog), so I've been rewriting it using DropWizard so that it can take better advantage of the dyno.

It does seem pretty broken with the latest Chrome (seems like menu items now require a double click?), so I'll take a look and try to get it fixed soonish.

Re: Use a Google Spreadsheet as your JSON backend

#25

..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/

I've been hunting for a dev to connect Google spreadsheets with our company's CRM.

If someone is interested in a project, email is in my profile. I've gotten very lucky meeting smart people through HN before, so why not try again!

Re: Use a Google Spreadsheet as your JSON backend

#26
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…

Yes and no. I built an app for a client on top of Google Fusion tables, which is nearly the same thing. It was acknowledged that the API could change (indeed it did mid-way through). Nothing is constant, but some things are more constant than others. You have to work out what's suitable on a case-by-case basis I think.

Re: Use a Google Spreadsheet as your JSON backend

#27
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…

Yes and no. I built an app for a client on top of Google Fusion tables, which is nearly the same thing. It was acknowledged that the API could change (indeed it did mid-way through). Nothing is constant, but some things are more constant than others. You have to work out what's suitable on a case-by-case basis I think.

Agree. But I'd personally place 'using an undocumented feature that requires constructing a URL based on a parameter from a different URL' towards the 'unsuitable' end of the spectrum! Somewhere around the 'be careful' mark. Unless I'm missing some documentation

Re: Use a Google Spreadsheet as your JSON backend

#28
post #2

Tabletop is a great JS library for dealing with this: https://github.com/jsoma/tabletop

Yep! We're using it for our press page[1], it allows us to let our business/marketing people update our press mentions in Google Spreadsheet. We wrote about it here: http://www.cbinsights.com/team-blog/google-spreadsheet-one-p...

[1] http://www.cbinsights.com/press

Re: Use a Google Spreadsheet as your JSON backend

#29
post #23

Earlier quoted context omitted.

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'…

Maybe the comparison wasn't the wisest, valid point. But I stand by the fact that this seems like hacking an undocumented feature: "Copy the key=... part [...] and put it into this URL: [...]", which means it could easily be modified/removed with no notice period, and is therefore risky in a production system, no?

> But I stand by the fact that this seems like hacking an undocumented feature: "Copy the key=... part [...] and put it into this URL: [...]",

No, the key value for use in the API being the same that is displayed in the browser URL when working with the sheet is a documented feature:

https://developers.google.com/google-apps/spreadsheets/#retr...

Re: Use a Google Spreadsheet as your JSON backend

#30
post #23

Earlier quoted context omitted.

Maybe the comparison wasn't the wisest, valid point. But I stand by the fact that this seems like hacking an undocumented feature: "Copy the key=... part [...] and put it into this URL: [...]", which means it could easily be modified/removed with no notice period, and is therefore risky in a production system, no?

> But I stand by the fact that this seems like hacking an undocumented feature: "Copy the key=... part [...] and put it into this URL: [...]", No, the key value for use in the API being the same that is displayed in the browser URL when working with the sheet is a documented feature: https://developers.google.com/google-apps/spreadsheets/#retr...

I didn't dispute that. The key itself is fine. I'm just worried about using it for JSON retrieval! That part is undocumented as far as I can see, and therefore subject to change without notice
Post reply on HN