Discussion:
[dart-misc] Cross-platform Firebase with "package:crossfire"
John Ryan
2018-07-11 23:43:39 UTC
Permalink
Hello Dartisans,

We recently published our package we've been using at AppTree for sharing
Firebase code across platforms:
https://github.com/apptreesoftware/crossfire. It's goal is to allow users
to use the exact same code to interact with Firebase on Flutter and the
web.

It uses package:firebase in browsers and the appropriate flutter plugins on
mobile by using the Client / BrowserClient approach taken by package:http.

We're looking for some brave users to give it a try and provide any bugs /
feedback. Fair warning: it only supports a subset of the full firebase APIs
(auth, firestore, and storage for now.)

Happy Firebasing!

- John
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/f8b3d526-7074-49d4-bd9f-6fafc9c2f94a%40dartlang.org.
Anatoly Pulyaevskiy
2018-07-12 01:19:04 UTC
Permalink
Hey John,

Thanks for sharing! Wondering if crossfire provides testing utilities
(mocks or stubs) for Firestore/RTDB for headless testing?

Also there seems to be some work planned on the Dart/Flutter side to unify
the interface, check out this issue if you haven't yet:
https://github.com/flutter/flutter/issues/16186.

One more thing: I've built a couple packages to use Firebase on the server
side (namely firebase_functions_interop and firebase_admin_interop which
wrap official Nodejs SDKs). Do you think crossfire would be suitable to
unify those packages as well?

Best,
Anatoly
Post by John Ryan
Hello Dartisans,
We recently published our package we've been using at AppTree for sharing
https://github.com/apptreesoftware/crossfire. It's goal is to allow
users to use the exact same code to interact with Firebase on Flutter and
the web.
It uses package:firebase in browsers and the appropriate flutter plugins
on mobile by using the Client / BrowserClient approach taken by
package:http.
We're looking for some brave users to give it a try and provide any bugs /
feedback. Fair warning: it only supports a subset of the full firebase APIs
(auth, firestore, and storage for now.)
Happy Firebasing!
- John
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups
"Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/a/dartlang.org/d/msgid/misc/f8b3d526-7074-49d4-bd9f-6fafc9c2f94a%40dartlang.org
<https://groups.google.com/a/dartlang.org/d/msgid/misc/f8b3d526-7074-49d4-bd9f-6fafc9c2f94a%40dartlang.org?utm_medium=email&utm_source=footer>
.
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/CAPe-b2aDiZDJCSznFZKepTs5-k%3Dk9w2X_bitiRg4X3U3bQP0%2Bg%40mail.gmail.com.
John Ryan
2018-07-12 21:48:35 UTC
Permalink
Anatoly,

We currently don't have any Mock implementations of the interfaces defined
in `crossfire`, but would be super useful. I wonder if anyone is working
on this in a different context or if firebase itself has mock
implementations?

It looks like firebase_functions_interop and firebase_admin_interop do not
currently have flutter plugins (the cloud functions plugin does allow you
to call cloud functions, but not deploy them AFAICT) so I'm not sure it
would make sense to unify those features into crossfire.

Let me know if you would like to contribute or have any feedback!
Post by Anatoly Pulyaevskiy
Hey John,
Thanks for sharing! Wondering if crossfire provides testing utilities
(mocks or stubs) for Firestore/RTDB for headless testing?
Also there seems to be some work planned on the Dart/Flutter side to unify
https://github.com/flutter/flutter/issues/16186.
One more thing: I've built a couple packages to use Firebase on the server
side (namely firebase_functions_interop and firebase_admin_interop which
wrap official Nodejs SDKs). Do you think crossfire would be suitable to
unify those packages as well?
Best,
Anatoly
Post by John Ryan
Hello Dartisans,
We recently published our package we've been using at AppTree for sharing
https://github.com/apptreesoftware/crossfire. It's goal is to allow
users to use the exact same code to interact with Firebase on Flutter and
the web.
It uses package:firebase in browsers and the appropriate flutter plugins
on mobile by using the Client / BrowserClient approach taken by
package:http.
We're looking for some brave users to give it a try and provide any bugs
/ feedback. Fair warning: it only supports a subset of the full firebase
APIs (auth, firestore, and storage for now.)
Happy Firebasing!
- John
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups
"Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/a/dartlang.org/d/msgid/misc/f8b3d526-7074-49d4-bd9f-6fafc9c2f94a%40dartlang.org
<https://groups.google.com/a/dartlang.org/d/msgid/misc/f8b3d526-7074-49d4-bd9f-6fafc9c2f94a%40dartlang.org?utm_medium=email&utm_source=footer>
.
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/e4441346-c66e-4ac9-b695-0671dd777177%40dartlang.org.
Anatoly Pulyaevskiy
2018-07-12 22:14:13 UTC
Permalink
John,
do not currently have flutter plugins
Those packages are purely for server side, so they shouldn't need Flutter
plugins. The admin interop package includes complete Firestore interface
similar to those found in firebase-dart for web and cloud_firestore Flutter
plugin (source:
https://github.com/pulyaevskiy/firebase-admin-interop/blob/master/lib/src/firestore.dart
). So it could be potentially standardized to follow the same protocol used
by other platforms. The functions interop package is probably less relevant
here, so I think you're right about it.

firebase_admin_interop and firebase_functions_interop simply bridge the gap
in Firebase support for Dart so that one can write Web (firebase-dart),
mobile (cloud_firestore&co) and server-side applications
(firebase_functions/admin_interop) all in Dart.

I'm not aware of any work planned by Firebase team itself, we're most
likely on our own here.

I will definitely let you know when have some more feedback on crossfire,
just need to find some time to play with it.
For now I'll be following that Flutter issue I mentioned previously and see
what comes out of it.

For me, testing utilities is probably the main missing part right now, so
I'll be exploring it extensively very soon.

Thanks again,
Anatoly
Anatoly,
We currently don't have any Mock implementations of the interfaces defined
in `crossfire`, but would be super useful. I wonder if anyone is working
on this in a different context or if firebase itself has mock
implementations?
It looks like firebase_functions_interop and firebase_admin_interop do not
currently have flutter plugins (the cloud functions plugin does allow you
to call cloud functions, but not deploy them AFAICT) so I'm not sure it
would make sense to unify those features into crossfire.
Let me know if you would like to contribute or have any feedback!
Post by Anatoly Pulyaevskiy
Hey John,
Thanks for sharing! Wondering if crossfire provides testing utilities
(mocks or stubs) for Firestore/RTDB for headless testing?
Also there seems to be some work planned on the Dart/Flutter side to
https://github.com/flutter/flutter/issues/16186.
One more thing: I've built a couple packages to use Firebase on the
server side (namely firebase_functions_interop and firebase_admin_interop
which wrap official Nodejs SDKs). Do you think crossfire would be suitable
to unify those packages as well?
Best,
Anatoly
Hello Dartisans,
Post by Anatoly Pulyaevskiy
Post by John Ryan
We recently published our package we've been using at AppTree for
https://github.com/apptreesoftware/crossfire. It's goal is to allow
users to use the exact same code to interact with Firebase on Flutter and
the web.
It uses package:firebase in browsers and the appropriate flutter plugins
on mobile by using the Client / BrowserClient approach taken by
package:http.
We're looking for some brave users to give it a try and provide any bugs
/ feedback. Fair warning: it only supports a subset of the full firebase
APIs (auth, firestore, and storage for now.)
Happy Firebasing!
- John
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google
Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an
Post by John Ryan
To view this discussion on the web visit
https://groups.google.com/a/dartlang.org/d/msgid/misc/f8b3d526-7074-49d4-bd9f-6fafc9c2f94a%40dartlang.org
<https://groups.google.com/a/dartlang.org/d/msgid/misc/f8b3d526-7074-49d4-bd9f-6fafc9c2f94a%40dartlang.org?utm_medium=email&utm_source=footer>
.
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups
"Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/a/dartlang.org/d/msgid/misc/e4441346-c66e-4ac9-b695-0671dd777177%40dartlang.org
<https://groups.google.com/a/dartlang.org/d/msgid/misc/e4441346-c66e-4ac9-b695-0671dd777177%40dartlang.org?utm_medium=email&utm_source=footer>
.
--
For more ways to connect visit https://www.dartlang.org/community
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/misc/CAPe-b2ZRt2dLd1XYXPin55zVfScCqVRG7geBr_v4HA6rh26GYA%40mail.gmail.com.
Loading...