Giter Club home page Giter Club logo

mongofb's Introduction

Dobi will be available for use in the near future. If you'd like to play around before then, contact us at [email protected].

Dobi.io

Dobi is an ultra-simple environment for building scalable, real-time web applications.

With Dobi you write apps...

  • in Coffee-Script (or javascript, but please don't)
  • with client-side rendering (only send data over the wire)
  • with real-time functionality by simply referencing variables
  • build schemas with simple json objects (no more complicated ORMs)
  • that scale to 100k+ users without hosting your own servers
  • on Linux, Mac, or Windows
  • in any editing environment you prefer

Documentation is available at http://www.dobi.io

Quick Start

Prerequisites:

Install Dobi:

npm install -g dobi

Setup a dobi workspace

cd ~ ; mkdir workspace ; cd workspace
dobi init

Login:

dobi login

Create a new app:

dobi create [email protected]

Create a website using your app:

dobi install [email protected] site-slug

Deploy it to the world:

dobi deploy my-app

View your site, running your new app:

dobi open site-slug

Examples

mongofb's People

Contributors

scien avatar sjanderson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mongofb's Issues

update firebase

current version is out of date with docs and would like to take advantage of some newer features

add ref.remove()

#14

cookie.get('type').remove()

which is a shortcut for

cookie.get('type').set(null)

Upsert logic

Would be great to have upsert logic. I'll fork this project and make a PR for the author's approval.

project status

Hi, I have a question, this project is still functional?

Please reconsider continuing the project development.

Thanks you.

-Carlos

$.or does not get caught properly

" if use_objectid, it needs to turn the string you're passing in into an ObjectId
[Aug-20 6:22 PM] Bryant Williams: with $in it's easy, because the key is still _id
[Aug-20 6:23 PM] Bryant Williams: with $or, you'd have to dig a little further

[Aug-20 6:23 PM] Bryant Williams: if criteria.$or, check each object for _id
can you file a bug?"

Use an object clone instead of data object from emit

Firebase returns a snapshot in their event functions, I find it more convenient to return the data object since you already have the DocumentRef you're listening on. Right now the @DaTa object is emitted, which means you are editing the DocumentRef data, without access to the DocumentRef object itself.

It would make more sense to either return a cloned object so people don't accidentally update it and try to re-save to the database or return the DocumentRef itself as Firebase does.

Going to make this change, but open to discussion if anyone has some use cases where the current model makes more sense.

consider removing all data from DocumentRefs

problem state i just discovered...

  • data is updated
  • ref catches update and changes its @data
  • ref emits event
  • event handler used ref.get('property').val() // ISSUE: property was out of date
  • ref updates @document.data

ref.get passes the document and the path, it ignores local data, so the document data had to be updated before emitting events. I can't think of any benefit to duplicating the data in the DocumentRef at all now. I think the val() call should just always ask the document what the value at its path is.

only tricky thing i can think of is if you have a ref listener it would have to tell the document to update that part of its data. going to sit on this for a little bit and think it over.

Remove only allows ID right now change to removeById

[12:22 PM] Jason Gornall: db.objects.remove({site_id:'533efe9a4be147a107014871'})โ€จ Error: Firebase.child failed: First argument was an invalid path: "objects/[object Object]". Paths must be non-empty strings and can't contain ".", "#", "$", "[", or "]"
having some difficulty with a db call
any ideas?
[12:23 PM] Bryant Williams: i think remove only allows an _id right now
[12:23 PM] Jason Gornall: ahhh that must be it
[12:23 PM] Bryant Williams: db.objects.remove(_id)
[12:23 PM] Jason Gornall: k
[12:23 PM] Bryant Williams: should probably change that to removeById
and add support for a real remove
file issues on the mongofb github project
[12:24 PM] Jason Gornall: alrighty

validate input to remove

to make sure people don't accidentally do...

cookie = db.get('cookies').findOne({type: 'chocolate'})
cookie.remove('type')

when they meant to do

cookie.get('type').set(null)

better error messages

current error (err)

{
name: "MongoError"
}

better error would be - err.toString()

MongoError: bad skip value in query

or - err.message

bad skip value in query

more efficient ref.on and ref.off

current refs keep an array with each event

events:
  type: [handler1, handler2]

ref.off 'value' isn't called until events[type] is empty. when we could do ref.off 'value', handler1 and stop receiving those events immediately.

note this only affects refs with two listeners.

i think all of my code avoids this anyway by using multiple refs

document.get('property').on 'value', handler1
document.get('property').on 'value', handler2

which would then use separate refs and this would be a non-issue

updateData needs to watch out for 'created' field

and created should only be checked for if the ref is on the document level

lt3.site.get('users').get('facebook-7200529').set('admin')
undefined
Uncaught TypeError: Cannot read property 'created' of undefined mongofb.js:773
exports.DocumentRef.DocumentRef.updateData mongofb.js:773
(anonymous function) mongofb.js:765
success mongofb.js:18
j main.js:1
k.fireWith main.js:1
x main.js:1
b

npm install error

log

> [email protected] install /Users/pirsquare/git/mongofb/node_modules/mongodb/node_modules/kerberos
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/kerberos/lib/kerberos.o
npm WARN excluding symbolic link index.js -> lib/sass.js
npm WARN excluding symbolic link lib/index.js -> sass.js

> [email protected] install /Users/pirsquare/git/mongofb/node_modules/mongodb/node_modules/bson
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/bson/ext/bson.o
\
> [email protected] install /Users/pirsquare/git/mongofb/node_modules/asset-wrap/node_modules/chokidar/node_modules/fsevents
> node-gyp rebuild

  CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
../node_modules/nan/nan.h:339:13: error: no member named 'New' in 'v8::String'
    return  _NAN_ERROR(v8::Exception::Error, errmsg);
.
.
.
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1

I think we need to update dependencies version?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.