Firebase is a complex platform for web and mobile development. The initial success grabbed everybody’s attention and led to the acquirement by Google in 2014. The growing popularity of this tool makes Firebase one of the leaders in the industry.
Is this success justified? Let’s see!
Firebase provides plenty of services that can be implemented in your app from authorization system to crash reporting.
Let’s take a quick look at four most popular modules of Firebase:
A built-in functionality lets you authenticate and authorize users by their emails, Gitlab, Facebook, Twitter and other social media.
The implementation is very simple and saves a lot of time you would spend on building an Auth System.
Developers are given a choice between Realtime Database and Cloud Firestore. Both of them are noSQL and rely on a JSON format. They support offline work, which means that they store the data on your disk and update them whenever you reconnect. Cloud Firestore is the latest one and it is still in a beta version, but includes lot of automation in building, scaling your database, what was not obvious in the previous one. If you think about the former Firebase database it is like a giant JSON file. The new one is more structured – documents, collections and subcollections, which contain other documents, collections and subcollections. Thanks to this, Firestore provides you with better querying based on multiple conditions. Another big advantage of Cloud Firestore is real-time listener, which streams the updated data whenever it changes.
However, you should keep in mind that Realtime Database has been tested on thousands of apps over the last years and it is still more stable and reliable for sure. Also, it may be cheaper to maintain the data this way.
Cloud Storage in Firebase is a very powerful place to keep files in. Storage is high-scalable and strongly secured. Its implementation lets users upload and download images,videos, music etc. regardless of connection quality. Your progress is being saved when you lose connection, so it means it restarts from the same place it finished saving users’ actual bandwidth.
4. Performance Monitoring
This module provides developers with extensive data and measurements about their app usage. Fully trackable network traffic, requests rate, insight into situation where the performance could be improved. All of them are shown in charts and graphs in relation with the app version.
It is still only available on Android/iOS apps, but it is worth mentioning. It lets you monitor the action, good and weak points and shows dependency of efficiency in comparison to the app version. If you want to use a monitoring system on your website, please take a look on Hotjar product.
How to start ?
Although Firebase is meant to be used on many platforms such as Android, iOS, Unity etc. I am going to focus on Web Development.
What will you need?
- Express Framework
1. Start a Firebase project
To start a Firebase project, open the Fireabse Console:
Log in with your google account and click „New Project”.
Follow the instruction and fill the required information.
After a few seconds, your project will be initialized.
On the homepage, you will be offered to inject a Firebase into your project.
Click on that and save config JSON object. It will be required soon.
2. Add Firebase to your project
Type in the terminal: