Is it possible to access the same Firestore collection from both mobile and desktop applications?

Viewed 81

I have to deal with a project for which the business needs require a mobile application--built in Flutter; and a desktop application--C# Windows Form App. Both modules are meant to be accessing same collections in the Firebase Firestore, any hints on how it can be achieved? Is there any better alternative for Firestore regarding this use case?

3 Answers

Yes, it can be achieved, but be careful of editing the same document from different devices at the same time, or you will lose data.

Collections are fine.

I would suggest using a library like FireSharp or something else.

FireSharp

Your biggest problem will be the update on documents if your application will support multi users.

Additionally, I would use a JSON Library like NewtonSoft.

NewtonSoft Libary

Take a look at the documentation from Google:

Google Documentation

An alternative could be a SQL Server where you flutter app and the c# app access. But Firebase is easier to implement in flutter ... but you need to know if your Database should be SQL, or NoSQL (Firebase).

You can add a web app in the same Firestore project and both mobile and web will access the same collections. Go to project overview --> project settings and choose add app. From there you can add your web app. click on Add app button

The other option you have is to switch to another database solution like mySQL.

Related