WindSekirun / RxSocialLogin

An Android Library that provides social login for 15 platforms within by RxJava2, Kotlin and Firebase Authentication.
Apache License 2.0
125 stars 19 forks source link

A small concern - initialization of necessary objects at once ..? #29

Closed WindSekirun closed 5 years ago

WindSekirun commented 5 years ago

Affect Version: ??

At this time, user(developer) will initialize 'Social module object' in Activity as count of the platform to use. But we think there are some tiresome of initialize all of module object in one code.

'Initialize in RxSocialLogin' is solution to solve this 'tiresome', but there are so many changes of achieve this solution.

First, we need to remove verbose of RxSocialLogin object by remove their roles.

There some roles which RxSocialLogin have.

  1. Abstract class of ‘Social module object’
  2. Provide helper methods
  3. Manage Config object of ‘Social module object’

So, we can remove first roles by divide to BaseSocialLogin object and make ‘RxSocialLogin` is kotlin object class. Other roles are proper roles of new ‘RxSocialLogin’ object, so we can retain them.

Most important thing of this changes is reducing ‘breaking changes’ while version migration. So, we have to change internal logic, not outside logic.