Any help with building the following design around a .NET app would be appreciated.
Imagine that we have different types of articles: lets say, NewsArticle, BlogArticle, EditorialArticle etc. They are different in some ways, the same in others, thus they all inherit from an Article base class.
We want a nice modular design so that some of these Article types can be packaged up in seperate modules, or developers can build their own Article types.
When an article is published and becomes publicly visible, a whole series of services have to run – e.g. people need to be emailed, fields have to be updated in the database, etc.
This reminds me of the Observer/event pattern, but I’m not sure how we go about registering observers. What exactly is the subject in this case – is it the Article itself? Where should we register the events – in Global.asax or similar perhaps – this seems a bit strange to me? Am I going down the right track – what would the overall top-level architecture look like?
this is Observer pattern and you don’t need to register events in Global.asax but register Observer classes in the Subject class of this DP.