在 C# Web 应用程序中实现通知的最佳方法是什么?
在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事件聚合器模式非常适合用于此类操作:
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.