A Breif Introduction to firebase

Yasas Lowe
5 min readMay 13, 2022

--

If you utilise a mobile app to tackle the world’s most pressing issues, you should know about Firebase. Google’s Firebase is a platform for building, improving, and growing mobile apps.

Putting the jokes aside (for now), Firebase is a tool to “create, improve, and expand your app.” This means it covers many services developers would typically have to construct themselves instead of focusing on the app experience. There are also analytics and push messages. Services are cloud-based, so the developer doesn’t have to do anything to scale them.

When I say something is “cloud-hosted,” I mean that Google maintains and runs the whole backend. Firebase’s client SDKs link directly to these backend services, eliminating the need for middleware. So, to query a Firebase database, you usually have to write code in your client app.

Unlike typical app development, which normally entails creating both frontend and backend code. The backend code does everything. The frontend code uses backend API endpoints. However, with Firebase products, the outcome is done on the client, not the backend. The Firebase console allows you to manage these goods.

When you hear this, you might believe your position as a “backend engineer” is going away. “I’m over backends! Now I have to learn frontends!” This isn’t true since certain things should be last. So Firebase allows you to work on the backend of your project when it makes sense. Don’t worry, your job is safe, and I’ll explain later.

You’ll have to read this piece until the conclusion to find out what Firebase isn’t. No skipping! No jokes for you.

Firebase’s offerings can benefit any app. It can only be utilised on a few platforms. Web, Flutter, Unity, and C++ are all supported by Firebase SDKs. Not to mention, an Admin SDK in several languages may be utilised with any backend component.

FirebaseUI is an Android, iOS, and web library built on top of these SDKs. This package contains several useful features for building with Firebase. AngularFire wraps web SDKs so they can be utilised with Angular. They are free. Firebase is open source.

Greta isn’t an “app developer.” No games! Or not. I don’t know. But fun and applications might benefit from Firebase in many ways. Apps with a highly personalised user interface and an aggressive gamification strategy. Despite their differences, Greta and Shawn have some common challenges.

Firebase Authentication handles login and user identification. This product must properly configure other products, especially if you need to restrict user data access (which nearly every app will want to do).

Firebase Authentication is unique because it simplifies secure logins, which are difficult to achieve on your own. Undeniably, the United Federation of Planets wants people to utilise it. Captain Picard of the Federation has something to say about your auth system:

A user’s accounts from several identity providers (such as Facebook, Twitter, Google, and GitHub) may be linked together to create a single account on Firebase Authentication. But I like my definition.

It is a database service. I wrote “realtime, cloud-hosted, NoSQL databases.” Each one has benefits and drawbacks, so you may need to investigate which is ideal. Start with Cloud Firestore since it fulfils most of your needs and can be grown fast. Depending on your app, you may need both.

Technically, Firestore is a Google Cloud offering, not a Firebase one. Why is it in Firebase? Firebase provides SDKs that your mobile app may utilise to access data directly, eliminating the need for middleware. I’ll also mention that other items on this list use Google Cloud.

Before 2014, it was called the “Realtime Database.” People still call Realtime Database “Firebase,” which is incorrect. But that’s wrong, so don’t.

Cloud storage allows you to store many files. No Firebase here; it’s Google Cloud. With Cloud Storage for Firebase, your app may upload and retrieve files straight from your Cloud Storage “bucket.”

Authentication works effectively with all three products because they all provide security rules for controlling data access at the source. This ensures customers can only access data in ways you authorise. This prevents mishaps like the lotus. In an app that needs authentication, the user is given an identifying token that may be used in rules to govern who can access and write data. So, if you save user data, utilise Firebase Authentication with security rules to control access. Firebase may give you a polite reminder if your laws are too lax.

Cloud Functions for Firebase is the only Firebase product that needs backend coding. Backend programming should be run in a restricted environment, in my opinion. It would help if you recruited those backend developers since I said so.

You can accomplish a lot with Cloud Functions. Look at these examples! But let me summarise it this way: A Firebase product (database, storage, auth, etc.) sends an event when data changes. These events trigger your Cloud Functions code.

Firebase Hosting is a secure global CDN (Content Delivery Network). By leveraging servers local to your users, you can swiftly transfer inert material (HTML/CSS/JS/images). It’s easy to set up, and you don’t need to get an SSL certificate.

Cloud Functions are how Firebase Hosting interacts with the rest of Firebase. Firebase Hosting allows you to proxy requests and responses to and from Cloud Functions. Even better, they will save your function replies if you place them upright. How to construct a “RESTful” API!

It allows you to access Google’s massive machine learning knowledge without any prior knowledge. No knowledge of ML; thus, this is amazing! The ML Kit will enable me to detect text, people, and landmarks captured by my device’s camera. And it works on my phone, which has limited computer capacity. You can upload a TensorFlow model for more sophisticated use cases if you know more about machine learning than I do. Firebase’s machine learning plan will be “federated”:

That’s all “build” has to say. It’s complete with valuable tools! But there’s still a lot to cover with Firebase.

Grow is based on Google Analytics for Firebase. Analytics may help you understand more about your users and their habits. You may know your users, where they reside, and how they could use your software when you first publish it. Also, some concepts may not work in real life. To be sure, you need data, which is where analytics comes in.

There’s a lot more to Google Analytics for Firebase than this, but first, it’s essential to define “audience.” In short, an audience is a collection of individuals who have done the same thing in your app or use the same device. You define who can be in an audience, and Analytics figures it out by looking at the stream of events your app generates over time. You may approach them with different Firebase products under the “grow” category by segmenting your audience. Keep in mind who is reading as you go.

Greta’s game is for “level 10 gamers who have bought anything in-game” (core players). Shawn’s social networking software is aimed toward those aged 18 to 24 with at least 50 friends (social young adults). If you create audiences in the Firebase console and update apps to broadcast events, they will start collecting members. Greta and Shawn can then provide information and offers to these groups.

Neither analytics nor forecasts help your app. But when combined with other Firebase “grow” products, they may create some miraculous results! Let’s see.

With Firebase Cloud Messaging, you can deliver push notifications to your app or users. You have two options. First, you may build code on your backend to inform your app when anything changes (for example, a chat room notification). Second, you may utilise the Firebase console to write a message to your users. The second instance, direct user notifications, interests me today.

--

--