Web Service vs Web Application

前端 未结 11 562
别跟我提以往
别跟我提以往 2020-12-12 13:13

I know this is an old question and must have been answered hundred times already, but I am not able to find a satisfactory response as yet.

I am creating an applicat

相关标签:
11条回答
  • 2020-12-12 13:48

    If we think the terminology, which I think is the main question here.

    Web service refers to software, that serves data in any format (XML/JSON etc.) through some kind of web interface. That interface can be called API (Application Programming Interface). REST and SOAP are ways to design the API.

    Application is the software that is using this API provided by the web service.

    In the other words, web service is "server" and application is "client". Usually server serves machines and clients serve the user.

    So in any way you choose to build your system, I would call the part that serves the data as "Web service" and the part that utilizes the data as "application" (or "web application" if such).

    Sounds like in your case, you are building a web service that provides XML-formatted data for multiple applications. So my answer is: build the thing you are already building and call it web service.

    0 讨论(0)
  • 2020-12-12 13:50

    If your application doesn't need a user interface, then make it a web service. If it needs a user interface, then use a web application.

    0 讨论(0)
  • 2020-12-12 13:50

    I know its too late to replay, but still i want

    Web Services approach is good if

    a. enterprise integration with only webservices, like integrating distributed modules /applications.

    b. suited for distributed applications

    c. more than one consumer for same service - like Banks consuming data from Credit Reporting Agency

    d. consumers want data in different formats - like one consumer(customer) wants in XML format, other would be in JASON ..etc

    0 讨论(0)
  • 2020-12-12 13:51

    I asked this question more than 3 yeas back and a lot of water has flowed under the bridge since then. I have worked on tens of web applications and created hundreds of web services. So I guess it makes sense to answer my own question here.

    The challenge which I faced when I asked this question was that I got confused between the terms application and service (note that web is common element in web application and web service). As the name would suggest, application is an application in itself, whereas a service is meant to serve others. A service probably has no meaning unless someone is going to use it. It can serve one or more applications or services.

    Now if I look at my question

    I am creating an application which will be used by other applications (mobile/ web) to fetch the data. Now I have 2 options, 1. to create my application as a simple web application 2. To create a web service.

    I would like to tell myself that "Dude! if there is an entity which takes a request and returns data, you are talking about a service." Because I am not worried about what is going to happen with that data? Who will use it? How will that be displayed?

    I am taking a request and returning data. Now how am I doing that is part of implementation. I might use SOAP or REST. I might use Jersey or Spring MVC/ REST or may be a simple servlet which takes a request and returns data in JSON or XML or String or any other required format.

    0 讨论(0)
  • 2020-12-12 13:51

    Web services dont always have a UI. They are normally API's using JSON, can also be SOA type using SOAP and XML primarily, can also be sockets, and servers and other micro web services, etc..

    Web applications can be put together many ways. There are several ways to create your application by orchestration of multiple web services, and a separate gui to control them which ties into these services. The other way which does not use services is to procedurally embed code into your UI interface app, or even better, make an Object Oriented application which has its own services separed in the Model later, which the controller access, and has its own view as a GUI which access the services in the back end, or even more complicated apps that pass A2B, B2B, B2C services from some GUI.

    Services dont always have a GUI, they can have a CRUD to maintain the data, but once you start to have these types of features, it becomes an application in its own right. The services are applied to something greater than themselves. this applying creates your application. It has to have a purpose. Normally it takes more than one blind service to complete your applicatoin, and there is some kind of interface.

    If you just blindly send a uri request to your service, and it blindly sends back json, that's a service. Whats blindly sending this? If you, then not an application. If some sort of crud, then its becoming an application, the crud is a GUI for accessing the services, and as a whole, its a data management application system. Now if you put a layer on the front to demonstrate this data in website fashion, you now have a product to display this data, a product to manage it, and the data which is the real product, and which is accessible via the web service, its now a full on application. Your endeavour at creating this becomes your application.

    0 讨论(0)
提交回复
热议问题