Android Webservice Tutorial
In this post, I will walk you through the importance of using Web Service in Android applications.
- What is Web Service?
- Why Web Service?
- What is the need of using Web Service in Android applications?
- Android Web Service Tutorials
What is Web Service?
A web service is a standard used for exchanging information between applications or systems of heterogeneous type. Software applications written in various programming languages and running on various platforms can use web services to exchange information over Internet using http protocol.
Why Web Service?
Here are the reasons for using Web Service:
- Expose method as a service over network:
- Application Inter-operability – Connect heterogeneous applications:
- Standardized protocol:
- Cost effective communication:
Web service is a chunk of code written in some programming language (Say C# or Java) that can be invoked remotely through http protocol. Once the Web methods are exposed publically, any applications can invoke it and use the functionality of the web methods.
With the help of web service, heterogeneos applications (Java and Dot Net / Java and PHP application) can communicate with each other. Web service written in Java can be invoked from PHP by passing the required parameters to web methods. This makes the applications platform and technology independant.
Web Services uses standardized industry standard protocol for the communication which must be adhered and followed by the applications creating Web Service.
Web service is using SOAP over HTTP protocol for communication which is much cheaper than systems like B2B.
What is the need of using Web Service in Android applications?
Existing Web applications are in a need of creating mobile applications to show their presence in mobile platform as well. Almost all web applications are having their Mobile applications created in Android, iOS or Windows platform.
Exposing the existing functionalities of the applications is bit tough as all the functionalities have to re-written in the respective platforms.
But it can be easily achieved with much ease by creating Web Service and expose the existing functionalities as web methods to Mobile platforms.
Here are the few advantages of using Web Service in Android:
- Make client more lightweight:
Adding a web service layer makes the client more lightweight, both in terms of the required CPU power and the bandwidth used during the processing. Most of the processing to be done in client end can be separated and put inside a web service layer which will be extremely helpful for end-users in terms of:
- Using less CPU increases the battery life
- Using less bandwidth reduces monthly payments over data charge
While designing the web service, we could also get significant benefits by reusing the existing functionalities by exposing them as web methods.
DB residing remotely can be hit from inside Android applications through Web Service calls.
Making Web Service call from Android applications allows us to add functionality outside the scope of a DB like caching data, applying business rules over the data etc.,
Android Web Service Tutorials
In Android Tutorial Blog, we are writing lot on how to use Web Service in Android applications.
Here are the quick links to our Android Web Service tutorials:
Simple Android Webservice Example
How to call Java web service in android
How to call asp.net web service in android
Android JSON Web Service Tutorial
Authenticate Users using Java Web Service
Authenticate Users using Dot Net Web Service
Help us by sharing this article with your friends and colleagues.
Keep us informed with your valuable feedback and comments right away from here.