A Quick Dive Into Firebae (Firebase)
Tags: firebase, cloud, database
Published: 2019-11-15 22:01:13

Firebase?

More like FireBAE. 

I ❤️ Firebase! (Just in case it wasn't clear.)


<h2>What is Firebase?</h2>

A lot of you have heard of Firebase. Firebase is not just a database; it is <em>way</em> more than that!

Firebase is a web and mobile development platform. It has 18 products and is used by more than 1.5 million apps 😮. Also, it is backed by our friends at Google.

<h2>How can Firebase help me?</h2>

- By building better apps
- By improving the quality of your apps
- By growing your business


<h2>Is Firebase expensive?</h2>

I don't think it's terribly expensive considering all is has to offer. I've built small apps using Firebase and will either use the Spark Plan, which is free, or pay as I go. Often times, it's just a few dollars. 

I'm sure that as the app size increases, so will the cost, but Firebase offers three plans:

- Spark Plan (Free)
- Flame Plan ($25 a month) (Not applicable anymore)
- Blaze Plan (Pay as you go)

For more information on pricing visit:
https://firebase.google.com/pricing

<h2>Firebase products</h2>

- Build your app
- Improve app quality
- Grow your business

<h2>Build your app</h2>

<h3>Realtime Database</h3>

This is one of my favorite products from Firebase and it is the reason I started using it. Thanks to the real time database, I no longer have to write some of my apps using a server and sockets. Instead, I am able to write CRUD operations directly into the realtime database. One cool thing is that the data is hosted in the cloud so there is no need to set up anything on your computer.

One of the coolest features about the realtime database is that you can use it via REST API if you want.

Features:

- Realtime
- Offline support for mobile and web
- Accessible from your mobile or web applications
- The database is easily scalable

<h3>Firestore</h3>

It's another realtime database but on steroids. This database is a NoSQL database and you will feel more familiar with this database if you come from a MongoDB background. What I like about Firestore is that not only is it easy to structure my data, it can perform more complex queries than FireBase, the realtime database.

Firestore database functions with data models by storing your data in documents. Those documents are stored inside of collections. Before Firestore, we only had Firebase (Realtime database). That's when I wasn't sure if Firebase was ready for big applications but with Firestore, I changed my mind. You can now use this DB for a bigger application. 

Features:

- Flexible
- Realtime
- Offline support for mobile and web
- Complex Querying
- Accessible from your mobile or web applications
- The database is easily scalable

<h3>Cloud Storage</h3>

Have you worked with Amazon S3 to store your content like images and videos? Well, Firebase offers a similar product called <b>Cloud Storage</b>. Cloud storage is relatively inexpensive so I would recommend you give it a try.

Features:

- Robust Operations
- Strong security
- High Scalability

<h3>Authentication</h3>

Stop worrying about authentication security in your app. Let Firebase handle this for you. All you have to do is use their SDK and their UI library to allow authentication in your app. 

Firebase authentication supports different types of authentication like email or social media.

Features:

- Firebase UI Auth
- Firebase SDK Authentication

<h3>Hosting</h3>
 
OMG! I love the hosting from Firebase. It's fairly simple! You can easily deploy your app via the command line and it is super fast! Forget about paying for other hosting services that are comparably overpriced.

Features:

- Serve content over a secure connection
- Host static and dynamic content plus microservices
- Deliver content fast (they are not lying)
- Deploy new version with one command
- Rollback with one click

<h3>Cloud Functions</h3>

No server?

No problem. 

You can host your backend code in the Cloud functions. The backend code runs when an event happens in your Firebase app or on an HTTP request. For example, you can setup sendgrid every time a new record gets added to the database to send an email to the users. If you are familiar with AWS Lambdas then Cloud Functions in Firebase won't be hard to try.

Features:

- Zero maintenance
- Integrates with other Firebase products
- Keeps your code private and secure


<h3>ML Kit</h3>

ML? 

What? 

Yep, that's right. One of the products from Firebase is the Machine Learning kit. And the best part? You don't need to be an expert on ML to play with it. Unfortunately, this is only for iOS and Android, not Web...yet.

Features:

- Deploy custom models
- ML on device
- ML in the cloud

<h2>App Quality</h2>


<h3>Firebase Crashlytics</h3>

This feature is super cool. I wish it were available for the web as well. Basically, this allows you to create crash analytics by giving you real-time notifications when something has broken as well as information about how many users are being impacted by this. This product will help you find the issues and will fix them faster.

Features:

- Realtime alerts
- Cures for the common crash
- Integrated with Analytics
- Curated crash reports

<h3>App Distribution</h3>

To make an app successful, you will need to test in more than one device and with more than one user. 

Guess what? 

Firebase can help you achieve this in a faster way with their App Distribution product. This product simplifies the process of distributing your app to test. You can integrate it with the Crashlytics product. Imagine the potential of these two together! 


Features:

- Cross-platform
- Fast Distribution
- Fits into your workflow
- Tester management

<h3>Performance Monitoring</h3>


Thanks to this product, you can see the performance of your app. By using the product, you see the areas for improvement in your code. This product can help you avoid crashes by improving your code quality.

Features:

- Customize monitoring for your app
- Automatically measure app startup time, HTTP/S network requests, and more
- Gain insight into situations where app performance could be improved


<h3>Firebase Test Lab</h3>

How many times has the app worked on your device, but not in another device? 

Probably quite often! Especially with differences in responsiveness, different OS, different browsers, etc.

<b>The Test Lab</b> product can help you test your app in multiple devices and configurations. The results will be logged into your Firebase console. You can see how this can help you save time, money, and avoid bugs.

Features:

- Test Android and iOS apps
- Run on real devices
- Workflow integration

<h2>Grow your business</h2>


<h3>Google Analytics</h3>

Have you ever heard of the awesome product <b>Google Analytics for Web</b>? 

Well, guess what! 

You can use it in your mobile apps and Unity apps as well. Cool, right?

This tool will provide you with analytics based on the usage of your app as well as user engagement.

Features:

- Unlimited Reporting (for 500 different events)
- Audience Segmentation

<h3>Predictions</h3>

This awesome tool uses Machine Learning to make predictions about your app and customize the experience of your app's users. The machine learning part uses your Google Analytics data so they work hand-in-hand. This product can also predict how the user will use your app or even if they are going to stop using it. This can help you keep your customer engaged!

Features:

- Bring the power of Google's machine learning to your data
- Boost conversions through customized user experiences
- Increase retention with smarter notifications
- Create custom predictions
- Big query friendly

<h3>A/B Testing</h3>

Okay Google! Take my money! This product is awesome! 

A/B Testing allows you to run tests in your apps. For example, you can run tests for UI changes, engagement campaigns, and new features. See the potential of this? You can see what people are responding to. This will help you increase the experience of an app which will lead to customer retention and more $$$.

Features:

- Test and improve your product experience
- Find ways to re-engage your users by using the notifications composer
- Safely roll out new features
- Target "predicted" user groups

<h3>Cloud Messaging</h3>

Have you ever wanted to send messages or notifications to your customers? "Hey, new version available. Download now!" Well, you can do so with this product. That's not all! It's also FREE. 

Features:

- Send notification messages or data messages
- Versatile message targeting
- Send messages from client apps

<h3>Remote Config</h3>

Ever wondered why Instagram looks a certain way today and then tomorrow, out of nowhere, it looks different even through you never downloaded a new version? Well, this product can help achieve this. You can update the UI or the behavior of your app without having to publish the changes and without having the customer download a new version.

Features:

- Quickly roll out changes to your app's user base
- Customize your app for segments of your user base
- Run A/B tests to improve your app

<h3>Dynamic Links</h3>


Increase the user experience of your app with this product. This product is very cool for multiplatform apps. For example, if you want to redirect a user to a mobile link inside the iPhone app, you can do this. But if that person is using the web version of the app, you can make sure the link is the one for the web. In a nutshell, the links can be dynamic based on the platform they are using.

Features:

- Set up Firebase and the Dynamic Links SDK
- Create Dynamic Links
- Handle Dynamic Links in your app
- View analytics data

<h3>App Indexing</h3>

App Indexing is an awesome tool that will help you put your app into a Google Search. This tool also helps users go directly to Google search based on the content for which they are searching. With App Indexing, you can allow users to click on the button that appears on the home page of the Google results to install the app directly into their device.

Features:

- Search results
- Installs
- Autocompletions
- Assistant
- Ad targeting


<h3>Invites</h3>

Want to get more people to install your app? Well, <b>Firebase Invites</b> can help you with this. Many of the users who installed it did so because they heard of it through a friend. With this product, you can prompt more people to install your app by allowing existing users to become referrals. This can be done by SMS or email.

Features:

- Rich sharing that's easy for users
- Rich sharing that's easy to implement
- Invitations that survive the installation process

Conclusion:

After reading and learning more about Firebase, I can see how I can improve the workflow and the experience of my app. By making a better app, your number of users will increase and with more users comes increased profit. 

All the products I talked about exist under one suite and are made to work with each other. 

<em>[This Dot Inc.](https://www.thisdotlabs.com) is a consulting company which contains two branches: the media stream and labs stream. This Dot Media is the portion responsible for keeping developers up to date with advancements in the web platform. In order to inform authors of new releases or changes made to frameworks/libraries, events are hosted and videos, articles, & podcasts are published. Meanwhile, This Dot Labs provides teams with web platform expertise using methods such as mentoring and training.</em>