-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Align syntax with firebase/firebase-dart where possible (firestore) #16
Comments
Thanks for bringing this up. I agree that it would make more sense if Firestore libraries shared common interface. Note that there is also cloud_firestore package for Flutter which also uses it's own interfaces. I used the Flutter package interface as a reference in some cases. For instance the Though I must admit I didn't follow through there. I can imagine we'd need some sort of This would definitely be nice to have. But we need collaboration with authors of other libraries in order to achieve this. I'm gonna try and ping @Janamou @kevmoo (Firebase Web) and @kroikie @collinjackson (Flutter) to hopefully get some input on this. |
I'd love to align here, too. I pondered for a while creating a "mono repo" for https://github.com/firebase/firebase-dart – to separate out the VM vs browser libraries. That could also let us create a "core" or "interfaces" package we could share. Sadly, I have very little time to work on such things... |
The underlying native APIs (Web, Node, Flutter) are still in flux (There are almost 3 different SDKs for javascript: browser, Node.js, admin sdk) and some features are different ( I have my opiniated abstraction layer that tries to sanitize the API if you need something right now (Flutter untested and still missing important feature like startAt(snaphot) and FieldValue) for now mainly firestore oriented, undocumented... |
you might be interested in this thread flutter/flutter#16186 . Also leaving this here as a cross reference. |
Here's one more example of a mismatch. Use In AngularDart: |
This is more of a discussion issue ;)
I'm using Dart on the client (AngularDart) and on the backend (cloud functions). Sometimes I want to try a functionality on the client and also on the backend and see what works best.
For this I have to rewrite the firestore code since there are some minor differences between your code and the code in the client library.
Here is an example of a query in firebase-dart:
where as in firebase-admin-interop a query looks like this:
There are many other differences especially with DocumentData where your interop library adds more type safety whereas firebase-dart uses only Maps with dynamic values.
Adding documents in firebase-dart:
in firebase-admin-interop:
It would be great if we could have some common API and only swap the implementation when needed. Also great for code reuse.
What do you think?
The text was updated successfully, but these errors were encountered: