views:

16

answers:

0

Hi guys, i have quite large ASP.NET MVC2 application - separate repositories in their own projects, using IoC for injecting them into controllers, etc. - standard stuff.

And here i need something, that will allow me to "globally" manage events in system and notify the user by few different ways (some events by email, some by internal message in system, etc). So : i have many intependent places where "interesting event" can occure (repositories), and i have several "notification ways".

What is the best practice to design some layer/subsystem for this purpose ? Shall i simply call some static method on static class from each place of origin, and in this static class "decide" what to do with it ? I think there must be some way to do this "nice" - with events or so.. i have read about "event broker" or "event aggregator", but this seems like an "overkill" to me...

thanx for advice :)