2 ms·
It is not hard at all. people just hadn't built as much of the tools for it. Which also confuses me because we now have package managers that run on package man
by SchizoDuckie 13y ago
It is not hard at all. people just hadn't built as much of the tools for it. Which also confuses me because we now have package managers that run on package managers.
My own little WebSQL Object/Relation mapping library uses promises to get away from callback hell, and it's a pure joy to work with.
It handles creating tables and inserting fixtures before the first connect promise is returned, so that you don't have to worry about the setup process and your data being available.
Creating and inserting entities is as easy as
> var P = new Presentation();
> P.set('name', 'test');
> P.Persist().then(function(result) { console.log('Done!') });
http://schizoduckie.github.io/CreateReadUpdateDelete.js/demo/ http://schizoduckie.github.io/CreateReadUpdateDelete.js/demo...
I'm using it extensively in my Chrome plugin, and it runs on 10.000+ clients right now.
Real world offline synchronisation example right here:
https://github.com/SchizoDuckie/DuckieTV/blob/angular/js/services/MigrationService.js#L52 https://github.com/SchizoDuckie/DuckieTV/blob/angular/js/ser...
- frik 13y agoNice work. This would be the way to go. Sadly one cannot use it everywhere as WebSQL is not implemented in Firefox nor IE :( The good thing is WebSQL works also great on mobile devices.