Filed under Technology by scotty | 0 comments
Note to self: When running a web service that people depend on as part of their daily lives, being down for 8 hours at a stretch is not acceptable. Even if it’s free. And if you do have a catastrophe, let your customers know as much information as possible, as quickly as possible.
Currently being displayed on del.icio.us:
del.icio.us is down for emergency maintenance. we’ll be back as soon possible.
Filed under Technology by scotty | 0 comments
I’m finally finished packaging up JSDBI for public consumption. It’s not too fancy yet, but the basic functionality is there. Download the code here
JSDBI provides an easy to setup CRUD interface for REST web services. With a few lines of javascript, you can build a class which provides full fledged accessor code, very similar to Class::DBI. Only this is on the browser, in javascript.
Here’s how it looks from an end user perspective:
// Basic class setup
Music.Artist = Class.create();
Music.Artist.extend(JSDBI);
Music.Artist.prototype = (new JSDBI()).extend( {
initialize: function () {
},
});
Music.Artist.fields(['artistid', 'name']);
Music.Artist.url('http://someserver/rest/artist');
Music.Artist.elementTag('artist'); //optional
// In the calling code
var artist = Music.Artist.insert({name: 'Billy'});
var artistid = artist.id();
artist = Music.Artist.retrieve(artistid);
document.write("name: "+artist.name());
artist.name('Fred');
artist.update();
artist.destroy();
Feel free to download it, beat it up, tell me what’s missing, whatever.