Firebase

Firebase is a mobile and web application platform first developed by Firebase Inc. in 2011 and bought by Google in 2014. Since then, it has gone from a reactive database in the cloud to a whole suite of products. We will, however, focus on the database side of things, as that is the interesting part for an Angular developer. So, the best way to think of Firebase is as a backend as a service. That means that with Firebase, there is no reason to build your own REST services; you only need to connect to it.

It's worth pointing out that it is ultimately a product with paid plans, but it is definitely possible to create toy projects with it without having to pay anything. 

Okay, so backend as a service, got it. That's not all, however; its real selling point is the fact that it is reactive. It is reactive in the sense that if you subscribe to a collection on the database and a client somewhere makes a change to that collection, you will be notified and can act accordingly. Does that sounds familiar? Yes, you are thinking right: it sounds like RxJS and Observables, which is why the Firebase API has been wrapped in RXJS called AngularFire2, an Angular module that you can easily install from npm and add to your project.

So, the business case for using Firebase in the first place is when you want to create collaboration applications. I'm going to be so bold as to say that it is like web sockets, but in the cloud and with an underlying database, so with not only the communication part, but data as well.

In this chapter, you will learn:

  • What Firebase is
  • To leverage AngularFire2 in your Angular app
  • How to listen for and act on changes
  • How to use CRUD operations to manipulate your Firebase data 
  • Why it is important to deal with authentication and authorization and how to set them up
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset