Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Firestore anytime soon? #507

Closed
d3mac123 opened this issue Oct 3, 2017 · 11 comments
Closed

Firestore anytime soon? #507

d3mac123 opened this issue Oct 3, 2017 · 11 comments

Comments

@d3mac123
Copy link

d3mac123 commented Oct 3, 2017

Super excited with the new Firestore announcement. Any plans already?

@EddyVerbruggen
Copy link
Owner

Can you elaborate on what that would entail exactly?

@d3mac123
Copy link
Author

d3mac123 commented Oct 3, 2017

Today Google's announced (in beta) Firebase Firestore, the future replacement of Realtime Database, allowing better querying, large datasets, etc. https://techcrunch.com/2017/10/03/google-launches-cloud-firestore-a-new-document-database-for-app-developers/

@EddyVerbruggen
Copy link
Owner

Oh boy. They never stop, do they?

@d3mac123
Copy link
Author

d3mac123 commented Oct 3, 2017

What amazes me is the fact you, alone, seems to work more than them :)

@jlooper
Copy link
Contributor

jlooper commented Oct 3, 2017

I'm actually really excited for FireStore. I think it will remove some of the awfulness of querying in its current state. I'd be up to help test out any changes you make in the database, but I suppose we'd have to keep the old database queries in place and somehow enable 'firestore' in the pre-install script. Anyway it's in beta, so we can try it out. Excited! This is a big enhancement!

@EddyVerbruggen
Copy link
Owner

Hey @jlooper, exactly, those need to coexist. Those Firestore-related features need to be nicely bundled in their own namespace, and it would indeed be something we'd want to add to the installer as it's yet another Pod/jar that will get added to the project.

It all doesn't look too complex and API-wise it's quite similar to what we already have (still, a lot of work). Perhaps we can experiment with Observables instead of callbacks even.

I think it would be best to add a few features to get our feet wet (basic CRUD) and expand on that (Queries, whatnot) once that's solid x-platform.

@mutazmq
Copy link

mutazmq commented Oct 12, 2017

Made a quick test with nativescript-nodeify and npm install firebase@4.5.0 --save but it seems there is a websocket dependency on the browser.

Error: com.tns.NativeScriptException: Failed to find module: "websocket-driver", relative to: app/tns_modules/

@Sopamo
Copy link

Sopamo commented Oct 15, 2017

I'd kindly like to ask if you already have a timeframe for this feature - or if we could do something to help. Do you have a specific plan in mind yet for firestore?

@EddyVerbruggen
Copy link
Owner

Hi @Sopamo, I think I'm going to restructure the plugin repo a little before adding more features. For instance inline the demo app and make a start with TypeScript conversion. That should not result in a version bump because I don't want to change the API. Should not take too long because I'm not doing a complete TS rewrite just yet.

Then I can add the Firestore API in TS directly. I just don't want to add that to the pile of maintenance debt ;)

@EddyVerbruggen
Copy link
Owner

The TS conversion is done (at least, the most important bits, which surfaced a few little bugs), and the demo app has been converted and inlined into the repo as well.

Publishing 4.2.0 now. I hope to get some work done on Firestore soon.

@EddyVerbruggen
Copy link
Owner

EddyVerbruggen commented Nov 24, 2017

Hey friends, I've just added the first few methods for Firestore locally and plan on releasing it with plugin version 5.0.0 next week.

I'm also making this feature compatible with the web API so switching back and forth should be easy. That should also help to share code between web and native.

Checklist for the Firestore features I'd like to add to 5.0.0 (Web API function names):

  • Create a new (Angular-based) demo app because Firebase DB and Firestore can't coexist in 1 project. The old demo app will still be used and updated btw.
  • Add Firestore to the installer. Defaults to regular Firebase DB if not selected, and the Firebase DB Pod/jar is not added to the project in case Firestore is selected.
  • option to disable offline persistence (enabled by default)
  • firestore().collection(path: string)
  • firestore().collection(path: string).get()
  • firestore().collection(path: string).add(data: any)
  • firestore().collection(path: string).doc(path?: string)
  • firestore().collection(path: string).doc(path: string).get()
  • firestore().collection(path: string).doc(path?: string).set(data: any, options: SetOptions)
  • firestore().collection(path: string).doc(path: string).update(data: any)
  • firestore().collection(path: string).doc(path: string).delete()
  • firestore().collection(path: string).doc(path: string).onSnapshot(doc => void)
  • firestore().collection(path: string).where(path: string, opStr: filter, value: any)
  • firestore().collection(path: string).where(path: string, opStr: filter, value: any).get()
  • firestore().collection(path: string).where(path: string, opStr: filter, value: any).where(..)
  • firestore().collection(path: string).where(path: string, opStr: filter, value: any).orderBy(..)
  • firestore().collection(path: string).where(path: string, opStr: filter, value: any).limit(..)
  • Document these babies

EddyVerbruggen added a commit that referenced this issue Nov 26, 2017
EddyVerbruggen added a commit that referenced this issue Nov 26, 2017
@EddyVerbruggen EddyVerbruggen added this to the 5.0.0 milestone Nov 26, 2017
EddyVerbruggen added a commit that referenced this issue Nov 26, 2017
EddyVerbruggen added a commit that referenced this issue Nov 28, 2017
EddyVerbruggen added a commit that referenced this issue Nov 28, 2017
EddyVerbruggen added a commit that referenced this issue Nov 28, 2017
EddyVerbruggen added a commit that referenced this issue Nov 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants