Closed d3mac123 closed 6 years ago
Can you elaborate on what that would entail exactly?
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/
Oh boy. They never stop, do they?
What amazes me is the fact you, alone, seems to work more than them :)
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!
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.
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/
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?
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 ;)
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.
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):
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(..)
Super excited with the new Firestore announcement. Any plans already?