From f61e8bb47b3eac67acaf0f09fed9a4c9eb1a77ad Mon Sep 17 00:00:00 2001 From: startupandrew Date: Fri, 22 May 2015 12:12:43 -0700 Subject: [PATCH] updated readme --- README.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 0435b92..56c7ea1 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Coverage Status](https://img.shields.io/coveralls/firebase/backbonefire.svg?branch=master&style=flat)](https://coveralls.io/r/firebase/backbonefire?branch=master) [![Version](https://badge.fury.io/gh/firebase%2Fbackbonefire.svg?branch=master)](http://badge.fury.io/gh/firebase%2Fbackbonefire) -BackboneFire is the officially supported [Backbone](http://backbonejs.org) binding for Firebase. The bindings let you use special model and collection types that allow for synchronizing data with [Firebase](http://www.firebase.com/?utm_medium=web&utm_source=backbonefire). +BackboneFire is the officially supported [Backbone](http://backbonejs.org) binding for Firebasem data. The bindings let you use special model and collection types that allow for synchronizing data with [Firebase](http://www.firebase.com/?utm_medium=web&utm_source=backbonefire). ## Live Demo @@ -70,7 +70,7 @@ Once you've included BackboneFire and its dependencies into your project, you wi ## Getting Started with Firebase -BackboneFire requires Firebase in order to sync data. You can +BackboneFire requires the Firebase database in order to sync data. You can [sign up here](https://www.firebase.com/signup/?utm_medium=web&utm_source=backbonefire) for a free account. @@ -113,8 +113,8 @@ onetimeList.fetch(); ## Backbone.Firebase.Collection -This is a special collection object that will automatically synchronize its contents with Firebase. -You may extend this object, and must provide a Firebase URL or a Firebase reference as the +This is a special collection object that will automatically synchronize its contents with your Firebase database. +You may extend this object, and must provide a Firebase database URL or a Firebase database reference as the `url` property. Each model in the collection will have its own `firebase` property that is its reference in Firebase. @@ -142,7 +142,7 @@ var TodoList = Backbone.Firebase.Collection.extend({ ### url as a function -The `url` property can be set with a function. This function must return a Firebase ref or a url. +The `url` property can be set with a function. This function must return a Firebase database ref or a url. ```javascript var TodoList = Backbone.Firebase.Collection.extend({ @@ -155,7 +155,7 @@ var TodoList = Backbone.Firebase.Collection.extend({ ### initialize function -Any models added to the collection will be synchronized to the provided Firebase. Any other clients +Any models added to the collection will be synchronized to the provided Firebase database. Any other clients using the Backbone binding will also receive `add`, `remove` and `changed` events on the collection as appropriate. @@ -165,7 +165,7 @@ all your other clients immediately. ### add(model) -Adds a new model to the collection. If autoSync set to true, the newly added model will be synchronized to Firebase, triggering an +Adds a new model to the collection. If autoSync set to true, the newly added model will be synchronized to your Firebase database, triggering an `add` and `sync` event both locally and on all other clients. If autoSync is set to false, the `add` event will only be raised locally. ```javascript @@ -183,7 +183,7 @@ todoList.on('all', function(event) { ### remove(model) -Removes a model from the collection. If autoSync is set to true this model will also be removed from Firebase, triggering a `remove` event both locally and on all other clients. If autoSync is set to false, this model will only trigger a local `remove` event. +Removes a model from the collection. If autoSync is set to true this model will also be removed from your Firebase database, triggering a `remove` event both locally and on all other clients. If autoSync is set to false, this model will only trigger a local `remove` event. ```javascript todoList.remove(someModel); @@ -198,7 +198,7 @@ todoList.on('all', function(event) { ### create(value) Creates and adds a new model to the collection. The newly created model is returned, along with an -`id` property (uniquely generated by Firebase). +`id` property (uniquely generated by the Firebase client library). ```javascript var model = todoList.create({bar: "foo"}); @@ -212,8 +212,8 @@ todoList.on('all', function(event) { ## Backbone.Firebase.Model -This is a special model object that will automatically synchronize its contents with Firebase. You -may extend this object, and must provide a Firebase URL or a Firebase reference as the `url` +This is a special model object that will automatically synchronize its contents with your Firebase database. You +may extend this object, and must provide a Firebase database URL or reference as the `url` property. ```javascript @@ -224,7 +224,7 @@ var Todo = Backbone.Firebase.Model.extend({ You may apply query methods as with `Backbone.Firebase.Collection`. ### urlRoot -The `urlRoot` property can be used to dynamically set the Firebase reference from the model's id. +The `urlRoot` property can be used to dynamically set the Firebase database reference from the model's id. ```javascript var Todo = Backbone.Firebase.Model.extend({ @@ -256,7 +256,7 @@ realtimeModel.on('sync', function(model) { console.log('model loaded', model); }); -// calling .set() will sync the changes to firebase +// calling .set() will sync the changes to your database // this will fire the sync, change, and change:name events realtimeModel.set('name', 'Bob'); ``` @@ -278,7 +278,7 @@ realtimeModel.on('sync', function(model) { // this will fire off the sync event realtimeModel.fetch(); -// calling .save() will sync the changes to firebase +// calling .save() will sync the changes to your database // this will fire the sync, change, and change:name events realtimeModel.save('name', 'Bob'); @@ -286,10 +286,10 @@ realtimeModel.save('name', 'Bob'); ### set(value) -Sets the contents of the model and updates it in Firebase. +Sets the contents of the model and updates it in your database. ```javascript -MyTodo.set({foo: "bar"}); // Model is instantly updated in Firebase (and other clients) +MyTodo.set({foo: "bar"}); // Model is instantly updated in your database (and other clients) ``` ### destroy() @@ -297,7 +297,7 @@ MyTodo.set({foo: "bar"}); // Model is instantly updated in Firebase (and other c Removes the model locally, and from Firebase. ```javascript -MyTodo.destroy(); // Model is instantly removed from Firebase (and other clients) +MyTodo.destroy(); // Model is instantly removed from your database (and other clients) ``` ## Contributing