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.

Angular + Firebase Is RAD

46 pointsby mayop100over 11 years ago

7 comments

drhayes9over 11 years ago
I really wanted this article to get into the meat of how to build an Angular app with Firebase. It gets the basics working but it would&#x27;ve been nice to see some details about Firebase security, good practices about what goes where with respect to what AngularFire provides, etc.<p>I&#x27;ve only been playing around with it but I thought I&#x27;d add some ideas that are working so far for me:<p>- Don&#x27;t use your Firebase URL all over the place in your app.<p>- DRY it up by creating an AngularJS constant for your main Firebase instance (e.g. &quot;module.constant(&#x27;baseStore&#x27;, new Firebase(&#x27;<a href="https://whatever.firebaseio.com&#x27;));&quot;" rel="nofollow">https:&#x2F;&#x2F;whatever.firebaseio.com&#x27;));&quot;</a>).<p>- Every sub reference to the base now uses the &quot;child&quot; method off that baseStore object to get sub-objects (e.g. &quot;var props = baseStore.child(&#x27;props&#x27;);&quot;).<p>- Create an auth service that your app uses instead of using the AngularFire auth libs directly. Makes it much easier to control&#x2F;test your auth flow, especially if you change from &quot;email&#x2F;password&quot; to, say, &quot;persona&quot;.<p>I still have some questions about the interactions between Angular and Firebase&#x2F;AngularFire but maybe I&#x27;ll save them for a StackOverflow question. ( =
评论 #6407144 未加载
alexandrosover 11 years ago
It would be good to get Firebase&#x27;s Angular bindings to work decently well for top-level objects and improve their promise support. I recently worked on <a href="http://worldmap.io" rel="nofollow">http:&#x2F;&#x2F;worldmap.io</a> as a way to test a bunch of angular-related tech and the firebase bindings, while dead easy to start, were a pain as I couldn&#x27;t resolve them in the routeProvider. Instead I had to do it inside the controller, which forced me to keep a bunch of boilerplate. See <a href="https://github.com/alexandrosm/worldmap/blob/master/app/scripts/controllers/main.coffee" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;alexandrosm&#x2F;worldmap&#x2F;blob&#x2F;master&#x2F;app&#x2F;scri...</a><p>Still, a great project and concept, just has some more way to go before I&#x27;d use it in a real project. I do want to check out <a href="https://github.com/marknutter/firebase-resource" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;marknutter&#x2F;firebase-resource</a> though, made by a fellow HNer and mentioned last time around.
hixupover 11 years ago
I&#x27;m also working on an AngularJS + FireBase web app (<a href="http://hixup.com/#/3fKz/" rel="nofollow">http:&#x2F;&#x2F;hixup.com&#x2F;#&#x2F;3fKz&#x2F;</a>). I posted a &#x27;Show HN&#x27; yesterday but it didn&#x27;t get much traction. My app lets you create a simple poll where the votes and comments are updated in real time. Thanks to Firebase I could concentrate on writing client-side code only.<p>I agree with the other commenters that the AngularFire bindings are not mature yet. The documentation is lacking in detail and I couldn&#x27;t figure out how to make it work with lists in Firebase. So I ended up using the regular Firebase javascript API instead of AngularFire.<p>You can have a look at the code here: <a href="https://github.com/dbbert/personal/tree/gh-pages" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dbbert&#x2F;personal&#x2F;tree&#x2F;gh-pages</a>.
WhitneyLandover 11 years ago
The concept is RAD, in practice the Firebase learning curve sucks due to lack of good documentation of API semantics, especially w.r.t. AngularJS.
评论 #6407071 未加载
评论 #6407367 未加载
icedogover 11 years ago
The AngularJS team had a few Firebase meetups several months ago. At the first event, someone from fbase showed how to create a todo app. When people asked about their backend implementation details, they didn&#x27;t reveal a thing. I&#x27;m already turned off by giving up server-side control, withholding their implementation details is a huge red flag.
manojldsover 11 years ago
I am working on this as I learn AngularJS - <a href="https://github.com/manojlds/EventBase" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;manojlds&#x2F;EventBase</a><p>Working with Firebase has been fun, but security is hard. AngularFire is not really mature yet, too.
评论 #6407118 未加载
评论 #6413347 未加载
评论 #6407714 未加载
yesimahumanover 11 years ago
AngularJS + Firebase is really incredible. I&#x27;ve been doing some really fun stuff with it on mobile and it really rocks there.