是 COM+ 还推荐吗?

发布于 2024-07-11 04:29:40 字数 1431 浏览 5 评论 0 原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

煮酒 2024-07-18 04:29:40

COM+ 实际上只是 MTS (Microsoft Transaction Server) 重新标记并与 Windows 2000 及更高版本捆绑在一起 (它是 NT4 上的一个可选附加功能)。 如果您使用非托管代码,COM+ 仍然是事务中间层的首选。 事实上,它通常在 TPC-C 基准测试系统中用作 TP 监视器因为它比 .Net 或 Java 更高效,并且比 Tuxedo 或 Encina 便宜得多(这会降低 $/TPM)。

WCF (Windows Communication Foundation) 有自己的事务监视器,它是这是合理的,因为 COM+ 的体系结构与 COM 紧密耦合,并且很难改造 .Net 运行时。 如果您在 .Net 中编写事务应用程序,WCF 会提供此功能,尽管 System.Transactions 库还为 ADO.Net 客户端提供分布式事务支持。

COM+ is really just MTS (Microsoft Transaction Server) rebadged and bundled with Windows 2000 and later versions (it was an optional extra on NT4). If you're using non-managed code, COM+ is still the preferred option for a transactional middle-tier. In fact, it's usually used as the TP monitor in TPC-C benchmark systems because it's more efficient than .Net or Java and much cheaper than Tuxedo or Encina (which reduces the $/TPM).

WCF (Windows Communication Foundation) has its own transaction monitor, which is reasonable as the architecture of COM+ is tightly coupled to COM and would be difficult to retrofit a .Net runtime to. If you're writing a transactional application in .Net, WCF provides this facility although the System.Transactions library also provides distributed transaction support for ADO.Net clients.

若水微香 2024-07-18 04:29:40

这里有很多关于 WCF 的讨论,但老实说,我认为这不是您要找的。

在 ASP 的早期,人们很快意识到将所有代码放在标记页面中很难维护。 因此,一些人开始使用 COM 组件来实现 N 层设计。 如果您的目的只是以典型的 N 层方式构建 DAL,那么简单的类库就足够了。

考虑构建一个类库,将其添加为对您的 Web 项目的引用,当然还有 ADO.NET

There's a lot of talk about WCF here, but I honestly don't think that's what you're looking for.

In the early days of ASP, people quickly learned that placing all of the code in the markup pages was difficult to maintain. As a result, some people started implementing N-Tier designs using COM components. If your intentions are to simply build a DAL in a typical N-Tier fashion, there is no reason that a simple class library wouldn't suffice.

Look into building a class library, adding it as a reference to your web project and, of course, ADO.NET.

深海不蓝 2024-07-18 04:29:40

WCF 是新推荐的对象间通信机制

WCF is the new recommended mechanism for interobject communication

深海夜未眠 2024-07-18 04:29:40

我刚刚花了两天时间尝试让两个旧的 COM+ 业务对象在新的 Windows 2003 Server 上工作,并且我确信我再也不想使用 COM+ 了。

I have just spent the past two days trying to make two of my old COM+ business objects work on a new Windows 2003 Server and I am certain I never want to work with COM+ ever again.

初相遇 2024-07-18 04:29:40

来自 http://msdn.microsoft.com/en- us/library/ms686988(VS.85).aspx

“COM+ 是 Microsoft® 组件发展的下一步
对象模型和 Microsoft 事务服务器 (MTS)。 COM+ 处理许多
您之前必须编程的资源管理任务
你自己,例如线程分配安全性。 它
通过提供线程池对象池即时自动使您的应用程序更具可扩展性时间
对象激活。 COM+ 还有助于保护您的完整性
通过提供事务支持来获取数据,即使事务跨越
网络上的多个数据库。”

看起来像是一种遗留的东西,但我认为 Microsoft 目前提供的任何单一时尚技术都无法取代 COM+。

From http://msdn.microsoft.com/en-us/library/ms686988(VS.85).aspx:

"COM+ is the next step in the evolution of the Microsoft® Component
Object Model and Microsoft Transaction Server (MTS). COM+ handles many
of the resource management tasks you previously had to program
yourself, such as thread allocation and security. It
automatically makes your applications more scalable by providing thread pooling, object pooling, and just-in-time
object activation
. COM+ also helps protect the integrity of your
data by providing transaction support, even if a transaction spans
multiple databases over a network."

Although looks like a kind of legacy stuff, I dont' think any single fashion technology provided by Microsoft at this time can replace COM+.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文