Comments (8)
You mean running it in node.js, outside of the browser? Don't you have proper file access in node.js? Databases?
from localforage.
Yes, run it on Node.js. I know there are alternatives like file access and databases, but I'm interested that my library has the same ecosystem both on client and server side, that's why I'm looking for tools that work in both environments. LevelUP seems to be an alternative, but at the same time seems to be a little big for my needs, just a localStorage-like storage. Also, localForage seems more future-proof to me, since it would be possible to add its behaviour to the localStorage specification (I still doesn't understand by it doesn't support to store full objects...).
from localforage.
localForage is really a browser-aimed tool. It's about offline storage. I really don't node.js support fitting in, nor do I think its API is necessarily a great fit for actual file storage only. Are there not node.js APIs with lots of backend drivers already?
The problem here is we need to choose a backend, or backend drivers, like redis, MongoDB, etc. It's a big can of worms for a problem that doesn't really exist: you can use the same storage library on any node app with a redis server available. The problem localForage solves is that browsers don't all speak the same storage language, but now they can.
from localforage.
But Node.js and browsers still doesn't talk the same storage language, so I
still believe there's a problem here.
Send from my Samsung Galaxy Note II
El 14/02/2014 16:47, "Matthew Riley MacPherson" [email protected]
escribió:
Reply to this email directly or view it on GitHubhttps://github.com//issues/57
.
from localforage.
as i know, webSQL and localStorage are availbale on nodejs but not really a good choose. even loading localforage will fail due the use of the undefined "window" object on localforage code and promise.js code
the problem with localforage is not so extensible. so adding more driver for platforms like chrome.storage #43 or nodejs or even browser-releated futures like session storage #2 will need to be directly integrated to localforage code base or to fork it
from localforage.
For the time being, I want this library to focus on the browser. When I feel like we have that problem solved with few issues and edge-cases I might look at node, but until then I don't see it as a priority at all.
Node.js and web browsers both use JavaScript, but that's where the similarities end. This is about client-side, offline storage. Not about storage in general.
from localforage.
Well, you can actually run quite a bit of typical client-side libraries on Node these days. I think there are a number of types of projects that would benefit from a unified data layer and could then run with the same code on both the server and in browsers.
Its good that you are prioritizing the browser though, and I think that with so many different browsers to support and different engines, it is right to stay focused on that as the primary developer. However, I think it may be worthwhile for certain projects that have the rest of their code base set up to run both on the client and in Node, if they went ahead and forked the project and tried to see how difficult it is to build a Node back-end. Then maybe down the line somewhere, if that becomes popular and actually proves useful to a number of projects, without requiring significant changes to the core, it could be pulled in.
from localforage.
Yeah, obviously if someone wants to do all that exploration and heavy-lifting for us, then propose changes that don't affect the performance/size/etc. of the client-side library I would entertain it. But in terms of project scope: I'm ignoring node (which HAS good storage solutions) to focus on the browser (lacking in said solutions).
from localforage.
Related Issues (20)
- Doesn't work in electron environment when offline HOT 1
- How to add items without a key in localForage api?
- Make a new release with latest code HOT 3
- npm module
- A more efficient way of encoding binary data as strings in localStorage
- Why not use the textencoder api in the source code HOT 1
- LocalForage prevents sites from going to sleep
- Add a warning or an error message when setItem crash ? HOT 1
- Add src and more files to npmignore
- Error: Uncaught (in promise): VersionError: The operation failed because the stored database is a higher version than the version requested. HOT 2
- Local forage completely breaks my application
- vulnerability in localForage HOT 2
- Store and retrieve javascript objects?
- Is this repository still alive? HOT 1
- TypeError: Cannot read properties of null (reading 'db') HOT 1
- When is version and indexing supported?
- Can it support setting a validity period for the cache? HOT 1
- redes sociales
- Is this still supported? It has been 3 years? HOT 9
- chrome 121, can't getItem HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from localforage.