Let's Talk About Firebase

Let's Talk About Firebase

Unveiling all of its Potentials

“Firebase empowers you to build amazing apps, fast. Focus on what matters most — creating incredible user experiences — and leave the complex backend infrastructure to us.” — Mr. Gemini

While preparing this article, I decided to ask Gemini - formally Google Bard, what he thinks about Firebase and the response was mind-blowing as you can see above. I love the fact that he highlights one of the main goals of Firebase - leaving the complex backend infrastructure of your app to Firebase to handle.

And, I will say, “Firebase is a dream come true for most developers!”. As developers, we often want to build stuff quickly while making sure everything is perfect. This desire from developers to build apps fast while making sure it is perfect sounds like an irony — but hey, that’s exactly what Firebase is helping us to achieve.

My aim of this article is to give you a high-level understanding of Firebase and its benefits, highlight its core services, know the various platforms and frameworks used in Firebase, help you to get started irrespective of the platform or framework you want to use, and finally share with you what I think is next after enjoying this amazing meal cooked by me 😀.

So, what is Firebase?

Traditionally, Firebase is a back-end-as-a-service (BaaS) platform that provides a comprehensive suite of cloud-based services where there is no need to manage and maintain the back-end infrastructure of your application.

Why should you start using Firebase?

First and foremost, if you are a "speed person" and at the same time, a perfectionist like me, you should start using Firebase or use it more often.

Further, the following are the key benefits of using Firebase:

  • Easy to use: If you have used any of Google developer products, you can attest to their comprehensive documentation and of course, Firebase is a Google dev product. Aside from its comprehensive documentation, the Firebase console makes interacting with the platform a breeze 😃.

  • Rapid Development: If you have a project that you want to implement quickly, Firebase is here for you. You can focus on your logic and system use cases while Firebase handles the heavy lifting of your backend out of the box.

  • Real-Time Data: Firebase’s real-time feature and offline capabilities always stands out in meeting almost all of your needs to process data in real-time within your application. If you are an IoT developer like me, Firebase should be your friend — I will share an article about how I have used Firebase in most of my IoT projects.

  • Seamless Integration: Firebase integrates seamlessly with other Google technologies and services, such as Google Analytics, Google Maps, and Google Cloud Platform. This allows you to leverage a wide range of additional features and services to enhance your applications.

  • Affordable: if you are a student who wants to learn Firebase, a developer who wants to leverage Firebase to implement a quick project, an innovator wanting to develop an MVP for your burning new idea, or a senior developer looking to use Firebase, the pricing model is just right for you. Firebase is so affordable that you can use the free plan to explore a lot of Firebase products. Firebase is your playground for learning without worrying about payment.

  • Scalable: Firebase is being used by big tech companies which is a clear proof of its’ scalable architecture — and you don’t need to worry about managing any servers.

  • Reliable: Firebase is one of the core products of Google, Google is one of the big players in the tech industry — therefore, you can rely on Firebase👌.

It does not take much work to explore Firebase, so, give it a try yourself and get a taste of these benefits.

Now, let’s talk about the “Core Services” of Firebase.

Firebase has a lot of services for a variety of use cases jumping in your face, right out of the box. Again, these services are running on Google’s infrastructure and are being managed for you with no hassle. All you have to do is, integrate them according to your application use case — isn’t that amazing?

The following are the core Firebase services I will be talking about in this article — just to give you an overview of each.

  1. Firebase Authentication: Firebase Authentication provides backend services, easy-to-use SDKs, and ready-made UI libraries to authenticate users to your app. It supports authentication using passwords, phone numbers, and popular federated identity providers like Google, Facebook, Twitter, and more. For more advanced authentication features such as multi-factor authentication, blocking functions, user activity and audit logging, SAML and generic OpenID Connect support, multi-tenancy, and enterprise-level support, you can upgrade from the free plan. However, the free plan is just enough to authenticate users in your small apps. Firebase Authentication integrates with other Firebase services, and it leverages industry standards like OAuth 2.0 and OpenID Connect, so it can be easily integrated with your custom backend.

  2. Firebase Realtime Database: Firebase Realtime Database is a cloud-hosted database. Data is stored as JSON and synchronized in real time to every connected client of your application. When you build cross-platform apps with the Apple platforms, Android, and JavaScript SDKs, all of your clients share one Real-time Database instance and automatically receive updates with the newest data. Isn’t that cool 👏?

  3. Cloud Firestore : Cloud Firestore is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud. Like Firebase Realtime Database, it keeps your data in sync across client apps through real-time listeners and offers offline support for mobile and web so you can build responsive apps that work regardless of network latency or Internet connectivity. Cloud Firestore also offers seamless integration with other Firebase and Google Cloud products, including Cloud Functions.

  4. Storage: Cloud Storage for Firebase is built on fast and secure Google Cloud infrastructure for you and I (software developers) who need to store and serve user-generated content, such as photos or videos. The Firebase SDKs for Cloud Storage add Google security to file uploads and downloads for your Firebase apps, regardless of network quality.

  5. Cloud Functions: Cloud Functions for Firebase is a serverless framework that lets you automatically run backend code in response to events triggered by background events, HTTPS requests, the Admin SDK, or Cloud Scheduler jobs. Say goodbye to server headaches, and hello to smooth operation.

  6. Hosting: Firebase Hosting is a production-grade web content hosting for developers. With a single command, you can quickly deploy web apps and serve both static and dynamic content to a global CDN (content delivery network). You can also pair Firebase Hosting with Cloud Functions or Cloud Run to build and host microservices on Firebase.

  7. Analytics: Firebase Analytics is a powerful tool for app developers, to understand how users interact with their application.

  8. Firebase Machine Learning: Firebase Machine Learning is a mobile SDK that brings Google’s machine learning expertise to Android and Apple apps in a powerful yet easy-to-use package.

  9. Firebase Cloud Messaging: Whenever you think of push notifications, think of Firebase Cloud Messaging. Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably send messages at no cost. Using FCM, you can notify a client app that new email or other data is available to sync. You can send notification messages to drive user re-engagement and retention. For use cases such as instant messaging, a message can transfer a payload of up to 4,000 bytes to a client app.

