网络服务、网络方法和网络服务之间的区别服务器端代码? [英] Difference between webservice, web methods & server side code?

查看:19
本文介绍了网络服务、网络方法和网络服务之间的区别服务器端代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有些问题让我感到困惑,我完全是网络服务的新手.

<块引用>

  1. 有什么区别网络服务、网络方法和服务器边码?

  2. 网络服务在哪里优先于服务器端方法?

  3. 首选网络方法的位置要使用吗?

  4. Web 服务如何与服务器端回发不同吗?

  5. 网络服务是轻量级的吗?它们可以用来保存长网吗表格也是?

  6. 在企业Web 应用程序,其中之一我应该经常使用吗?为什么?

解决方案

和网页有什么区别服务、Web 方法和服务器端代码?

Web 服务是一个公开的端点,通常用作 API,或者换句话说,它的最终用户通常是另一个应用程序,而不是用户界面.Web 方法是通过 Web 服务公开的特定方法.

另一方面,服务器端代码适用于任何 ASP.NET 网页、Web 服务或其他技术,以实现其功能的一般实现.

<块引用>

网络服务优先于哪里服务器端方法?

Web 服务擅长使应用程序与其他编程平台兼容或为网页提供 AJAX 请求.还有许多其他用途,但在这些情况下,通常使用 WCF 或 HttpHandlers 是更好的选择.

<块引用>

首选的网络方法在哪里用过吗?

Web 方法可以在任何 .aspx 页面中使用,或者更常见的是在 .asmx(Web 服务)文件中.

<块引用>

Web 服务与服务器端回发?

当网页将数据发送到服务器进行处理时,就会发生服务器端回发.Web 服务是完全不同的 - 它是一个端点,供另一个应用程序(或同一应用程序内)使用.

<块引用>

网络服务是轻量级的吗?能它们用于将长 Web 表单保存为好吗?

不,Web 服务并不是轻量级的,事实上它们恰恰相反,因为它们通常使用 XML(一种庞大的格式)接收和响应数据.然而,这使得它们很容易与其他编程语言一起使用.

<块引用>

在企业 Web 应用程序中,我应该使用其中的哪一个经常,为什么?

这是一个非常主观的问题..NET 框架中的每项技术都有一组它擅长的功能,通常可以做其他几件事(但不是很好).每个工具都有自己的位置,只是将要使用的工具与您的项目要求相匹配.

但是,从您的其他提问来看,您似乎只是在构建一个不需要 API 的典型网站,在这种情况下,最好使用 .aspx 页面和代码.

>

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?

解决方案

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.

这篇关于网络服务、网络方法和网络服务之间的区别服务器端代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