cordova-plugin-firebasex icon indicating copy to clipboard operation
cordova-plugin-firebasex copied to clipboard

[FEATURE] Breakdown this plugin into logical modular plugins

Open dpa99c opened this issue 5 years ago • 12 comments

The current codebase inherited from arnesson/cordova-plugin-firebase consists of a monolithic codebase, encompassing many different components of the Firebase SDK in a single plugin.

This means plugin users are often including components of the Firebase SDK they don't wish to use and are affected by bugs in functionality they are not using. It also means the plugin is harder to maintain and add new functionality to.

The ideal solution would be to break down this plugin into a suite of interdependent plugins.

For example:

  • cordova-plugin-firebasex-core would contain the code to configure the Firebase SDK for the app and be depended on by all other plugins in the suite
  • cordova-plugin-firebasex-cloud-messaging would contain all the code specific to receiving and displaying notifications
  • cordova-plugin-firebasex-auth-core would contain the central functionality related to Firebase Auth (getting user info, signing out current user, etc.)
  • cordova-plugin-firebase-auth-facebook would contain the functionality for signing into Firebase via Facebook such as pulling in the Firebase SDK dependencies.

Once the current functionality of this plugin had been refactored into the suite of micro-plugins, this plugin would be deprecated in favour of the new approach.

dpa99c avatar Jan 29 '20 11:01 dpa99c

I really support this. My app is fairly using only fcm services. Used this plugin about a year ago since fcm plugin was breaking the app. Now I guess firebase has been updated or idk but this plugin is breaking my android build and I can't even understand why...

JoseGeorges8 avatar Jan 29 '20 15:01 JoseGeorges8

I would highly appreciate this too, as I also only need FCM...

unfortunately I can't help you much, because I don't have much cordova, nor firebase skills, but maybe you can work together with chemerisuk

https://github.com/chemerisuk?tab=repositories as he did something similar already

m0dch3n avatar Feb 11 '20 08:02 m0dch3n

@dpa99c I agree with people. Don't reinvent the wheel. Write me an email so we can discuss how to join forces.

chemerisuk avatar Feb 23 '20 07:02 chemerisuk

@chemerisuk I'm happy to collaborate on this - I see no reason to create new set of micro-plugins if the existing functionality present in this one can be merged into your existing ones.

I can't find an email address for you though so email me at [email protected]

dpa99c avatar Feb 23 '20 09:02 dpa99c

@dpa99c just sent, check on your side.

chemerisuk avatar Feb 23 '20 17:02 chemerisuk

@dpa99c & @chemerisuk so any news? which plugin should I follow in the future for fcm?

m0dch3n avatar Feb 29 '20 06:02 m0dch3n

@m0dch3n we had a call with @dpa99c and agreed to migrate the fork to the set of firebase plugins from https://github.com/chemerisuk?tab=repositories. At present this fork contains some features that are missing, so deprecation process will start as soon as all needed features will be implemented. I can't give any promises because both myself and Dave do not have enough free time on that work currently.

As for now if you don't need some extra features provided by this fork - grab appropriate firebase plugin from https://github.com/chemerisuk?tab=repositories

chemerisuk avatar Mar 04 '20 11:03 chemerisuk

Hi Guys (@dpa99c & @chemerisuk),

I always keep an eye on both of your plugins and the effort you guys are putting in to help the open-source community. I must say -

YOU GUYS ARE DOING TREMENDOUS JOB IN TERMS OF MAINTAINING THESE FIREBASE PLUGINS.

Hats off to both of you 👏

sagrawal31 avatar Mar 17 '20 07:03 sagrawal31

Hi.

You know how will do this? Because I have a lot of new features to implement, but I don't know if I can send the push request to here or change to the new way.

Thanks

ianitsky avatar Sep 01 '20 20:09 ianitsky

And if we continue using the firebasex as main core and create others new plugins (break changes) that extends the firebasex.

package org.apache.cordova.firebase;
public class FirebasePluginFirestore extends FirebasePlugin {
    ...
}

We can easy create the plugins on this way without modifying much the main core.

We can start with InAppMessaging to remove the -cli branch.

If you create a new repo "cordova-plugin-firebasex-inappmessaging" I can fork them and help you with the code.

ianitsky avatar Sep 02 '20 16:09 ianitsky

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 12 '21 14:05 stale[bot]

Reopening as stalebot incorrectly closed it

dpa99c avatar Jul 23 '21 11:07 dpa99c