Need sample Android REST Client project which implements Virgil Dobjanschi REST implementation pattern

后端 未结 8 670
醉梦人生
醉梦人生 2020-12-04 05:11

I want to build a REST Client on an android phone.

The REST server exposes several resources, e.g. (GET)

http://foo.bar/customer      List of all cus         


        
8条回答
  •  南方客
    南方客 (楼主)
    2020-12-04 05:25

    We have developped a library that adresses this issue : RoboSpice.

    The library uses the "service approach" described by Virgil Dobjanschi and Neil Goodmann, but we offer a complete all-in-one solution that :

    • executes asynchronously (in a background AndroidService) network requests that will return POJOs (ex: REST requests)
    • caches results (in Json, or Xml, or flat text files, or binary files)
    • notifies your activities (or any other context) of the result of the network request if they are still alive
    • doesn't notify your activities of the result if they are not alive anymore
    • notifies your activities on their UI Thread
    • uses a simple but robust exception handling model
    • supports multiple ContentServices to aggregate different web services results
    • supports multi-threading of request executions
    • is strongly typed !
    • is open source ;)
    • and tested

    We are actually looking for feedback from the community.

提交回复
热议问题