偶尔3层 [英] 3-tier now and then

查看:55
本文介绍了偶尔3层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全部


关于如何使用网络服务我们有很多争论(在某种程度上我/ b $ b认为错过了使用网络服务) - 这是我真正想要的所有情况

您对以下问题的看法:

$。b web b之前的b $ b,我们要么构建2层应用程序或3层应用程序和主机

远程com + app和所有使用代理的客户端远程访问com + app

...


现在,我们只是使用web服务来替换com + app,所以每一个

数据库调用都会调用一个web服务方法来获取数据

来自db或更新后db,因此数据集大量用于在客户端和Web服务之间发送数据

... webservice只是用作

方式

集中数据库调用方法...


如果这不是正确的事情还有哪些其他最佳实践/替代方案?


所有天才,请告诉我你的意见。


非常感谢!

John

Hi, All

We had a lots of debate on how to use web services (in some extent I
think web service is miss used) - here is the scenario I really want all of
your opinion on the following issue:

before .net web service, we either build 2-tier app or 3-tier app and host
the com+ app remotely and all client using proxy to access the com+ app
remotely ...

now, we just the use web service to replace the com+ app, so every single
database call will be calling one of the web service method to get back data
from db or update back db so the dataset is heavily used to ship data
between client and web service ...the webservice is simply being used as a
way
to centralize database call method ...

What other best practice/alternatives if this is not right thing to do?

All genius, please tell me you opinion.

Thanks very much!
John

推荐答案

John,

我认为把你的COM +应用程序转移到网络服务是

a坏主意。并非Web服务中的所有内容都是可移植的。对于

示例,很容易将在COM +