Let's talk about platform SDKs & Frameworks

Firebase supports a variety of platforms SDKs, and Frameworks just to meet your flavor. Firebase doesn’t keep developers “tightly coupled” to just one language, framework, platform, or SDK. The tool is like — “Don’t worry dude, I’ve got you covered. Just come as you are, and we will serve you”😂.

Firebase supports Android, iOS, web, C++, Unity, NodeJS, Java, Python, and Go making things easy and flexible for developers to use irrespective of their preference.

Firebase has multiple SDKs which are categorized into two — Client SDKs and Admin SDKs.

Client SDK is a powerful toolkit designed to seamlessly integrate various functionalities offered by the Firebase platform into your client-side applications. These applications typically run directly on user devices, like smartphones, tablets, or computers in web browsers.

The following are the available Client SDKs:

On the other hand, Firebase Admin SDK allows server-side applications to interact with various Firebase services like Realtime Database, Authentication, and Cloud Functions for management and data access.

Similarly, these are the available Admin SDKs:

Also, there are other libraries and tools to simplify common Firebase tasks and integrations. The following are available, you might want to look them up:

  • FirebaseUI: An open-source library of UI components for various Firebase features.

  • GeoFire: An open-source library for Firebase Realtime Database that adds support for geospatial querying.

  • FirePad: An open-source library to add a shared editor to a web app.

  • Firebase Import: A utility that helps import large JSON files into Firebase Realtime Database.

Let’s talk about the various Frameworks Libraries — things are getting easier and easier.

Below are libraries for binding Firebase to popular development frameworks. While the Firebase team recommends these libraries for developers looking to bind Firebase to their favorite frameworks, these are not official Firebase SDKs and are not covered by Firebase support. Therefore, if you need support using these libraries, file issues directly on GitHub.

  1. AngularFire: Angular bindings for Firebase. (Link to doc)

  2. EmberFire: Ember bindings for Firebase. (Link to doc)

  3. FlutterFire: Flutter bindings for Firebase (Link to doc)

  4. ReactFire: React bindings for Firebase (Link to doc)

  5. React Native Firebase: React Native bindings for Firebase (Link to doc)

  6. RxFire: RxJS bindings for Firebase (Link to doc)

  7. Vuefire: Vue bindings for Firebase (Link to doc)

To ease communication with the Firebase console from your local dev environment, Firebase has a command-line tool for you. It provides a variety of tools for managing, viewing, and deploying to Firebase projects. Don’t worry, it works on Windows, Linux and, macOS. Learn more about setting it here

Enough of the rabbit hole details, where do I get started?

Getting started is a breeze irrespective of the framework, platform, or SDK you are using. Let’s see how easy it is then 🎉.

  1. Install Firebase CLI for your OS. Installation Guide

  2. Access your Firebase console using your Gmail account. Click here

  3. Create a new project in your Firebase console — follow the guide in the console.

  4. Add Firebase to your project — the project on your local dev environment. Follow this example guide using Flutter. Add Firebase to your Flutter app (google.com).

  5. Select the framework of your choice and follow the instructions to add Firebase to your app.

  6. And that’s it! You can start using the various Firebase services like authentication, storage, etc. in your app.

  7. Make sure you make use of the documentation.

Okay, now I understand Firebase theoretically, what’s next? You’ve guessed it right! Start building something - the fastest way to learn!

But how? The documentation again! There are countless codelabs and resources for Firebase, just check it out.

Further, the Firebase YouTube channel got you covered! One of the fastest ways to learn any technology, and Firebase is not an exception is through tech communities. You can join the Google Developer Student Club in your school, the Google Developer Group in your city, or any Firebase community community where you can network with other lifelong learners and grow.

Feel free to reach out to me if you want or need help — I would love to support you.

Conclusion

Firebase is awesome and the team at Google is concerned about our(developers) — struggles, that’s why Firebase keeps getting better. Hopefully, this article has touched on most of the major concepts of Firebase but there is a lot more that Firebase can do that wasn’t mentioned here. If I could cover everything, this would have been a book 😂.

Feel free to leave a comment or ask question. You can also share your thought about Firebase if you want to in the chat.

All the best!