isamuel 12 years ago

This is a great demonstration of a feature I didn't know existed—using Dropbox to save application-level data. I'm sure I'm just behind the curve, but there are probably a lot of us back here. Nice move, DB.

  • izzydata 12 years ago

    I'm not particularly informed on this, but what makes this different then just hosting a text file and reading the text file? I wouldn't imagine anything needs to be specialized for this.

    • rkuykendall-com 12 years ago

      Because when you do it this way, you don't have to host the text file. This doesn't seem like a big deal when we're talking about 2048 saves, but a imagine a book reader or image editor.

      I actually tried to do something like this for a Comic Book reader, but the Dropbox API didn't allow for file requests to be made through JS: http://rkuykendall.com/articles/web-slinger-comic-reader/

      • smarx 12 years ago

        You should actually be able to use the full Dropbox API from JavaScript. See https://github.com/dropbox/dropbox-js and https://www.dropbox.com/developers/datastore/docs/js.

        • rkuykendall-com 12 years ago

          Ah, so it works for the full API but not the chooser? or have they fixed the content servers? This is what Dropbox Support originally told me when I contacted them about the problem:

          > Thanks for writing in. It looks like the issue here is that our content servers (dl.dropbox.com) don't currently allow arbitrary cross domain access in JavaScript. (This doesn't apply to accessing the file directly in your browser, or downloading to your server locally, which is generally what one would do with the link returned by Chooser.) […] This is something that would need to be enabled on our side, so I'll be sure to pass this on as feedback.

          • smarx 12 years ago

            I think I'm missing some context, but this probably isn't the right place to figure it out. Ping me on email (smarx@dropbox.com) if you want, though!

    • smarx 12 years ago

      One of the big advantages (not really used in this sample) is conflict resolution. With a text file, if you make changes on two different devices while one (or both) is offline, you'd end up with a conflict and two versions of the text file.

      With datastores, the changes are automatically merged according to developer-specified conflict resolution rules.

  • pacofvf 12 years ago

    I was wondering why this wasn't working, I have DB blocked at my office. Actually I don't have blocked their datacenter's IPs, I've only have blocked dropbox.com domain, if the JS library was in another domain it would work for me..

  • diafygi 12 years ago

    There's a few projects around the idea of not requiring a dynamic backend for webapps. The general term is "unhosted" (unhosted.org), and it mostly started as a reaction to the we-have-your-data-and-can-use-it-however-we-want websites. RemoteStorage.io is probably the most mature unhosted library, and there's a few other services listed on unhosted.org that are being actively working on.

    I got attracted to this idea because it offers several security advantages. I've been working on a minimalistic javascript library (byoFS.com) that allows you to connect a Dropbox/Google Drive/etc. account and write automatically encrypted data to it. I tied for 2nd place at a recent privacy hackathon for making an encrypted chat application using only Dropbox accounts:

    http://www.youtube.com/watch?v=WTPimUSIWbI

frade33 12 years ago

keeping them coming, as I just started collecting all of these 2048 things here. http://2048.nerdspace.co/ it would be completed in a day or two, few are already listed.

jackhammons 12 years ago

Nice job, I actually prefer this colour scheme to the original.

Xlythe 12 years ago

Logging in to Dropbox kicked me out of my game, losing my progress. Is it possible to open the confirmation in a separate window or tab?

quasque 12 years ago

That's interesting, does anyone know from where in the Dropbox user interface such datastores and their contents can be accessed?

andrewchoi 12 years ago

Somehow the blue is more soothing than the yellow/red that the original had.

nathell 12 years ago

And so we have 2048 with a corporate touch to it. What next? Microsoft(R) 2048(TM)? Apple i2048?