Introduction to Firebase
A Database is a collection of data. Every application whether Android, iOS, or web application it has his own Database. In android application, we can create a database using SQLite, shared preferences, websites or some cloud-based storage sites.
Firebase is also a database back-end for Android, iOS and web applications. Firebase is a cloud service supplier and backend as a service. Firebase is to create a database and fetch data. Data is stored as JSON and is accessible from all the platforms
What is Firebase?
If one client changes a piece of data, every other client observing the same piece of data will be updated as well.
- Real-time Database – Database in firebase is a cloud-based database and does not need SQL based queries to store and fetch data. Firebase supports JSON data and all users connected to it receive live updates after every change.
- Authentication – In auth feature only authorized user can access your application. We can use anonymous, password or different social authentication. Firebase provides login through Gmail, GitHub, Twitter, Facebook.
- Hosting – Firebase is also used for hosting purposes. Firebase delivers web content very fast and content is always delivered securely.
- Analytics – This feature enables the application developer to understand how users are using his application. The SDK captures events and properties on its own and also allows you to get custom data. The dashboard provides details like your most active user or what features of your application is used most. It also provides you with summarized data.
- Messaging – Firebase cloud messaging lets you deliver messages platforms at no cost. Messaging is also used for notifications purposes.
- Storage – Firebase also provides storage facility. It can store and retrieve content like images, videos, and audios directly from the client side. Data stores are safe and the only authorized user can access it.
- Crash Reporting – Crash Reporting features in firebase creates reports of error in your app after it releases. Errors are grouped into different groups according to how severe error is.
- Remote config – This feature allows to update the user application without the need of deploying the current updated app.
- Test labs – It involves testing of application with different configuration and with a variety of services.
- Cloud Firestore – Cloud Firestore is a No SQL document database that lets you easily store, sync, and query data for your mobile and web apps – at a global scale.
- ML Kit – ML Kit lets you bring powerful machine learning features to your app whether it’s for Android or iOS, and whether you’re an experienced machine learning developer or you’re just getting started. ML Kit comes with a set of ready-to-use APIs for common mobile use cases: recognizing text, detecting faces, scanning barcodes, labeling images and recognizing landmarks. You simply pass in data to the ML Kit library and it will give you the information you need – all in a few lines of code.
- A/B testing – Firebase A/B Testing helps you improve your app by making it easy to run, analyze, and scale product and marketing experiments. It gives you the power to test changes to your app’s UI, features, or engagement campaigns to see if they actually move the needle on your key metrics (like revenue)before you implement them widely.
Projects made using Firebase
Firepad – Firepad is an open-source real-time collaborative text editor. It provides true collaborative editing, complete with intelligent operational transform-based merging and conflict resolution.
Firechat – Firechat is a real-time chat application. Firechat is an open source, real-time chat widget built on Firebase. It offers fully secure multi-user, multi-room chat with flexible authentication. The core data Layer under Firechat uses Firebase for authentication, real-time data synchronization and data persistence.
Some companies that use Firebase are:
- PicCollage – iOS, Android over 120mn downloads.
- Fabulous – Android Alexa rank, under 620k globally.
- Shazam – iOS, Android over 120mn users each month.
- Skyscanner – iOS, Android, Web Over 50mn monthly users.
- It is simple and user-friendly. No need for complicated configuration.
- The data is real-time, which means that every change will automatically update connected clients.
- Firebase offers simple control dashboard.
- There are a number of useful services to choose from.
- Firebase’s paid infrastructure offers the real-time database, storage, cloud functions, Hosting, Test Lab, Phone Authentication and Google Cloud Platform using Big Query and other IAAS.
- If you are building a slack-like app, you will have to download all channels data on app load.
- It supports offline operations but if the client goes offline and then comes online it may lead to inconsistencies.
- You can’t deal easily with data migration like you can do with simple SQL databases, an ORM or ODM.
- It introduce queues to share operations between servers and prevent concurrency.
Why use Firebase?
Firebase is added to your application very quickly and app using firebase requires the least development time. Firebase is available for many platforms. As mentioned in the features, using firebase is more beneficial.
If your app does run in a centralized Database and is updated by a lot of users, then its more than capable of handling the Real-time data updates between devices. The data is stored in the cloud so readily available everywhere. Analytics to crashing reports are included in firebase. In firebase, you do not need to put constraints on your design or even worry about authentication rules.