开发者

What is the best way to implement notification in a C# web application?

开发者 https://www.devze.com 2023-01-09 07:45 出处:网络
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 k

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 cod开发者_StackOverflowe with the maximum flexibility and scalability.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号