Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between webservice, web methods & server side code?

Tags:

Some questions confusing me guys, I'm just new to web services altogether.

  1. What is the difference between web service, web methods and server side code ?

  2. Where is web service preferred over server side methods?

  3. Where are web methods preferred to be used ?

  4. How does web service differ from server side post back ?

  5. Are web services light weight ? Can they be used to save long web forms as well ?

  6. In an enterprise web application, which one of these should I use frequently and why?
like image 471
Zo Has Avatar asked Oct 17 '10 07:10

Zo Has


People also ask

What is a web service method?

A Web service is a method of communication between two electronic devices over a network. It is a software function provided at a network address over the Web with the service always-on as in the concept of utility computing. Many organizations use multiple software systems for management.

What is the difference between Web API and web service?

Web service is used to communicate between two machines on a network. Web API is used as an interface between two different applications for communicating with each other. It uses HTML requests that can be compressed, but XML data cannot be compressed. Data can be compressed.

What is Web method in asp net?

The WebMethod attribute is added to each method we want to expose as a Web Service. ASP.NET makes it possible to map traditional methods to Web Service operations through the System. Web. Services. WebMethod attribute and it supports a number of properties that control the behavior of the methods.

What is Web method in Java?

javax.jwsCustomizes a method that is exposed as a Web Service operation. The associated method must be public and its parameters return value, and exceptions must follow the rules defined in JAX-RPC 1.1, section 5. The method is not required to throw java.


1 Answers

What is the difference between web service, web methods and server side code ?

A web service is an exposed end point that is normally used as an API, or in other words its end user is typically another application rather than a user interface. A web method is a particular method that is exposed over a web service.

On the other hand, server-side code applies to any ASP.NET web page, web service, or other technology for general implementation of its functionality.

Where is web service preferred over server side methods?

Web services excel at making an application compatible with other programming platforms or for serving up AJAX requests to a web page. There are many other uses, but typically using WCF or HttpHandlers are better options in those cases.

Where are web methods preferred to be used ?

Web methods can be used in any .aspx page or more typically in a .asmx (web service) file.

How does web service differ from server side post back ?

A server-side postback occurs when a web page posts data to the server for processing. A web service is completely different - it is an endpoint that is exposed for consumption by another application (or within the same application).

Are web services light weight ? Can they be used to save long web forms as well ?

No, web services are not light weight, in fact they are quite the opposite because they generally receive and respond to data using XML (a bulky format). However, this makes them very easy to use with other programming languages.

In an enterprise web application, which one of these should I use frequently and why?

This is a highly subjective question. Each technology in the .NET framework has a set of features that it excels at and can usually do several other things (but not very well). Each tool has its place, it is just a matter of matching the tools to use with the requirements of your project.

However, judging by the rest of your questioning, it sounds like you are just putting together a typical website that doesn't require an API, in which case it would be best to use .aspx pages and code behind.

like image 50
NightOwl888 Avatar answered Oct 15 '22 11:10

NightOwl888