5 ms·
ForerunnerDB – Lightweight JavaScript Database with Persistence and Data-Binding
- phpnode 12y ago> LOVED BY 41169 DEVELOPERS Where does this statistic come from? I only see 196 stars on github at https://github.com/Irrelon/ForerunnerDB https://github.com/Irrelon/ForerunnerDB
- alex95 12y ago$('#lovedby') .prop('number', 0) .animateNumber( { number: 41169 }, 3500 ); }, { offset: 800, triggerOnce: true }); }); I rest my case.
- MasterScrat 12y agoMaybe it's the number of download?
- s_kilk 12y agoAlmost certainly just page visits. Or it's just made up.
- boldrikboldrik 12y agoSeems made up. It's 1 to 1 same number as here: http://bitcommand.com/ http://bitcommand.com/ which uses same template.
- cubano 12y agoMarketers.
- coolbloke1324 12y agoOoops, sorry about that, rookie mistake pulling a template and using it without going through all the sections properly. I've pulled it from the page... apologies!
- davman 12y agoView source on this page has some lovely commented out insights... "Plaid fingerstache craft beer" is probably my favourite.
- qball12 12y agoIt's just a template they used. Take a look at this site: http://bitcommand.com/ http://bitcommand.com/
- bronzehedwick 12y agoWould you look at that, lol.
- tosh 12y agoI'm always tripped up by 'persistent'. Initially I'm super happy, then I realize it is yet another place-oriented thing :(
- seanmcdirmid 12y agoIt doesn't help that persistent collections are now popular...but aren't persistent at all.
- kenny_r 12y agoIs this similar to Meteor.js' minimongo[1]? [1] https://www.meteor.com/mini-databases https://www.meteor.com/mini-databases
- igvadaimon 12y agoSo it's like PouchDB, but doesn't sync?
- notduncansmith 12y agoPouchDB also has quite a few useful plugins (full-text search, geospatial queries, peer-to-peer WebRTC replication, etc), runs on the server, and is LevelUP compatible.
- coolbloke1324 12y agoPrimarily I've been focussed on getting the browser side solid and reliable in production, sync is definitely on the way though. Don't forget that PouchDB is designed to work with CouchDB and not MongoDB so Mongo lovers are somewhat in the cold right now with client-side counterparts.
- willholley 12y agoFor MongoDB lovers, PouchDB supports MongoDB-style querying via https://github.com/nolanlawson/pouchdb-find https://github.com/nolanlawson/pouchdb-find. MongoDB doesn't have the fundamental sync primitives that CouchDB has so I wouldn't expect a similar solution which supports MongoDB on the server.
- cwmma 12y agoWhile it's usable in node, the only persistence strategies seem to be based on local forage which doesn't seem to support node. So can't save data in node.
- coolbloke1324 12y agoWe've built it to be compatible with Node but have focussed on browser usage for this version. Our plans (see roadmap in readme) include all the node goodness you'd expect :)
- caryfitz 12y agoin one sense it's cool. So congrats on that. I wonder though - if it's not as good at updating the DOM as other libraries - what is it's real "place" in the ecosystem? Is it doing more than wrapping over IndexedDB / LocalStorage? I'd say, a nice wrapper for IndexedDB is a welcome thing (looks like minimongo already does that). And there's a lot of space to grow in that (providing change events, etc). Maybe I just don't get the value prop? Maybe the value prop only really shows up when you integrate the data binding? So it's sort of like reactive programming but based on a structured data store, instead of raw JS objects?
- coolbloke1324 12y ago> if it's not as good at updating the DOM as other libraries ForerunnerDB is actually very efficient at updating the DOM, only making changes to the parts of the DOM that link to altered sections of an object / document. > Is it doing more than wrapping over IndexedDB / LocalStorage? Yes much more... it includes views, triggers / change events, transforms, collection joins and the obvious big one - data binding. > Maybe the value prop only really shows up when you integrate the data binding? So it's sort of like reactive programming but based on a structured data store, instead of raw JS objects? This is correct and because we've been using it in production for some time we would definitely say it makes web app development a lot simpler!
- deleted 12y ago[deleted]
- bonn1 12y agoWhat does is offer significantly more than the browser built-in IndexedDB?
- coolbloke1324 12y agoIt includes views, triggers / change events, transforms, collection joins and data binding. Also this allows you to spend more time on interacting with data than worrying about what browser supports what storage. It is also useful even for apps that have no use for storage because looping over JS objects for specific matches in a number of areas of an app will get dirty pretty quickly.
- bonn1 12y agoI thought all browsers support IndexedDB? However, I think it would be helpful to communicate this as a wrapper around IndexedDB instead of positioning it as another new DB.
- coolbloke1324 12y agoIt's really not a wrapper around indexeddb at all. It doesn't even communicate with indexeddb except to save and load data for storage and that is optional. The main use here is for allowing web app developers to be able to load a dataset from a server and then query it dynamically on the client-side, as well as display that data automatically via data-binding.
- bonn1 12y agoBut at the end you have to store it somehow and thus you employ the underlying browser DBs for that (like IndexedDB or WebSQL) => wrapper
- coolbloke1324 12y agoBut that is the point... you don't have to store it in an underlying browser db. It runs as an in-memory store if you don't use an underlying engine. The persistence module is an optional extra and doesn't even need to be included in the library.
- castell 12y ago* WebSQL: http://en.wikipedia.org/wiki/WebSQL http://en.wikipedia.org/wiki/WebSQL (works almost everywhere) * For NoSQL, ForerunnerDB sounds interesting. As IndexedDB has a flawed API and slow (using SQLite!) and buggy implementations - without a shim useless.
- streptomycin 12y ago"Almost everywhere" doesn't include IE and Firefox?
- streptomycin 12y agoAny transaction support? That's one of the big features of IndexedDB, but I don't see anything about it here. Are you doing each command in its own transaction? That's going to be pretty slow for large amounts of data, and you lose the ability to group multiple queries into a single atomic operation.
- dahjelle 12y agoWhile I've not dug into ForerunnerDB, it sounds like it is playing in the same space as PouchDB[1]. PouchDB is a JS database that works in the browser or in Node with various back-ends for data storage, syncs with CouchDB (or compatible, such as PouchDB Server) on the back-end, and currently uses map-reduce queries, though there is work in-progress to implement a MongoDB-like query language[2]. (This will match the Mango query language soon to be seen in CouchDB [3].) Plus I've been really impressed with the development team—responsive to issues, consistent releases, high code-quality. It's a great project! [1] http://pouchdb.com/ http://pouchdb.com/ [2] https://github.com/nolanlawson/pouchdb-find https://github.com/nolanlawson/pouchdb-find [3] https://github.com/cloudant/mango https://github.com/cloudant/mango
- dscrtnfnty 12y agoIt also seems similar to http://lokijs.org/ http://lokijs.org/
- coolbloke1324 12y agoIt is similar to pouch yes, but is more mongo query friendly right now. Also ForerunnerDB includes data-binding which is a pretty useful thing for web app devs.
- nolanl 12y agoUnder the hood, it seems [1] to be based on the excellent LocalForage project from Mozilla [2]. It would be nice to acknowledge that on the website somewhere. [1]: https://github.com/Irrelon/ForerunnerDB/blob/master/package.json#L26 https://github.com/Irrelon/ForerunnerDB/blob/master/package.... [2]: https://github.com/mozilla/localForage https://github.com/mozilla/localForage
- coolbloke1324 12y agoNot sure I get that... localforage is a minor part of ForerunnerDB, it's certainly not "based" on it! In fact you can use ForerunnerDB entirely without localforage. Imagine if we had to acknowledge every different module we pulled in on NPM for every project we wrote... do you do that?
- nolanl 12y agoLocalForage has great cross-browser support (automatically switches between IndexedDB/WebSQL/LocalStorage), not to mention workarounds for browser bugs and the ability to store more data than what LocalStorage allows (~5-10MB). It seems like a fairly non-trivial component. I just think it's nice to give a little credit where credit is due. :) I do see that you mention LocalForage in the changelog, but a shout-out on the site would be cool as well. For my own part, PouchDB is pretty heavily based on LevelUP (in Node.js anyway), so we're sure to document it on the website: http://pouchdb.com/adapters.html#pouchdb_in_node_js http://pouchdb.com/adapters.html#pouchdb_in_node_js
- collyw 12y agoSo usually the point in a database is a central location to keep data, so you don't pass various excels around. Or you might want the rich querying ability of SQL to produce detailed reports. What is the point in a browser based NoSQL database? Browser persistence?
- coolbloke1324 12y ago> Or you might want the rich querying ability of SQL to produce detailed reports. That is one of the best reasons for a browser based database. Imagine that your web application needs to show a list of users and then allow that list to be filtered with search or by user type or age or whatever. Instead of having to write complex logic to loop your array of user objects that you got back from your server, or ask the server directly, you can instead apply a query to the list you already have on screen and it instantly updates to reflect the query you specified... This allows you to use an MVC pattern when creating your web applications instead of littering your code with complex locked-in logic that will suffer instant code rot and be generally a pain to maintain after a month or two of development.
- collyw 12y agoIts is a NoSQL style database from what I see, so you won't get especially complex queries from it without a fair bit of app level complexity.
- coolbloke1324 12y agoShould probably check the query syntax and capabilities before making a judgement?
- collyw 12y agoIt said it was based on Mongo DB.
- paulrd 12y agoI think a lot of projects use sqlite for client side persistence. I know mega (https://mega.co.nz/ https://mega.co.nz/) did.
- coolbloke1324 12y agoDoes sqlite run in a browser via JavaScript? I didn't think they had a JavaScript version...
- frik 12y agoWebSQL: http://en.wikipedia.org/wiki/Web_SQL_Database http://en.wikipedia.org/wiki/Web_SQL_Database ; IndexedDB in Firefox is based on SQLite.