中标记为[Transaction]的对象映射到Web服务,但如果它们未被JIT激活(您可以在COM +中使用Transaction属性时默认为
,然后模型

变得难以移植。


此外,从长远来看,现在使用企业服务(COM +)将提供最简单的升级途径,以便在转移到Indigo时提供最简单的升级途径。如果你为COM +设计了正确的
,它就像切换一些属性一样简单。

使用网络服务,它不会那么容易。


我建议将你的对象保存在COM +中,然后让COM +

公开Web服务(这在最新版本的COM +中是可能的

相信)如果你真的需要这个功能。


请记住,如果你想要一个从COM +到网络服务的简单映射,

那么你的对象应该没有状态,并且被激活JIT(

为每次调用重新初始化对象)。


希望这有帮助。

-

- Nicholas Paldino [.NET / C#MVP]

- mv*@spam.guard.caspershouse.com


" John Lee" <乔*** @ newsgroup.nospam>在留言中写道

新闻:%2 **************** @ TK2MSFTNGP10.phx.gbl ...
John,

I think that taking your COM+ app and then moving it to a web service is
a bad idea. Not everything that is in a web service is portable. For
example, it''s easy to map objects that are marked as [Transaction] in COM+
to web services, but if they are not JIT activated (which you have by
default when using the Transaction attribute in COM+), then the model
becomes difficult to port.

Also, thinking long term, using Enterprise Services (COM+) now will
provide the easiest upgrade path later on when moving to Indigo. If you
design properly for COM+, it will be as easy as switching a few attributes.
With web services, it is not going to be anywhere near as easy.

I would recomment keeping your objects in COM+, and then letting COM+
expose the web service (this is possible in the recent versions of COM+ I
believe) if you really need that functionality.

Just remember, if you want a simple mapping from COM+ to web services,
then your objects should keep no state, and be JIT activated (which
re-initializes the object for every call).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"John Lee" <jo***@newsgroup.nospam> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
所有

关于如何使用Web服务我们有很多争论(在某种程度上我认为Web服务被错过使用) - 这是我真正想要的场景
您对以下问题的看法:

在.net网络服务之前,我们要么构建2层应用程序,要么构建3层应用程序并主持远程com + app和所有应用程序客户端使用代理远程访问com + app

现在,我们只是使用web服务来替换com + app,所以每个单独的数据库调用都会调用从数据库中获取数据或更新数据库的Web服务方法之一,因此数据集大量用于在客户端和Web服务之间传送数据... Web服务只是存在用作集中数据库调用方法的方式


如果这不是正确的事情还有哪些其他最佳实践/替代方案?
所有g enius,请告诉我你的意见。

非常感谢!
Hi, All

We had a lots of debate on how to use web services (in some extent I
think web service is miss used) - here is the scenario I really want all
of
your opinion on the following issue:

before .net web service, we either build 2-tier app or 3-tier app and host
the com+ app remotely and all client using proxy to access the com+ app
remotely ...

now, we just the use web service to replace the com+ app, so every single
database call will be calling one of the web service method to get back
data
from db or update back db so the dataset is heavily used to ship data
between client and web service ...the webservice is simply being used as a
way
to centralize database call method ...

What other best practice/alternatives if this is not right thing to do?

All genius, please tell me you opinion.

Thanks very much!
John



John,


这取决于您使用网络服务的方式以及您的意思

使用网络服务替换com + app。

Web服务专为面向服务的应用程序而设计。要获得

的优势,您可能希望以面向服务的方式重新设计您的

COM +应用程序!该服务更有用

如果它不仅执行获取/更新数据库,而且

也执行应用程序的业务逻辑。


如果您的COM +应用程序仅用于执行获取/更新数据库

那么当您替换时它与你的网络服务,

网络服务最终将只获得/更新数据库

没有更少。


Duy

CSDP / MCSD

" John Lee" <乔*** @ newsgroup.nospam>在留言中写道

新闻:%2 **************** @ TK2MSFTNGP10.phx.gbl ...
John,

It is depends on how you use the web service and what you mean by saying
"use web service replace the com+ app".
The web service was designed for service oriented application. To take
advantage of it you might want to redesign your
COM+ applications in the service oriented way! The service is more usefull
if it is not only doing get/update database but
also perform the business logic of the application.

If your COM+ applications are designed to perform get/update database only
then when you "replace" it with your web service,
the web service will end up with just get/update database nothing more
nothing less.

Duy
CSDP/MCSD
"John Lee" <jo***@newsgroup.nospam> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
所有

关于如何使用Web服务我们有很多争论(在某种程度上我认为Web服务被错过使用) - 这是我真正想要的场景
您对以下问题的看法:

在.net网络服务之前,我们要么构建2层应用程序,要么构建3层应用程序并主持远程com + app和所有应用程序客户端使用代理远程访问com + app

现在,我们只是使用web服务来替换com + app,所以每个单独的数据库调用都会调用从数据库中获取数据或更新数据库的Web服务方法之一,因此数据集大量用于在客户端和Web服务之间传送数据... Web服务只是存在用作集中数据库调用方法的方式


如果这不是正确的事情还有哪些其他最佳实践/替代方案?
所有g enius,请告诉我你的意见。

非常感谢!
Hi, All

We had a lots of debate on how to use web services (in some extent I
think web service is miss used) - here is the scenario I really want all
of
your opinion on the following issue:

before .net web service, we either build 2-tier app or 3-tier app and host
the com+ app remotely and all client using proxy to access the com+ app
remotely ...

now, we just the use web service to replace the com+ app, so every single
database call will be calling one of the web service method to get back
data
from db or update back db so the dataset is heavily used to ship data
between client and web service ...the webservice is simply being used as a
way
to centralize database call method ...

What other best practice/alternatives if this is not right thing to do?

All genius, please tell me you opinion.

Thanks very much!
John



John,


我认为使用该WebService是一个非常好的主意。


这样就可以在每个部分使用你的应用程序了。

世界,只要有Internt连接。对于

webforms应用程序和窗体应用程序一样,因为你可以采用相同的方法来获得




假设你当然,采取正确的安全措施。


如果你没有采取那么好的机会,那么你在我看来是个傻瓜。


我的2欧元。


Cor
John,

Yes a very good idea in my opinion to use that WebService.

This opens the possibility to use your applications in every part of the
world as long as there is an Internt connection. And that either for
webforms applications as for windowforms applications because you can take
the same approach for both.

Assuming you take the right security steps of course.

You would be in my opinion a fool when you don''t take that great
opportunity.

Just my 2 eurocents.

Cor


这篇关于偶尔3层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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