Android, one of the most popular operating system's now available for mobile phones and tablets. It has a linux based kernel and this operating system was initially backed up by Google and later it bought the OS in 2005 and has been deploying into the market since then with the latest features. The first version of the android OS was called "Astro" and since then it has released 8 new versions till date. These version code names are all inspired by food products, they are Cupcake, Donut, Eclair, Froyo, Gingerbread, Honeycomb, Icecream sandwich and the latest one Jelly bean.
The applications developed for the android have been a major hit. Applications are usually designed so that a server provides a specific service to the client or to the consumer. Generally, when we download any application on the android OS from Google play, which is the home to thousands of applications, we utilize the web services and then make XML-RPC services between the client and the server. This allows for exchangeability and also expansibility over an extended range of clients.
So, how is an android client server communication set up in the first place? This can be explained with a very simple example of running an image processing application on a server from an android device. The device user would first click an image with the device's camera and send the image to a server via HTTP. A PHP server would then run the application on the server side to compute SIFT on the image. Once the computation is done, the server would return the result to the Android device for display which the client views it on his/her screen. This is basically how an android client server communication is setup and the same process can be applied to many other applications based on the same.
This communication can be done with different implementations, namely – SOAP, Servlet, and JSON. SOAP, expanded as Simple object access protocol is designed to provide a very light weighted mechanism to exchange data in XML format. Servlet is known to be the most simple and easiest way to exchange data by HTTP using Java. It cuts down a lot of time as there is no requirement of serializing either from or to XML. JSON, Javascript object notation is a light weight data interchange format, so it utilizes the features of both SOAP and Servlet.
Once the programming is done, the server code needs to be tested. This can be explained with the same example of image processing already mentioned above. The test image can be uploaded using any internet browser in JPEG format. If the server scripts are setup successfully then an output image with SIFT keypoints annotation will be downloaded immediately to the same server. Once the image is displayed with these keypoints annotation, then it implies that the android client server image processing system has been built successfully and it can be deployed for the consumers use.
This example enacts and signifies how easy it is to setup an android client server based application and the same protocol can be followed for any type of application pertaining to the fact that minor or major programming changes might occur and it depends on the programmer's skill and the consumer's requirement.
Tidak ada komentar:
Posting Komentar