Android and Web Services
Google recommends using RESTful Web services.It increases performance. Because REST defines architectural design that focuses on system’s resources.
REST Web service follows four basic design principles
- USE HTTP methods explicitly. CRUD operations should have one -to-one correspondance with HTTP supported operation i.e, GET, POST, PUT & DELETE.
- To create a resource on the server , use POST.
- To retrieve a resource, use GET.
- To change the state of a resource or to update it, use PUT.
- To remove or delete a resource, use DELETE
- Be stateless ( it improves performance by saving bandwidth and minimizing server side application state).
- Expose directory structure-like URIs. The structure of a URI should be straightforward, predictable, and easily understood.