Friday 16 November 2012

Mumbling about Dropbox


It is fair to say I am having a phase of web development at the moment. It is also fair to say that by web development I tend to focus on the client side of things. Basically I try to create useful apps that could totally exist as a desktop app.

I don't do much server side. It used to be because I did not have a server to do this sort of stuff on but now with the advent of free tiers at many hosting places that is no longer the excuse. Just most of my ideas don't require much in the way of server support.

It would also be fair to say what I want from a server is a place to store stuff the user has been working. Yep I want a file system, well a file system for each user.

Enter DropBox. Recently they have produced a JavaScript library for interacting with drop box. From the client side of the browser you can read and write files and do other file system like operations and it is really easy to set up/use. Although I have been struggling in my attempts to write an image to it. Well converting an image element to a png binary so I can save seem to be the real problem and this has nothing to do with drop box.

dropbox.js works well and is something I will probably integrate into my little sprite editor in the near future.

From the point of view of my sprite editor it should help to solve the problem of providing a nice way to export your art work. At the moment you can download you sprite sheet by right clicking it but that is not exactly satisfactory  I can base64 encode it and change the header of that and then provide it as link but I seem unable to set the file name of the file downloaded. Again that is not a great experience.

As dropbox.js will plonk you files straight into your dropbox which is then synced to your desktop, getting you sprite sheets will be as simple as cut and pasting or writing a simple script.

Not to sound too much of a dropbox fan but given you can host static sites on your account (with some limitations) and use their client side api to store files in the cloud using users accounts they provide a fairly good base on which to build a certain class of web apps.

When I look at my ideas list for web apps all I see is a list that matches this style of web programming.

At the moment I am not going to push the dropbox integration as the JavaScript support is quite new and I am happy to give it a bit of time to settle in and get bug fixed.

My little sprite editor is nowhere near the point of being useful anyway so I would prefer to work on the important things first. Having said that I do want to start actually pushing out versions, probably hosted on dropbox, so anyone who want to see what I am talking about can do so. It might also push me to make it look nice.

Before doing this I want to give the ability to download the produced tile set and reload one. Warning it is going to be pretty basic to start off with.

None of this will be happening this weekend as I am running a marathon. It also means I probably going to be a little wiped out for the early part of next week. Slightly worried I have not trained enough for it. Although I am about ten times fitter than 6 months ago.

Of course I am sure google drive offer similar abilities and perhaps one day I will look at that. It is not quite as useful to me as dropbox because last time I looked they did not have a linux client. I predominantly use linux at home.

No comments:

Post a Comment