Firebase – client side framework for developing real-time applications

0
638

Developing apps across multiple platforms(web, Android, iOS) is a tedious task as it requires the knowledge of each platform to understand the functionality and compatibility of the solutions.

We, at CrossNibble Technologies, decided to develop an Android app, Attendance Tracker for Students, in June 2017. We wanted to develop an app that will help students in recording their attendance.

Firebase article cover

There were so many challenges such as syncing with an online database, common authentication method, scalability, etc. Our developer team decided to choose Firebase for following advantages:

1. Authentication:

Since we wanted to use an online database, authentication was a necessary feature. All of us know that we can not store user's session in mobile applications as we can do it in web browsers.
For authenticating a user, OAuth 2.0 protocol is followed which exchanges the token from the client and server to authenticate the users. Implementation of OAuth 2.0 is a complex procedure. It needs a clear understanding of the protocol and one should have enough experience to identify and mitigate security threats while implementing it.

We also wanted to provide guest login feature so that users can sign in anonymously and if they like the app, they can create the account. Also, social media sign-in was required as it is most commonly used by many users.

Had we invested time and efforts in implementing all these, i.e. OAuth 2.0, Password sign in, Google sign in, we wouldn't have finished the application development in 2 months.

Firebase authentication providers

The major advantage that Firebase provides is its centralized authentication system that gives simple methods for authenticating the users. Firebase has provided easy APIs and direct methods for authenticating users from Mobile apps as well as Web apps. Users can be authenticated using their Mobile number, Email Address, Google account, Facebook account, Twitter account and GitHub account.

There is also a provision for Anonymous login, where users can login as guest, at a later stage you can convert that Guest user to registered user using simple methods.

With Firebase, only a few lines of code allows you to authenticate the users for each of these providers. Isn't it amazing?

2. Real-time database

Before selecting Firebase for our application, we used to work on relational databases. We have worked on Object-Oriented database also, but due to the costs involved in hosting and maintaining those databases, we never recommended those options to our clients.

Firebase uses JSON database which is a NoSQL database. If you have ever worked on JSON in your web apps, then you will love working on Firebase real-time database.

Another important advantage of the real-time database is that we can easily sync the data across multiple platforms. If you want to develop real-time applications such as Live Cricket match scores or Football match scores, Firebase's real-time database is the solution for you.

3. Dashboard

Another important factor is analytics of applications. We wanted a simple interface that could easily give insights into users behavior while using our application.

The dashboard of Firebase gives deep insights into user's behavior and it is really amazing.

Firebase dashboard

We can see how many users opened the application on a particular day or during an interval, which screens they viewed, average engagement time per users, demographics of users and so on.

Although, you get all these features by integrating Google Analytics into your applications. But, wouldn't you love it if you get all these on one platform?

4. Cost

Firebase provides a very cost-effective platform. Firebase charges you based on your usage or you can reserve resources and pay a fixed price for those resources. It provides three simple pricing plans i.e. Free, Flame and Blaze.

Note: We are discussing pricing plans for real-time database only. Pricing for other services can be checked on Firebase pricing plan page.

Free plan:

The major challenge with using online database service is that most of the services start charging you from the day you start using the service. So, you have to bear the cost of the service well before your application goes live.

With Firebase, You can store up to 1GB data in real-time database and users can download up to 10GB data per month on their devices. If you are just developing the application, you will never cross this limit, and hence you pay nothing while developing your applications.

In the FREE plan, only 100 users can access the database concurrently. If the number goes above 100, users will start facing problems in accessing the data. In this case, you will have to choose paid plans.

Flame plan:

This costs $25 per month. With this plan, you get a fixed set of resources. This plan allows you to store 2.5GB data in the real-time database and 20Gb data can be downloaded by users per month. This plan allows 100K concurrent connections at a time. According to Firebase's predictions, this plan allows you to store approximately 50 million messages and users can exchange up to 400 million messages per month.
For most of the application developers, who are not marketing their applications aggressively, this limit may never be reached.

Blaze plan:

With blaze plan, you pay as per your usage. For Attendance Tracker, we need only the real-time database. If we go for blaze plan for Attendance Tracker, according to our estimates, we will never have to pay more tha$5-$10 per month to Firebase.

5. Push Notifications

Push notifications are used in mobile applications for engaging users in various activities. You can notify the users about a new update of your app or you can ask them to fill a survey form, etc.

Generally, developers use Google Cloud Messaging(GCM) for push notifications.

Firebase has developed Firebase Could Messaging(FCM) which is the new version of GCM with additional functionality. You can send push notifications to all the users or a segment of users from your firebase console and the performance of your ads can also be managed through the console without any extra cost.

6. Predictions

Firebase has introduced Predictions, a feature that helps us understand the growth of the application.

Predictions are created based on the conversion events. For example, it can tell us about how many users will or will not leave the app. You can create a segment of users based on these predictions. For example, you can send certain offers to the users who are about to leave the app. This can help you in retaining the users.

7. Documentation

Like other Google products, Firebase comes with a complete documentation available freely. The documentation provides all the steps to add/implement services in your apps with a suitable example.

LEAVE A REPLY

Please enter your comment!
Please enter your name here