Android Core Proposal Merged (and some follow up goals)
by David Martin
After a massive 100+ comments, I've decided to merge the Android Core SDK
* Android Core SDK is available from Maven:
* Repo: https://github.com/aerogear/aerogear-android-sdk
* Example Android App that uses the core SDK:
* What you need to add to your gradle file:
The amount of comments, calls and back&forth on irc has reached a
reasonable level of agreement, with some remaining points of contention.
The contention is mainly around the level of complexity that a developer
has to undertake to use the SDK.
After listening to the 3 main voices on this (Summers, Wojciech, Passos), I
can see both points of view.
(WARNING: A lot of paraphrasing below :) )
>From Passos & Wojciech's point of view, ease of use of the SDK is what's
most important. There should be practically no setup/init required other
than having a mobile-config.json file in the right place, and call a static
method to get an instance of a service (similar to Firebase).
>From Summers point of view, ease of use is also important, but something we
can improve on iteratively. For example, the default use of a Service will
be fine & possible to automate the setup for for 95% of cases. However, the
other 5% is what we need to take into account from the beginning.
So, based on this, I would like if the following 2 things were follow up
goals for the Core SDK.
I believe these changes will take whats currently there (and working), and
move it towards something that is easier to use for developers.
Remove the need for static block initialisation/registration of service
classes & their dependencies. i.e. this:
>From chatting with Summers, this should be possible now that this PR is
merged https://github.com/aerogear/proposals/pull/16 and the config file
format is nailed down.
Allow a simpler way of getting an instance of a Service class other than
keycloakService = core.getService("keycloak", KeyCloakService.class);
If there are multiple instances registered for a particular Class, it may
still be necessary to use the above to get a 'named' instance (much like in
dependency injection libs like spring that use annotations).
However, in most cases, the below should be possible:
keycloakService = core.getService(KeyCloakService.class);
Red Hat Mobile
IRC: @irldavem (#aerogear)
5 years, 1 month