is there a signal emiter/consumer engine (like in Django) for .NET (C#)

Posted by user118657 on Stack Overflow See other posts from Stack Overflow or by user118657
Published on 2010-04-30T08:12:38Z Indexed on 2010/04/30 8:17 UTC
Read the original article Hit count: 198

Filed under:

Has .NET (C#) anything like Django's Signals engine?

Our business logic become really complicated over few years of adding new features. I'm going to re-architecture it. Currently all features are very coupled that makes regression errors while changing something one one place - some other place may be broken.

I really like Django's apps idea where separate applications introduce new functionality and are absolutely separate. Communication between apps is implemented though signals.

I wounder if there is something in .NET that allows to divide project business to many separated "apps" (plug-ins, zones, modules, you name it) and make communication using some kind of "signals".

For example we have simple order flow. We can add "coupon app" that if exists in the project adds abilities to use discount coupon. We can add "cross sale" module that if exists adds abilities to offer cross-sale products Email notification module that if exists adds abilities to send order email notifications. But in the same time all this modules are "self-contained" means that communication between them is done using emitting signals (ORDER_PROCCESS_START, ORDER_SUCCESS, etcs) and other modules can subscribe to this signals and process them in required way.

This architecture is not related to web, all business logic is processed on the server side like without working with HTTP directly.

I wonder if it's good architecture from code maintaining and testing point of few, is it possible to do this in .NET? Any drawbacks that I don't realize now?

© Stack Overflow or respective owner

Related posts about .NET