My experience with Firebase

S M Hammad Shakil
Jul 11, 2017 · 5 min read

I have been using Firebase since 2014. At that time it was really helpful for me for developing in prototype applications. Here I am discussing about what is Firebase ? Why is it useful ? many other things related to Firebase.

Firebase was started as a YC11 startup and grew up into a next-generation app-development platform on Google Cloud Platform.It is basically a BaaS Backend-as-a-Service.

The best thing about Firebase is that you don’t need to manage servers. You don’t need to write APIs. Firebase is your server, your API and your data store, all written so generically that you can modify it to suit most needs. Yeah, you’ll occasionally need to use other bits of the Google Cloud for your advanced applications. Firebase can’t be everything to everybody. But it gets pretty close. :)

Real Time

I recently used Firebase in my chat application it really work great with all the chat features. Firebase is areal time database. Real-time data is the way of the future. Nothing compares to it.

Most databases require you to make HTTP calls to get and sync your data. Most databases give you data only when you ask for it.

Firebase is not normal HTTPS. It uses WebSockets. WebSockets are much faster than HTTP. You don’t have to make individual WebSocket calls. All of your data syncs automagically :) through that single WebSocket as fast as your client’s network can carry it.

Firebase sync the app with the updated data. Any change of data immediately reflects on apps. The service provides application developers an API that allows application data to be synchronized across clients and stored on Firebase’s cloud. Firebase provides client libraries that enable integration with Android, iOS, JavaScript, Java, Objective-C, swift and Node.js applications. The database is also accessible through a REST API and bindings for several JavaScript frameworks such as AngularJS, React, Ember.js and Backbone.js. The REST API uses the Server-Sent Events protocol, which is an API for creating HTTP connections for receiving push notifications from a server. Developers uses the realtime database can secure their data by using the company’s server-side-enforced security rules

Storage

Firebase store data in binary form specially it is useful for images. Firebase Storage has it’s own system of security rules to protect your GCloud bucket from the masses, while granting detailed write privileges to your authenticated clients.

Authentication

One of the best features of Firebase has it’s own auth email/password authentication system. It also supports to some of more like OAuth2 for Google, Facebook, Twitter and GitHub. It includes a user management system whereby developers can enable user authentication with email and password login stored with Firebase

If you’ve ever written an authentication system, let’s commiserate for a moment. Custom authentication is terrible. I will never write an auth system again for as long as I live. I fell in love with Firebase Auth at first sight, and the flame has never wavered. Sometimes I get frustrated. Sometimes we fight. But I never forget the cold, dark abyss of a custom auth system. I count my blessings.

One important point is that Firebase Auth integrates directly into Firebase Database, so you can use it to control access to your data. I’m writing this as if it’s an afterthought. It’s not. It’s the second reason that you will love Firebase Auth

Hosting

Firebase has static and dynamic web hosting service that launched on May 13, 2014. It supports hosting static files such as CSS, HTML, JavaScript and other files, as well as dynamic Node.js support through Cloud Functions.

Features

A bunch of these features available on Firebase.

  • Remote Config
  • Test Lab
  • Crash reporting
  • Notifications
  • Dynamic Links
  • AdMob
  • Firebase Invites

Firebase Remote Config

Firebase Remote Config is a cloud service that lets developers change the behavior and appearance of their apps without requiring users to download an app update.

Firebase Test Lab for Android

Firebase Test Lab for Android provides cloud-based infrastructure for testing Android apps. With one operation, developers can initiate testing of their apps across a wide variety of devices and device configurations. Test results including logs, videos, and screenshots are made available in the project in the Firebase console. Even if a developer hasn’t written any test code for their app, Test Lab can exercise the app automatically, looking for crashes.

Isn’t it amazing :)

Firebase Crash Reporting

Crash Reporting creates detailed reports of the errors in the app. In addition to automatic reports, developer can log custom events to help capture the steps leading up to a crash.

Firebase Notifications

Firebase Notifications is a service that enables targeted user notifications for mobile app developers.

Admob

Google product Admob is integrated with Firebase and enable developers to Earn money by displaying engaging ads to a global audience.

Firebase Invites

Firebase invites is a cross-platform solution for sending personalized email and sms invitations.

Firebase Pros & Cons

Pros

  • Email & password, Google, Facebook, and Github authentication
  • Realtime data
  • Ready-made api
  • Built in security at the data node level
  • File storage backed by Google Cloud Storage
  • Static file hosting
  • Treat data as streams to build highly scalable applications
  • Don’t worry about your infrastructure!

Cons

  • Limited query abilities due to Firebase’s data stream model
  • Traditional relational data models are not applicable to NoSQL
    therefore, your SQL chops will not transfer
  • No on-premise installation

For Beginner

If any one has interest in Firebase. For the beginners you can start from HERE as a your first web app with Firebase. I have also completed many more projects on Firebase you can find it HERE

S M Hammad Shakil

Written by

Working as a web developer in Venturedive