TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

AngularFire - A real-time backend for AngularJS from Firebase

63 pointsby mayop100over 11 years ago

11 comments

marknutterover 11 years ago
I&#x27;ve been using Firebase in an Angular app I&#x27;ve been developing for the past couple of months, but instead of using AngularFire I rolled my own wrapper for a few reasons:<p>1. I didn&#x27;t like how Firebase is explicitly injected into and referred to in the controllers. I don&#x27;t want my controllers to be so tightly coupled to Firebase.<p>2. There was no support for associations. If you want to have object associations, which most non-trivial apps require, you need to manage all that complexity in your controllers using AngularFire. I wanted a solution that handled it implicitly, ala ActiveRecord.<p>3. I wanted additional features handled for me by the wrapper like timestamps, save&#x2F;create&#x2F;delete&#x2F;init callbacks, collecting resources into stores to be used across controllers, etc.<p>4. AngularFire leans pretty heavily on Firebase as the place data is stored. I wanted to instead have my data stored in memory and automatically synced to Firebase without me having to worry about it. That way, if I ever switched away from Firebase I don&#x27;t need to change any of my controller code.<p>5. Pagination is something that becomes very important as you start to build more complex apps, and it&#x27;s not the most pleasant thing to deal with in Firebase at present. I wanted a wrapper that managed all those details for me.<p>Angular and Firebase are a great match, and AngularFire is a good way to get going quickly, but it lacks the features and depth required to make a truly complex application IMO. I had been meaning to throw my wrapper up on Github for a while so I suppose now is as good a time as any:<p><a href="https://github.com/marknutter/firebase-resource" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;marknutter&#x2F;firebase-resource</a><p>Examples and tests forthcoming.
评论 #6303364 未加载
评论 #6303489 未加载
评论 #6303009 未加载
评论 #6303014 未加载
评论 #6303016 未加载
kalzbover 11 years ago
I&#x27;ve also just begun to incorporate Angular into a number of my projects. I must say that without AngularFire and Firebase, I would have been helpless with regard to finding a good starting point - and the ability to develop apps quickly and painlessly in order to provide me with instant gratification.<p>That been said, in around 2-3 weeks, I&#x27;ve managed to incorporate AngularFire&#x2F;Firebase into an MVC4 web app (which handles user accounts more securely) and allows Firebase to do what it does best - real-time updates to the users&#x27; UI.<p>The site, <a href="http://www.whereubeat.com" rel="nofollow">http:&#x2F;&#x2F;www.whereubeat.com</a> tracks users&#x27; locations in real-time and provides an animated UI that acts as a homing device when trying to find your friends at a concert, festival, or sporting event. I would still consider myself a novice in both javascript and MVC4&#x2F;C#; however, I was able to produce results soooo quickly using AngularFire&#x2F;Firebase that I couldn&#x27;t stop!<p>All that being said, I am aware that there are shortcomings with AngularFire&#x2F;Firebase; however, let&#x27;s face it... simplicity will always result in functionality shortcomings. Personally, I&#x27;d rather spend my time painting the canvas as opposed to stretching it myself.
hswolffover 11 years ago
I used AngularFire to build my application BringTheSalsa (<a href="http://bringthesalsa.hswolff.com/" rel="nofollow">http:&#x2F;&#x2F;bringthesalsa.hswolff.com&#x2F;</a>). Not only was it a pleasure to use, it also works beautifully. ++ to AngularFire.
kjellover 11 years ago
I have Leaflet.draw set up to annotate tiled images of objects at a museum.<p>The annotated regions pass thru angularfire as geojson. Put 3 screens side by side. As soon as someone adds an annotation on one of them it pops up instantly on the others. This was &lt; 20 lines of bad-I&#x27;m-new-to-angular code. Firebase is cool.
ludicastover 11 years ago
I agree with some of the negative comments (as of a month ago). I found a phonegap&#x2F;angular&#x2F;firebase app of mine kept crashing when angularfire was injected, so I just hand-did the requests.<p>The good thing is that firebase and angular are good enough that I was able to hand-wire things in like 5 lines.
KaoruAoiShihoover 11 years ago
Fix your bugs and your server stability Firebase. Using AngularFire for 2 months and it&#x27;s alpha quality.
评论 #6303167 未加载
Aarononthewebover 11 years ago
For some reason I thought this was an article about AngelFire and I got all nostalgic :\
adambomover 11 years ago
Your website is crashing because of while (true) { $(&#x27;form&#x27;).submit(); }. Throttle that beeyotch.
edgarjcfnover 11 years ago
After the visibility on HN the demo is crashing our browsers :)
spotover 11 years ago
that page crashes my chrome.
评论 #6302850 未加载
andylover 11 years ago
I&#x27;m using Faye (<a href="http://faye.jcoglan.com/" rel="nofollow">http:&#x2F;&#x2F;faye.jcoglan.com&#x2F;</a>) for pub-sub to an Angular front end. It is simple to use, performs well, and doesn&#x27;t require replacing your existing toolchain.
评论 #6302934 未加载
评论 #6302812 未加载