Jess,
In my opinion, you will not do much harm, since asynchronous functionality is called only if you follow the conventions:
public class PortalController : AsyncController { public void NewsAsync(string city) { AsyncManager.OutstandingOperations.Increment(); NewsService newsService = new NewsService(); newsService.GetHeadlinesCompleted += (sender, e) => { AsyncManager.Parameters["headlines"] = e.Value; AsyncManager.OutstandingOperations.Decrement(); }; newsService.GetHeadlinesAsync(city); } public ActionResult NewsCompleted(string[] headlines) { return View("News", new ViewStringModel { NewsHeadlines = headlines }); } }
agreement to add new news * Async * and News * Completed * in the names.
cm
asynchronous controllers in asp.net mvc 2
Note that the controller class now derives from AsyncController, and not from Controller. In addition, the News action method has been split into methods called NewsAsync and NewsCompleted, which are similar to Begin and End methods on asynchronous pages. Logically, the controller still provides one action method called News. But physically, the implementation of the method was broken using variations of the asynchronous template used within the framework of the .NET platform.
If you do not change anything in your inherited controller code, then no asynchronous activity will be triggered. However, as Robert stated above (or below, maybe :-)), you can decorate needs-based actions to keep the intention clear, "I personally believe that the agreement should clearly show this.
definitely worth the debate.
source share