I am going to have to watch these videos. Working on some REST calls for my
services to provide an Android SDK for developers to use.

Speaking of making REST calls, I am curious, for those of you doing RESTful
calls, are you making use of the HATEOAS concept, where by you call a single
public URL, which returns a list of links to resources that you can then
make use of.. and thus your client rest calls follow the links just as if a
web browser were doing so with html and a user clicked links that came back?
I am setting up my service to be a true REST service, where by the initial
call would be to a single point of entry, and the response will provide
related links (in the case of the initial URL, the links are those of all
available resources at that point).

I am asking because while this seems to be the correct way to work with REST
calls, it seems many just find specific resources to call directly and
ignore any sort of relative link relationship to follow to get to the
resource. For example, you might make the initial service call, get links
back that allow you to work with a shopping cart resource, an account
resource, and a payment method configuration resource. The next call you
make should be one of those three resources, most likely with a OPTIONS
method type to figure out what you can do, be it GET, POST, etc.

Anyway, just curious if you guys/gals are using REST in this manner, or if
not, how a typical REST call scenario goes for you.

Thanks.


On Tue, Jun 8, 2010 at 10:28 PM, schwiz <[email protected]> wrote:

> wow great video, although I really wish he had some example code to
> look at I get the general idea but now I feel like I have a schematic
> for a wheel...  Anyone know of any open source projects (twitter app
> when are you coming?!?!) that use any of these techniques?
>
> On Jun 8, 10:35 am, Andrew Brampton <[email protected]> wrote:
> > I've watched many of the Google IO talks and one that I'm trying to
> > reproduce is "Developing Android REST client applications"[1]. In this
> > talk Virgil suggests you should not execute your RESTful queries
> > inside a Thread/AsyncTask spawned from your Activity (which I had been
> > doing), instead you should use a more complex architecture that uses a
> > combination of a ContentProvider and a Service.
> >
> > From what I understood the reason for this design was so your data was
> > more persistent between app restarts, and so your queries don't
> > disappear if your Activity starts/stops (e.g on a screen rotation). I
> > buy into both those reasons hence I'm trying to implement this.
> >
> > On the slides[2] page 45 We have an Activity calling a
> > ContentProvider. Now the ContentProvider checks its local database, if
> > the content is not there it sends an Intent to a service which fetches
> > the content, inserts it into the ContentProvider, then the
> > ContentProvider calls back to the Activity (with a ContentObserver)
> > and the Activity can carry on. The question I have is how is this
> > callback setup. The ContentProvider exposes simple methods, query,
> > insert, update, delete which don't seem easy to adapt to a callback
> > interface.
> >
> > It could be implemented by a Cursor which is designed to block, but
> > that could be problematic as you don't' want to block your UI Thread.
> > I'd appreciate if anyone could make this clearer to me, or show me
> > some code. I'm hoping the Twitter app will be open sourced soon which
> > apparently uses this architecture.
> >
> > thanks
> > Andrew
> >
> > [1]
> http://code.google.com/events/io/2010/sessions/developing-RESTful-and...
> > [2]
> http://dl.google.com/googleio/2010/android-developing-RESTful-android...
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to