Tech Tutorials Database
GeekArticles Database SQL Server
 

Comparing the Performance of Visual Studio's Web Reference to a Custom Class

 
Author: 4guysfromrolla.com
Category: SQL Server
Comments (0)

<p> As developers, we all make assumptions when programming. Perhaps the biggest assumption we make is that those libraries and tools that ship with the .NET Framework are the best way to accomplish a given task. For example, most developers assume that using <a Membership system</a> is the best way to manage user accounts in a website (rather than rolling your own user account store). Similarly, creating a Web Reference to communicate with a <a service</a> generates markup that auto-creates a <i>proxy class</i>, which handles the low-level details of invoking the web service, serializing parameters, and so on. </p><p> Recently a client made us question one of our fundamental assumptions about the .NET Framework and Web Services by asking, should we use proxy class created by Visual Studio to connect to a web In this particular project we were calling a web service to retrieve data, which was then sorted, formatted slightly and displayed in a web page. The client hypothesized that it would be more efficient to invoke the web service directly via class, retrieve the XML output, populate an <code>XmlDocument</code> object, then use <a to output the result to HTML. Surely that would be faster than using Visual auto-generated proxy class, right? </p><p> Prior to this request, we had never considered rolling our own proxy class; we had always taken advantage of the proxy classes Visual Studio auto-generated for us. Could these auto-generated proxy classes be inefficient? Would retrieving and parsing the web XML directly be more efficient? The only way to know for sure was to test my hypothesis. <br /><a More &gt;</a></p>

Read More...




Sponsored Links




Read Next: Improving CSS With .LESS



 

 

Comments



Post Your Comment:

Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe