You are on page 1of 4

Q1: Xml is use for data exchange among web applications in a platform independent way.

What are the


other technologies which are used for the same purpose? Find a tutorial example of one of those.

Answer:

The messages over web service can travel different programming languages, firewalls, operating
systems. Communication over web is possible via web services. Web service is a set of open protocol,
that are developed to interchange data between web applications and computer systems. Many
software applications built-in various programming languages on different operating system can use
web service. There are various languages other than XML that can be use as a link between client and
web server.

Some of them are listed below:

JSON: JSON abbreviation (JavaScript object notation) is a light-weight data interchange language. JSON
helps machine to easily parse data. As you know that only text can travel between Browser and server,
SO that’s why JSON in the text format. We initially translate JavaScript object to JSON and then it can
send to the server. W can also convert vice versa. It is derived from Java Script programming language.
JSON uses conventions of C, C++, CSharp, JavaScript, Python, Perl and so on.

Example:

“Name ” : ” Nuzairah”

“Father name ”: “ Hussain Ali”

“Registration No” : “MSIT-2K19-25”

Yaml: Yaml abbreviation(yet another Markup language )is a human readable language as well
as data serialization language that is easier to edit with the text editor. It basically uses as a
configuration file or in application where data is transferred or stored. There are two main
features that differ from other data exchanging languages are: structures and data typing.

Yaml structures helps in storing multiple documents in single file storage, whereas data typing
allows avoiding data entry errors. It has three ways to write data

Example:

--
University: “Sindh Agriculture University”

Department: “Information technology”

Courses:

- ITC-702

-ITC-704

-ITC-706

REBOL: REBOL is a data exchange language that is readable to human and easier to edit
language. the advantage of REBOL is that is provides minimum punctuation marks and rich data
type set. Data types includes URLS, date/time, strings etc represents common standards. It is
inherited from JSON. It is designed to remove the necessity of meta-data languages.

Example:

Alert “Hello world ” (You ll see an alert on the screen )

Send nuzairah.h@gmail.com “ hi! Nuzairah,

Print now -11-dec-1995 ( This line will show the number of day you lived)
Q2: How restful web services are better than SOAP web services? Develop an Example of restful web
service using java or c# programming language?

Answer:

Soap: Simple object access protocol is a protocol based on XML (extensible markup language). XML is
use to communicate with various web-based applications. Whereas Soap specifies some standards on
which Xml transfer data between different applications over hyper text transfer protocol (HTTP). It is a
light-weight data interchanging protocol. Soap is developed in a way that it is platform independent as
well as operating system independent means it can run on any platform like java eclipse, notepad++ etc
or any operating system like Linux, windows, Mac etc.

Restful web services: Restful web services are the services that developed on REST (representational
state transfer) architecture providing some limitations in order to create Web service. Rest is a way to
use the resource underlying webhosting. It is a light-weight component. Restful web service are
maintainable i.e. the user can easily maintain its functionality, scalable i.e. the web service can easily
adopt functionalities on user choice . Restful web services are using now by many popular social media
websites such as twitter, facebook etc.

Implementation of RESTful web services is defined as:

RESOURCE: A resource is any image, video, audio, document, link etc that is placed on hosting website .
Client has to request via web browser to the web server in response the web server allow access to
resource. For example: an administration of Sindh Agriculture University needs a student information
from SAU website, then client will request www.sau.edu.pk/student/1 to access the information of
student 1 . This request will help in providing the information regarding student 1.

REQUEST VERB: a resource must become visible to the client via GET verb. The main objective of the
request verb is what a client want to do with the resource either he want to delete, get, send and so on

REQUEST HEADERS: this includes extra information related to authorization or what type of response a
client want, will be sent with the request.

REQUEST BODY: A request body contains data with itself mostly within the POST request using REST
web service. A client requests the web server that he wants to add resource to server so he attaches
detail information regarding resource.

RESPONSE BODY: In requesting web service via REST, the response of resource output will come
through Xml. For example: if we request information of student then detail information of student will
be resulted in XML format.

RESPONSE STATUS CODE: These are the additional codes which show the status of the response such as
code 200 shows no error within the server.
Main Advantages of REST web services over SOAP

Soap(Simple Object Transfer Protocol)

 Soap is a protocol
 Soap is heavy web service
 In soap , higher bandwidth is used when transferring data
 Soap can only coordinate with XML data format
 Client requests to access any resource in repetition can choke the network
 Soap messages are sometimes hard to understand
 Soap uses service interface for showing functionalities to clients

Whereas REST Web service

 REST is an architectural pattern


 REST is light-weight web service
 REST can be use to permit different languages such as HTML, plain text, XML,JSON etc
 REST uses bandwidth in an efficient manner during transfer of packets
 In REST, a user can make as many requests as he can. It has the capability of storing client
request in cache.
 Coding REST web services are easier and quicker
 REST uses Universal service locator to find way to hardware component
 REST becomes the public first choice in making public API. Such as Twitter ,Yahoo, Face book,
Google etc

You might also like