Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-03-2012, 07:10 PM   PM User | #16
RickP
New Coder

 
Join Date: Nov 2012
Posts: 26
Thanks: 1
Thanked 0 Times in 0 Posts
RickP is an unknown quantity at this point
Quote:
Loading more than 5mb on a phone could take a noticeable while, so it's not something you want to do every page load.
Data reads just need to be asynchronous and read at time of request. The standard can't worry about how people might mess up using the feature (not security but performance). A program on my desktop takes time to load and read data. A web app shouldn't be any different given it has the same functionality as the desktop app. The web world needs to stop worrying about performance so much and just work on functionality first. Don't limit functionality because a fear of performance. Of course work on performance but if I can't do it at all, then it's worthless.

The web world is used to "pages need to load fast". They only need to load fast when they are incredibly simple and "dumb" pages. When the world of actual useful/powerful web apps start coming, people will expect and be OK with load times of a web app.

When the web apps start being more like http://www.youtube.com/watch?v=HCwH9BGgtdQ it's OK to take a little time to load. Users will put up with it because it's so much more powerful than some semi-dynamic web page.

I think this is a mind shift. Powerful web apps need more access to hardware and the standard should be helping with this.

I'm excited to see your work in the storage space to help fill the gap though!
RickP is offline   Reply With Quote
Old 12-03-2012, 07:31 PM   PM User | #17
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,553
Thanks: 9
Thanked 480 Times in 463 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
Quote:
Originally Posted by RickP View Post
Data reads just need to be asynchronous and read at time of request.

The standard can't worry about how people might mess up using the feature (not security but performance).
well localStorage is sync, so it's not the droids you are looking for.

if a feature is frozen and devs start commonly abusing it, or it has some accumulation flaw, to the detriment of the UX, it's harmful on the balance, and we would have been better off with existent workarounds, which are ample but convoluted.
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:15.2% IE7:0.5% IE8:8.4% IE9:8.5% IE10:8.5%
rnd me is offline   Reply With Quote
Old 12-08-2012, 01:59 PM   PM User | #18
RickP
New Coder

 
Join Date: Nov 2012
Posts: 26
Thanks: 1
Thanked 0 Times in 0 Posts
RickP is an unknown quantity at this point
Quote:
well localStorage is sync, so it's not the droids you are looking for.
They can create a "new" local storage concept that is async. Leave the old one in place. Or better yet just extend the new one so it's still backwards compatible.
RickP is offline   Reply With Quote
Old 12-08-2012, 07:23 PM   PM User | #19
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,553
Thanks: 9
Thanked 480 Times in 463 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
Quote:
Originally Posted by RickP View Post
They can create a "new" local storage concept that is async. Leave the old one in place. Or better yet just extend the new one so it's still backwards compatible.
how can one provide backwards compat to code expecting a sync interface to one expecting a callback? you can catch the writes, but there would be no way to load.


i have not had time to make my fully unified script, i've been in the middle of a launch the past week. I was going to squeeze the heck out of the polyfill, add deflate(), a localStorage[]-fallback, and an ajax plugin to allow for unlimited storage using a server backend through the unified interface. those aren't that complicated or lofty of implementation ideals, but i've just not had time. maybe you can polish it up.



here is a unified indexedDB/webSQL package, which was/is to be the core of my tool. it should provide at lease 5 more megs. In FF, i think its 50mb, in chrome it actually varies, and in IE10 i think its 5 megs, but that's unconfirmed.

The websql polyfill provides an indexed DB api to a higher-leven abstractino script i'd found. I tried to code all the low-level stuff myself, but after 4 or 5 hours of banging my head against browser quirks, stale docs, and invisible errors, i gave up.


anyway, it's is tested in IE10, FF, Ch, and Op.

http://danml.com/js/localstorage2.js


the api is one function, overloaded by arguments according to task.

usages:

Code:
function dump(e){ console.info(e); }

//load
localStorage2( "lastName", dump );

//save
localStorage2( "lastName", "smith" ); // OR:
localStorage2( "lastName", "smith", dump );

//list
localStorage2( dump );

//delete
localStorage2( "DELETE", "lastName", dump );
i'll still work on it one day, but here's what i got to build on.
right now, it's not a bad way to store in webworker threads, since localStorage is blocked in those...
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:15.2% IE7:0.5% IE8:8.4% IE9:8.5% IE10:8.5%

Last edited by rnd me; 12-08-2012 at 07:26 PM..
rnd me is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:20 PM.


Advertisement
Log in to turn off these ads.