Code Monkey home page Code Monkey logo

backbone-firebase's People

Contributors

alexbain avatar emmaly avatar katowulf avatar thruflo 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

Watchers

 avatar  avatar  avatar

backbone-firebase's Issues

documentation suggestion

Hi alex, thanks for the really useful library.

Something that through me when I was getting up and running with it, was how there is no need to call fetch when instantiating a collection.

After this runs

notes = new Notes() 
board = new Board(model: notes).render().$el.appendTo('body')

the appropriate events on the collection start firing

initialize: ->
  @model.bind 'add', @addModel, @

So I guess this isn't an issue as such but maybe something to add to the docs

CRUD methods in Backbone.sync() act on parent instead of child

Model URL is a bit awkward. The model must declare a URL, but what should that be?

If I put something like this:

Backbone.Model.extend({  url: 'users/'  });

Then Backbone.sync( 'create' ... ) will work fine. But a read/update/delete will modify the parent tree (oops).

I can add a function, but the function will have to know what operation is taking place on it. Because for create it needs to return the url path of the parent (e.g. users/), but for update, read and delete ops, it needs to return something like users/my_unique_id

I'll add a commit to my PR to make Backbone.sync take care of suffixing the record ID as needed, so that all the model needs to understand is what it's table name (parent path) is.

Declares this.reference twice

this.reference is declared on line 22 (with default URL) and then again on line 33, creating two Firebase instances (double overhead).

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.