lately have i had this idea in my head about using events in a ASP.NET MVC application. For an example When a user created a comment, will this on the server side trigger an event, that for an example the account controller can be hooked on to, and thus triggering account specified code on a event. Have any 1 tried this or is it even possible, to use events as such on a web application?
Here is an example.
A uses created a comment on my website, though the comments controller, this will make the Comments controller trigger an event in my static event manager. This will execute all the methods that have been tied to this event. In this example is "OnCommentCreate()" in the AccountController attached.
Now all this should happen on another thread then the users, so the page for the user will continues as there were no events, while the events are handling behind.
My thought where to use this with a persistent connection on a timeline, or it can be used to decentralize code. I could for an example have an event that would be called when a username changes, there will go through the log files and change the name of the user to the new username.
I hope this clarifies better