什么是使用过的组件服务的优势和劣势? [英] What is the advantages and disadvantages of using services over components?

查看:273
本文介绍了什么是使用过的组件服务的优势和劣势?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从过去几个月我的工作项目,最新的点网框架。

From past few months I am working on projects in latest dot net frameworks.

我觉得在最新点网版本鼓励组件上方的服务。这是否正确?

I feel that in latest dot net versions "services" are encouraged over components. Is that correct?

我已经看到了银色的光芒(我在银色的光芒初学者)所有DB层操作作为服务公开。我不知道现在组件程序也都可以?

I have seen in silver light (I am a beginner in silver light) all the DB layer operations are exposed as services. I don't know right now component programs also are available?

什么是优势?有关性能如果所有层都暴露为服务,而不是DLLS?

What is the advantages? What about the performance if all the layers are exposed as services instead of DLLS?

请通过关于这个问题,我应该在哪里开始正确地理解这个概念,一些轻?

Please through some light on this subject that where should I begin to understand this concept correctly?

感谢

SC

推荐答案

这真是大家做一个面向服务的架构 - 东西是很常见一段时间,是非常受欢迎的。

It's really all to do with a Service Oriented Architecture - something that's been common for a while and is very popular.

的想法是,不同的操作被彼此,这样他们可以重复使用或修改去耦而无需重新编译使用它的应用程式。而不是被修改,复制到处在DLL中的一块code的,服务可以部署那些重新presents为一部分特定的处理或信息源的单一访问点。

The idea is that distinct operations are decoupled from each other so they can be reused and modified without recompiling the apps that use it. Rather than a piece of code in a DLL being modified and copied everywhere, a service can be deployed that represents a single point of access for a particular piece of processing or source of information.

假设你有一个信用卡验证组件。你可以写code并把它编译成一个DLL,并启动包括在所有应用程序。没有错,除非你发现一个bug或CC验证改变规则。或者,也许你想升级它来检查它反对黑名单。你不能做任何这些事情而无需重新编译使用它的应用程序。

Say you had a credit card validation component. You may write this code and compile it into a DLL and start including that in all your applications. Nothing wrong with that unless you notice a bug or the rules for CC validation change. Or maybe you want to upgrade it to check it against a blacklist. You can't do any of those things without recompiling the apps that use it.

如果您的信用卡验证然而作为服务公开,可以进行更改,并部署到一个位置。提供的签名是相同的(相同的参数和响应),应用程序甚至不必知道它改变了。

If your credit card validation is exposed as a service however, you can make the changes and deploy to one location. Provided the signature is the same (same parameters and response), the applications don't even have to know it's changed.

使用以上组件服务的另一个优点是,这些服务可以在任何地方主办。它们可以在本地服务器上或在世界的另一边。

Another advantage of using services over components is that the services can be hosted anywhere. They can be on the local server or on the other side of the world.

尽管如此,好像一切你应该决定一个案件逐案的基础架构。虽然信用卡验证是当一个服务是有用的,提供服务来呈现HTML控件并没有多大意义的一个很好的例子。

Having said this, like everything you should decide the architecture on a case-by-case basis. While the credit-card validation was a good example of when a service is useful, providing a service to render HTML controls doesn't make much sense.

这篇关于什么是使用过的组件服务的优势和劣势?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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