Differences between Web site and web service

5 pts.
Tags:
HTML
HTTP
Web application
web service
XML
Hello Sirs, What exactly is the difference between a web site and web service? What advantages a web service is upon web sites? Ultimately web services also uses HTTP protocol and whether it is XML or JSON payload they both will come as part of HTTP body. So is the only difference is that HTML data can be read and presented by browsers whether XML or JSON data can be read by the software receiving the HTML response? And if so then why the programming language community (Java, .NET, PHP etc) haven't developed an API to read HTML data and extract important information from HTTP response, thus eliminating the use of XML, JSON and other structured data format library and keep things simple. Suppose a java application wants to get some information from .NET application over web. The application will simply call the .NET application service URL and it can parse the HTML response returned by .NET application using the Java API which is exclusively developed for parsing HTML got as data part of the HTTP response. From this Java API the java application can get important information and therefore interoperability will also be achieved by going this way also. After all in case of the web service also the application has to get the payload (whether XML or JSON) from HTTP response then why application can't directly get the payload and extract the information something like browsers does. Why to use separate structured data format and provide an api to handle the data presented as data format (XML, JSON etc). Just wanted to know why the programming world has not come up with an API to directly parse HTML and get information to be used by software, why they need to get the information in XML and then parse the XML to get the information.
Please reply. Thanks in advance

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ToddN2000
    In my experience a web site is used to display information in a web browser. A web service is an application written in a language like C#, VB or another and is used to pass data from one system to another. The web service uses XML which contains the schema of it's contents. A web site can use web service to get external data. This is similar to your browser showing the local temperature. It may run a web service to go to a site like weather.com and get it's data based on zip code.
    115,240 pointsBadges:
    report
  • carlosdl
    A website "displays" data for humans to read it and see it through a web browser.

    A web service is different because their goal is to allow interaction between applications.

    HTML was not designed to represent structured data.  Using HTML to represent structured data would not make things simpler, but more complex.

    Using XML, for example, you can represent complex data structures with any number of nesting levels, and different data types and restrictions.  There is no easy way to do that with what HTML alone has to offer.

    Interoperability is not a problem, because both XML and JSON are standards also, so applications built using different languages and technologies can interact and exchange information using any of those data representation formats.
    84,535 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: