[aerogear-dev] Android: some questions

Matthias Wessendorf matzew at apache.org
Sat Sep 15 06:12:27 EDT 2012


Howdy!

I took a quick look at the Android API. Below are a few questions:

* AeroGear.java
- Is the class 'just' a util, that offers static methods? If so,
should have a private ctor and be final (since a private default ctor
prevents inheritance anyways)
- is the API_KEY really needed? Not sure, but I think that (the
API_KEY) is _perhaps_ something on-top of a networking client lib,
needed when entering the real 'BaaS' market, where our lib. is used
against a (specific) 'backend provider'.

* Utils.java
- related to the API_key, I think the X-AeroGear-Client header needs
to be defined/discussed - but IMO the AeroGear client lib should work
also without such a key, when accessing a simple JAX-RS (read:
RestEasy) service; Of course, when 'cloud provider' start using our
bits, something like API_KEY is a must.
- the 'delete' is public; the others (e.g. post) not...

* Pipe.java
- how to update an existing item?
For instance in JS/iOS we use save which does an 'add' if there is no
_id_ or issues an 'update' if the entity already exisits (e.g. has an
_id_).

There is no concept of a 'pipeline', but I guess (at least for now) on
"Java" (aka Android) a typed list (e.g. List<Pipe> pipeline;) is good
enough, right?
But on the other hand, than it's up to the user of the api to 'manage'
all the pipes (server connections).

Cheers,
Matthias

-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf


More information about the aerogear-dev mailing list