Coder Social home page Coder Social logo

reggietheroman / emberfire Goto Github PK

View Code? Open in Web Editor NEW

This project forked from firebaseextended/emberfire

0.0 0.0 0.0 3.68 MB

The officially supported adapter for using Firebase with Ember

Home Page: https://firebaseopensource.com/projects/firebase/emberfire/

License: MIT License

JavaScript 21.41% HTML 5.13% TypeScript 72.47% Shell 0.99%

emberfire's Introduction

EmberFire Build Status Version Monthly Downloads Ember Observer Score

EmberFire is the officially supported adapter for using Firebase with Ember

Join the Firebase Google Group to ask technical questions, share apps you've built, and chat with other developers in the community. You can also find us in the Firebase Community Slack (look for the #ember room) or Stack Overflow.


WARNING: Master branch is the work in progress for version 3 of Emberfire. You can find version 2 here, if you're looking for documentation or to contribute to stable. Learn more about the rewrite effort here.


Why EmberFire?

  • Offically supported - Maintained by the Firebase team
  • Ember Data Adapters - Cloud Firestore and Realtime Database adapters for Ember Data allow you to persist your models in Firebase
  • Ember Services - firebase and firebase-app services allow direct access to the underlying Firebase SDK instance
  • Realtime Bindings - Listen for realtime updates to your Firebase backed Ember Data models using the provided realtime-listener service or the RealtimeRouteMixin
  • Authentication Providers - Integrate Firebase Authentication with your Ember application easily with providers for Ember Simple Auth and Torii
  • Analytics Collection - The AnalyticsRouteMixin adds Google Analytics screen tracking to your Ember Router.
  • Offline Enabled - Persist Ember Data models offline automatically with FirestoreAdapter
  • Fastboot Compatible - Perform initial rendering and fetching of your models server-side to increase application performance

Installation

$ ember install emberfire@next

Example use

// app/adapters/application.js
import FirestoreAdapter from 'emberfire/adapters/firestore';

export default FirestoreAdapter.extend({
    enablePersistence: true,
    persistenceSettings: { synchronizeTabs: true }
});
// app/models/article.js
import DS from 'ember-data';
const { attr, belongsTo, hasMany } = DS;

export default DS.Model.extend({
    title: attr('string'),
    body: attr('string'),
    publishedAt: attr('date'),
    author: belongsTo('user'),
    comments: hasMany('comments', { subcollection: true }),
});
// app/routes/articles.js
import Route from '@ember/routing/route';
import RealtimeRouteMixin from 'emberfire/mixins/realtime-route';
import PerformanceRouteMixin from 'emberfire/mixins/performance-route';

export default Route.extend(RealtimeRouteMixin, PerformanceRouteMixin, {
    model() {
        return this.store.query('article', { orderBy: 'publishedAt' });
    }
});
// app/routes/application.js
import AnalyticsRouteMixin from 'emberfire/mixins/analytics-route';
import Route from '@ember/routing/route';

export default Route.extend(AnalyticsRouteMixin);

Documentation

Compatibility

Please consult this table when selecting your version of EmberFire and Firebase SDK:

Ember Data EmberFire Firebase SDK
3.0+ 3.x 5.x
2.3+ 2.x 3.x
2.0 - 2.2 1.6.x 2.x
1.13 1.5.x 2.x

Migration Guides

Contributing

If you'd like to contribute to EmberFire, please first read through our contribution guidelines. Local setup instructions are available here.

emberfire's People

Contributors

aputinski avatar tstirrat avatar firebase-ops avatar jamesdaniels avatar sararob avatar anantn avatar leifcr avatar stefanpenner avatar dstaley avatar neverfox avatar adjohnson916 avatar brancusi avatar olivierchatry avatar oskarrough avatar steven-ferguson avatar mattmsumner avatar tsubik avatar mikkopaderes avatar tmayr avatar rwjblue avatar knownasilya avatar gabrielgrant avatar cohitre avatar tomclose avatar robtarr avatar m-basov avatar gpbmike avatar jayphelps avatar hamzahio avatar halfdan avatar

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.