azure - Is it a bad practice to do WebRequests from ASP.NET MVC app? -
i'm doing web application (asp.net mvc) running/deployed in windows azure.
is bad practice if lot of webrequests application?, is:
actionresult someaction() { webrequest.create(some url); .... }
someaction called lot of times. someaction might create 100 webrequests, or more.
is bad practice?
should using windows service instead? is:
actionresult someaction() { //save request in db , let windows service poll db //and webrequests outside mvc application }
it not bad practice until mandatory project.
btw can wrap remote call using best practice like:
- if data in remote url don't change ofter can cache results avoiding multiple web request
- use async await methods (if using .net 4.5) web request asyncronous , better performance application
Comments
Post a Comment