WCF服务与代码背后 - 性能和可重用性权衡 [英] WCF service vs Code behind - Performance and Re-usability tradeoffs

查看:55
本文介绍了WCF服务与代码背后 - 性能和可重用性权衡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于诸如更新SQL数据库之类的任务,下面提到的两种方法之间的性能和可重用性之间的权衡是什么?



1. WCF 更新SQL表任务的服务。然后从ASP.Net Web应用程序调用它。

2.使用来自ASP.Net Web应用程序代码隐藏的ADO.Net更新SQL表。



我正在寻找对用户和实现观点的分析。

请注意,每个用户的活动是一次。此外,我们正在寻找一种可以重复使用的解决方案。



我知道这不仅仅是要求解决方案的争论,而是欣赏回应。



干杯,

Naman

For a task such as updating the SQL Database, what are the performance and re-usability trade-offs between the two approaches mentioned below?

1. WCF Service for "update the SQL tables" task. And then calling it from ASP.Net Web Application.
2. "Updating the SQL" table using ADO.Net from ASP.Net Web Application code-behind.

I'm looking for an analysis on user and implementation point of view.
Please note that the activity is one time per user. Also, we are looking for a solution which can be re-used.

I know this is more of a debate than asking for a solution, but appreciate the responses.

Cheers,
Naman

推荐答案

引用:

数据库,下面提到的两种方法之间的性能和可重用性之间的权衡是什么?



1.用于更新SQL表任务的WCF服务。然后从ASP.Net Web应用程序调用它。

2.使用来自ASP.Net Web应用程序代码隐藏的ADO.Net更新SQL表。

Database, what are the performance and re-usability trade-offs between the two approaches mentioned below?

1. WCF Service for "update the SQL tables" task. And then calling it from ASP.Net Web Application.
2. "Updating the SQL" table using ADO.Net from ASP.Net Web Application code-behind.

使用第一个选项。

0)通过使用Webservice(WCF),当最终用户/你希望与其他目标(如Winform,WPF / Silverlight等)一起使用时,你可以重用相同的东西。没有必要重写一些东西。所有你要做的就是打电话给服务,就是这样。

1)轻松部署的东西

2)你可以优化您的服务 [ ^ ]

3)考虑你已经写好了您的代码隐藏中的一些代码,如果您想从多个页面/项目中调用相同的内容,您会怎么做?在多个地方复制粘贴?X |在这里Webservice摇滚,只需调用服务URL。

4)你可以通过在服务级别实现身份验证+ /授权来保护事物(限制其他人使用方法)。

5)还有更多....只有谷歌的webservice / wcf优势。

Go with 1st option.
0) By using Webservice(WCF), you could reuse the same things when end-user/you want to go with other targets(like Winform, WPF/Silverlight, etc.,). There's no need to rewrite things. All you have to do is call the service, that's it.
1) Easy deployment things
2) You could optimize your services too[^]
3) Consider you have written some code in your code-behind, what'll you do if you want to call the samething from multiple pages/projects? Copy-paste on multiple places?X| Here Webservice rocks, just call the service URL.
4) And you could secure things(restrict-others to use methods) by implementing authentication +/ authorization at service level.
5) There're more .... just Google for webservice/wcf advantages.


这篇关于WCF服务与代码背后 - 性能和可重用性权衡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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