在 C# Web 应用程序中实现通知的最佳方法是什么?

发布于 2024-09-11 20:38:45 字数 241 浏览 4 评论 0原文

在 C# Web 应用程序中实现通知的最佳方法是什么?如果这是一个 EAI BPEL 应用程序,我将使用 BPEL 规范中的通知功能来在我想要监视的关键任务上发出事件。由于这是一个 C# Web 应用程序,那么架构选项有哪些?我应该在我想要监视的点使用 NServiceBus 通过 pub/sub 删除消息,还是应该使用 .Net 事件处理来附加到我关心的方法,或者两者的混合,或者是否有一个我不知道的选项。我试图优化的情况是最少的代码量具有最大的灵活性和可扩展性。

What is the best way to implement notification in a C# web application? If this was an EAI BPEL application, I would be using the notification feature within the BPEL specifications to emit events at key tasks I want to monitor. Since this is a C# web application, what are the architectural options? Should I drop messages via pub/sub using NServiceBus at points I want to monitor or should I use .Net event handling to attach to methods I care about or a mixture of both or is there an option I'm not aware of. The case I'm trying to optimize is the least amount of code with the maximum flexibility and scalability.

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

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

发布评论

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

评论(1

寄居人 2024-09-18 20:38:45

事件聚合器模式非常适合用于此类操作:

http://martinfowler.com/eaaDev /EventAggregator.html

您可以查看 kigg 项目:

http://kigg.codeplex.com/< /a>

它有一个相当不错的实现。我认为他们可以稍微改进一下,但总的来说我喜欢它。

The event aggregator pattern is a great one to use for things like this:

http://martinfowler.com/eaaDev/EventAggregator.html

You can check out the kigg project:

http://kigg.codeplex.com/

It has a pretty decent implementation. I think they could improve it a little but overall I like it.

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