Why Firestore, Part I: reasons to love it

Firestore & Firebase suite are great technologies. They allow us to build some features really fast. Showing your stakeholders that you’ve built real-time, collaborative features in almost no-time gets you the “wow effect”, so needed in some fields. However, Firestore has also many pain points that, in my opinion, outweigh the pros in most of the more advanced cases.

This is a series of articles where we are comprehensively describing pros and cons of using Firestore as the backend for your next mobile application. In this series, we will try to show you that making this decision is not a simple process and you need to analyze your app from multiple perspectives.

Posts in the series:

  1. Why Firestore, Part I: reasons to love it [you are currently reading it].
  2. Why Firestore, Part II: reasons to hate it [LINK]
  3. Why Firestore, Part III: 6 things you need to know before using Firestore [LINK].
  4. Why Firestore, Part IV: how to escape it [LINK].

Is Firestore appropriate for you? As with everything in IT - it depends. Read on to find out why!

Easy to integrate

Firestore has outstanding libraries for mobile. Android (Kotlin!), iOS (Swift!), Flutter (Dart!) - every one of them works magically. For free you get services that complement each other with ergonomic and easy to bootstrap libraries. With Firestore libs you get all the goodies of Firebase suite - auth, serverless, storage, ML and others perfectly blended with the language specifics.

Kotlin, Swift, Dart

The only bad thing about it is that they are pervasive - once you get them, you start using them everywhere. In all layers. Generally, that is a bad thing, but let’s be honest here, most small apps don’t need any additional abstractions and using the libraries directly is a good thing.

Offline capabilities

Cyclist

This is a major trait of Firestore. The truly killer feature - it can work (to some extent) offline. Seamlessly. If you have accessed the data previously, you can do so again without the Internet connection. You can even save the data there without active connection. Firestore libraries handle all the syncing, data merging, notifications and other problems.

You don’t need backend… sometimes

Firebase platform (that Firestore is part of) might be a viable “backend” option for small, user-focused apps. If you use it alongside other SaaS solutions (e-mails, voice calls, etc.), you might be even able to build a not-so-small app without creating any traditional backend system.

Firebase platform

Firebase suite provides you with:

  1. Auth - Firebase Auth.
  2. Storage - Firebase Cloud Storage.
  3. Serverless - Firebase Cloud Functions.
  4. Basic machine learning - Firebase ML.
  5. A/B tests & user-scoped configuration - Firebase Remote Configuration.
  6. App distribution & monitoring - Firebase App Distribution & Crashlytics.
  7. Many, many more.

Being Google’s product, it also integrates well with GCP. It blends with it more and more with every release and I suppose that soon, these two will be fully merged.

Having all these solutions in a single place, governed by the same IAM services and configured the same gives you a great advantage right at the beginning. It allows you to focus on what matters, leaving all the gritty details to Firebase. Even if you end up needing some more advanced backend features, you can always use Cloud Functions and do it the normal way.

Examples

If you need to have offline capabilities, using Firestore for that is also great - we used this approach in Activy and it worked wonders.

Activy- mobile application

We need there to record GPS tracks as reliably as sport devices (e.g. watches), but being a casual gaming app, it needs to do so in very rough conditions without specialized hardware. Jagged GPS signal, no Internet, very slow connection, intermittent Internet connection, apparent connection - all need to be taken care of. With Firestore, we were able to handle all of the cases and give our users a solution that works everywhere, even in very remote areas, without that much of a development. 

There are tons of other places where Firestore is a great solution, but Firestore simplicity can take its toll. Where Firestore shines and simplifies things at the beginning, it can make your hair gray after the application gets complicated enough. As everything in programming - you need to wage pros and cons, consider the future and select what is best for your app

Do you want to find out how the Firestore pricing works or what traps wait for you if you want to properly secure it? Maybe you want to create an auction-based app that requires very fast updates? We learned about this the hard way. Paying thousands for improper usage, breaking live apps because of deployments, overcoming all the shortcomings of Firestore - we’ve been there.

Read the 2nd part of our series on "Why Firestore" to learn about the biggest limitations of Firestore.

Rate this article

No reviews yet!

Read more

Why Firestore, Part II: reasons to hate it

There is a number of limitations that make using Firestore painful. Tricky latency, data migration problems and complicated privacy are just the beginning of troubles. Read the article to find out why!

Why Firestore, Part III:  6 things you need to know before using Firestore

You need to understand the Firestore limitation and how to overcome them before you build your next web or mobile application using native or crossplatform solutions like Flutter, React Native, or Kotlin.

Why Firestore, Part IV: how to escape it

This is our Final article about Firestore! Did you realize that Firestore makes your life more difficult? If you're looking for the way out, in this part we'll show you how to escape from Firestore!

Lessons learned after making the first 10 commercial apps in Flutter.

We are sharing the insights after making the first 10 commercial apps within the last 24 months during which we’ve spent some 17.193,00 hours on Flutter projects.
logo

Case Studies

Technologies

Flutter

.NET Core

Related services

Mobile Apps

IT Consulting

No match for you?

No problem, send us your resume, we constantly look for new talents. Write on office@leancode.pl
logo

We build communities

We start in simple 3 steps

Request the 5-STARS workshop

Discover new ways to build digital product that solves real life problems in just 4h
or send us your brief at hello@leancode.pl