Blog

What’s Firebase?

firebase-246x156

Firebase is a powerful product that gives you the tools to develop robust applications which enables us to increase our user base and use AdMob to earn money. It allows us to use its key features like Realtime Database, User Authentication, and Hosting for free and is very reliable. One of the main problems that developers usually face is that they have to build complex structures and logics to manage data and flow of the application. This takes a lot of their time and efforts. Now with the help of Firebase, one can now get work done much more efficiently and with minimum efforts as it manages all the complex data structures by itself.
Realtime database is a unique feature provided by Firebase as it does not require user to refresh the web page or the application screen to get the updated data. Data will be updated as soon as it has been modified on any other connected system. Firebase has its own SDK which manages these tasks all by itself and user does not have to do anything manually for that. Thus, whenever a Firebase database updates, all connected users receive updates in realtime. This also eliminates the requirement for ‘pull-to-refresh’ in the applications as the data will be updated all by itself. This saves time and enables developer to focus on the functionality.
Firebase is time efficient and is rich of very helpful tools which are easy to use for entry level developers and experienced developers both.
Some of the key features provided by Firebase for Mobile Development are as following:

  • Analytics
  • Cloud Messaging
  • Authentication
  • Realtime Database
  • Storage
  • Hosting
  • Remote Configuration
  • Test Lab
  • Crash Reporting

Analytics:
Google Analytics is set to be replaced by Firebase Analytics. Firebase Analytics allows us to use all the features of Google Analytics and in addition to that it allows us to link different sets of users with different sets of rules i.e. we can decide what a user can see in our application.
Firebase Analytics is an application measurement tool. It is totally free to use and there is no quota. It provides insight on application usage and user engagement. It allows us to define custom users which can help us to manage different type of demographics. We can use these different categories to target specific set of users. That can be done by using different Firebase features such as notifications. It also helps you figure out how everyone is using the application on different platforms (i.e. Android, iOS and web). If you need to perform custom analysis or join your data with other sources you can link your analytics data to ‘BigQuery’, which allows more complex analysis like querying large data sets and joining multiple data sources. It also keeps logs events for each crash so you can get a sense of the rate of crashes for different versions or regions, allowing you to gain insight into which users are impacted. You can also create a custom set of audiences for users who have experienced multiple crashes and communicate with them via FCM. It manages the version of OS and devices getting the most crashes on and it can help us to figure out what the issue might be.

Cloud Messaging:
Firebase is set to replace the well-known GCM (Google Cloud Messaging) with its FCM (Firebase Cloud Messaging). FCM is free, reliable and easy to implement as compared to GCM. Using FCM, you can notify a client application at any time and about anything. We can send notifications to specific set of users or to everyone at once. It also allows us to set a specific time at which we went to send the message to the user.

Key features of FCM:

  • Send notification messages or data messages
  • Versatile message targeting
  • Send messages from client apps

Authentication:
This is one of the basic features provided by Firebase. This allows user to save and sync the data over the cloud with ease. Firebase securely saves the user data and takes privacy seriously which makes it more reliable and trustworthy. Firebase provides several methods for user to sign up/sign in. User can simply use traditional Email Id and password to sign up or can use Facebook, Google, Twitter and GitHub accounts to sign up. Firebase provides very easy to understand SDKs for all of these. Read more about it: https://firebase.google.com/docs/auth/android/manage-users
Apart from this, it also provides Anonymous sign in. This creates a temporary account for the user so that he can use the application. We can limit the temporary user to what he/she can view in our application. This helps undeceive users to get an idea about what to expect from the application before creating an account. And if the temporary user decides to make an account then we can link his temporary account to the actual account so that he does not lose his/her data.

Realtime Database:
As mentioned above, realtime database is one of the most interesting features provided by Firebase. We can add, update or remove data from one device and the changes will reflect on all the linked devices instantly and without any user interaction. The data is also available even if the user gets offline. The data can be updated while being offline and the changes will reflect as soon as the user is again connected to the network. The data stored is in the form of JSON (JavaScript Object Notation) which is very easy to manage.

Implementation (Android):
Implementing Firebase is quick and easy. With intuitive APIs packaged into a single SDK, you can focus on solving your customer’s problems and not waste time building complex infrastructures. Currently Firebase gives support to build applications on Android, iOS and Web.
Prerequisites for building an app in Android:

  • A device running Android 2.3 (Gingerbread) or newer, and Google Play services 9.2.1 or newer.
  • The Google Play services SDK from the Android SDK Manager.
  • Android Studio 1.5 or higher.
  • An Android Studio project and its package name.

Now, after setting up an Android project you need to add rules to your root-level build.gradle file, to include the google-services plugin:
buildscript {
dependencies {
classpath ‘com.google.gms:google-services:3.0.0’
}
}
Then, in your module Gradle file (usually the app/build.gradle), add the apply plugin line at the bottom of the file to enable the Gradle plugin:
apply plugin: ‘com.android.application’

android {
// …
}

dependencies {
// …
compile ‘com.google.firebase:firebase-core:9.2.1’
}

// ADD THIS AT THE BOTTOM
apply plugin: ‘com.google.gms.google-services’

After doing that we will be able to use Firebase with your application. For more information regarding the same, kindly visit https://firebase.google.com/docs/

Conclusion:
Firebase is very powerful and easy to use. This certainly makes life of a developer less painful and he can think less about logics related to data management as Firebase does that with ease and with limited lines of code. Firebase is free to use unless you want features like Test Labs (which runs custom test scripts on hundreds of device configurations and gives you feedback) or increase cloud storage space, which is not usually required if you do not have a huge user base. Firebase is now very important part of development and will be with us for a long time to come.

Subscribe to a hand-picked round up of the best development/design/mobile blog posts every week.

Curated by Seasia Infotech and published every week. Free!

100 % privacy. We will never spam you!

AUTHOR :

Seasia Infotech is a CMMi5 certified company providing Software Development, Mobile Application Development and Digital Marketing services to businesses worldwide. We embrace the latest technologies to deliver solutions that address our clients’ business challenges. We focus on resolving the IT conundrum for our clients thereby enabling them to focus on their core business strengths.

1 thought on “What’s Firebase?”

Leave a Reply

Your email address will not be published. Required fields are marked *

Top Request Free Consultation