Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #14560 > unrolled thread
| Started by | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| First post | 2012-06-19 22:57 +1000 |
| Last post | 2012-06-19 13:36 -0700 |
| Articles | 8 — 5 participants |
Back to article view | Back to comp.lang.javascript
storage library Andrew Poulos <ap_prog@hotmail.com> - 2012-06-19 22:57 +1000
Re: storage library Scott Sauyet <scott.sauyet@gmail.com> - 2012-06-19 06:11 -0700
Re: storage library Andrew Poulos <ap_prog@hotmail.com> - 2012-06-20 11:55 +1000
Re: storage library Scott Sauyet <scott.sauyet@gmail.com> - 2012-06-20 06:51 -0700
Re: storage library Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-06-19 19:21 +0200
Re: storage library Scott Sauyet <scott.sauyet@gmail.com> - 2012-06-20 07:21 -0700
Re: storage library Arno Welzel <usenet@arnowelzel.de> - 2012-06-19 19:43 +0200
Re: storage library "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-06-19 13:36 -0700
| From | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| Date | 2012-06-19 22:57 +1000 |
| Subject | storage library |
| Message-ID | <g5ednUlFD8PK6n3SnZ2dnUVZ_rWdnZ2d@westnet.com.au> |
Could someone please point me to a data storage library that's at least halfway decent and doesn't need jquery, YUI... Andrew Poulos
[toc] | [next] | [standalone]
| From | Scott Sauyet <scott.sauyet@gmail.com> |
|---|---|
| Date | 2012-06-19 06:11 -0700 |
| Message-ID | <5ae19a57-5c8c-465c-aa47-67644ec34342@r3g2000yqh.googlegroups.com> |
| In reply to | #14560 |
Andrew Poulos wrote: > Could someone please point me to a data storage library that's at least > halfway decent and doesn't need jquery, YUI... Could you explain in a little more detail what you're looking for from it, and what the barriers are to writing your own? -- Scott
[toc] | [prev] | [next] | [standalone]
| From | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| Date | 2012-06-20 11:55 +1000 |
| Message-ID | <rbydnZuCBLsfsHzSnZ2dnUVZ_qSdnZ2d@westnet.com.au> |
| In reply to | #14561 |
On 19/06/2012 11:11 PM, Scott Sauyet wrote: > Andrew Poulos wrote: >> Could someone please point me to a data storage library that's at least >> halfway decent and doesn't need jquery, YUI... > > Could you explain in a little more detail what you're looking for from > it, and what the barriers are to writing your own? I've got an elearning course which "holds" a growing bunch of data as users move through it. Data, such as questions attempted, number of attempts, duration in question, user's response... Some data are objects, some strings, some numbers... It all works fine until a user decides to refresh the page and all the data is lost. I was going to use cookies to be cross/all browser but I wanted a simpler more robust way of saving/accessing the data. I have time pressures so I don't want to work my way through any issues with localStorage, globalStorage, or userData. If someone else has suffered through it to create a library to share, then I'm happy to use it. Andrew Poulos
[toc] | [prev] | [next] | [standalone]
| From | Scott Sauyet <scott.sauyet@gmail.com> |
|---|---|
| Date | 2012-06-20 06:51 -0700 |
| Message-ID | <9e154fcd-322c-4923-b1ca-e3afac396a2c@f7g2000yqh.googlegroups.com> |
| In reply to | #14582 |
Andrew Poulos wrote: > Scott Sauyet wrote: >> Andrew Poulos wrote: >>> Could someone please point me to a data storage library that's at least >>> halfway decent and doesn't need jquery, YUI... > >> Could you explain in a little more detail what you're looking for from >> it, and what the barriers are to writing your own? > > I've got an elearning course which "holds" a growing bunch of data as > users move through it. Data, such as questions attempted, number of > attempts, duration in question, user's response... Some data are > objects, some strings, some numbers... > > It all works fine until a user decides to refresh the page and all the > data is lost. localStorage definitely sounds like the way to go. Presumably you want a fall-back to globalStorage and to userData. These are not hard to write, but look at the some of the implementations presented in Arno's (somewhat snarky) response or the one Michael sent. You should be able to see that some of them are quite small. It just doesn't take that much to write these small wrappers around a few different existing APIs and provide a common interface. > I was going to use cookies to be cross/all browser but I wanted a > simpler more robust way of saving/accessing the data. > > I have time pressures so I don't want to work my way through any issues > with localStorage, globalStorage, or userData. If someone else has > suffered through it to create a library to share, then I'm happy to use it. I can't speak to the quality of any of the public tools. I've rewritten this twice for different jobs because it was easy enough that I hadn't bothered storing any version of it in my personal library of tricky things to remember. But each of those jobs was for Intranet applications where the universe of browsers under test was relatively small. For my own sanity, I ensured it worked in a somewhat larger universe, but I did not try to capture everything. If you have a larger audience, then look carefully at these libraries and see what they claim for browser support, and note especially how much data you can store in each browser. If you're going to store more than 128K, then some implementation have issues in some browsers, I believe. Then make sure you test this yourself in any browser you think might have a realistic chance of being used. Take their claims with a very large grain of salt. But the source code should show you the general techniques you might want to use if you roll your own. You might find it easier in the end to have your own, as it simply is not that difficult. Good luck, -- Scott
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2012-06-19 19:21 +0200 |
| Message-ID | <2135226.mvXUDI8C0e@PointedEars.de> |
| In reply to | #14560 |
Andrew Poulos wrote:
> Could someone please point me to a data storage library that's at least
> halfway decent and doesn't need jquery, YUI...
Probably yes.
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
[toc] | [prev] | [next] | [standalone]
| From | Scott Sauyet <scott.sauyet@gmail.com> |
|---|---|
| Date | 2012-06-20 07:21 -0700 |
| Message-ID | <c0efe939-b18d-4510-9441-fc660f1fe497@h9g2000yqi.googlegroups.com> |
| In reply to | #14569 |
Thomas 'PointedEars' Lahn wrote:
> Andrew Poulos wrote:
>> Could someone please point me to a data storage library that's at least
^^^^^^
>> halfway decent and doesn't need jquery, YUI...
>
> Probably yes.
I've never responded before to the pointers to ESR's Smart Questions
FAQ, or to people who respond to "Can someone explain..." with "Yes",
as I think those responses are a part of the initiation that USENET
users need to go through.
But this one seems inappropriate. Thomas, I believe you're not a
native speaker of English, but you've made it clear here that your
grasp of the language, even its subtleties, is quite strong.
However, I'm wondering if you misunderstood here. By including
"please" as Andrew did, he changed the meaning in such a way that
"Yes" is not really an appropriate answer. "Could you please..." is a
somewhat more polite synonym for "Would you..."
</grammatical-lesson>
-- Scott
[toc] | [prev] | [next] | [standalone]
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Date | 2012-06-19 19:43 +0200 |
| Message-ID | <4FE0BA32.6020103@arnowelzel.de> |
| In reply to | #14560 |
Andrew Poulos, 19.06.2012 14:57: > Could someone please point me to a data storage library that's at least > halfway decent and doesn't need jquery, YUI... <http://lmgtfy.com/?q=javascript+data+storage+library> -- Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de
[toc] | [prev] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2012-06-19 13:36 -0700 |
| Message-ID | <cc8773ad-afd8-423d-ab1f-1e875bb34c08@googlegroups.com> |
| In reply to | #14560 |
On Tuesday, June 19, 2012 7:57:44 AM UTC-5, Andrew Poulos wrote: > Could someone please point me to a data storage library that's at least > halfway decent and doesn't need jquery, YUI... Perhaps this: <https://github.com/wojodesign/local-storage-js>
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web