Martin Koel wrote:Many of the most interesting Android applications rely heavily on communication with a server back-end.
I was wondering what would be a good design for client-server communication.
This is a broad question. It really depends on the requirements.
There're numerous options out there:
RESTful web services (can be fairly lightweight and allow for different client types, incl. mobile devices) - I recommend using JAX-RS API and particularly its reference implementation Jersey. Also, there're several APIs that introduce specific semantics on top of RESTful design. XMPP and APP (Atom Publishing Protocol) are examples of RESTful API design.SOAP web services (much more robust, interesting for enterprise applications which might involves complex policies) - there's a variety of Java libraries for supporting SOAP-based web servicessocket-based communication (can be implemented to involve less message-processing overhead; many message encodings are possible, I recommend Google Protocol Buffers -
Furthermore, Client-server communication can be wrapped inside a library which abstracts out the actual network communication and makes it easier to connect different kinds of clients.
For development of client-server communication with Android OS on client side, I would recommend
Google Data APIs where you can access Google cloud to read their data and store (some of) your data.
I hope this helps.
Cheers!
Shonzilla