Recently, I had this idea in my head about using events in an ASP.NET MVC application. Example. When the user created a comment, whether it will trigger an event on the server side, for example, for example, you can connect to the account controller and, thus, run the specified code in the event. Have you tried this 1 or is it even possible to use events as such in a web application?
Here is an example. Using created a comment on my site, although a comment controller, this will cause the comment controller to trigger an event in my static event manager. This will execute all the methods attached to this event. This example uses "OnCommentCreate ()" in the AccountController application. Now all this should happen in another thread, and then in the users, so the page for the user will continue because there were no events, and the events are processed behind. My thought is where to use this with a persistent connection on the timeline, or it can be used to decentralize the code. I could, for example, have an event that will be raised when the username changes,will go through the log files and change the username to the new username.
,
, , DoomStone. ASP.NET MVC .NET, , , .NET-; .
, , , , WF , , .
, . , , , - .
** ** . , , "" , , , , ( ) . , , , . WKO (, ), , (.eg Publish Send), Message, WKO , ( , OnCommentCreated(), Publish(new CommentCreatedMessage({data})); .
OnCommentCreated()
Publish(new CommentCreatedMessage({data}));
ASP.NET MVC Framework , ( ) - , , AJAX .
, , , AJAX .