GeekArticles
Database
SQL Server
Database
SQL ServerComparing the Performance of Visual Studio's Web Reference to a Custom Class
<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 ></a></p>
Sponsored Links
Read Next: Improving CSS With .LESS
Related Topics
Subscribe via RSS
SQL Server
- Naming Database Objects: Part II
- Trace Messages Part V: Trace Cleanup
- Naming Database Objects: Part I
- Multiple-Child Aggregation
- Creating SQL Tables for an Integrating Application Using Dexterity
- SQL Server 2005 Beta 2 Transact-SQL Enhancements
- .NET Rocks! - Brian Larson on SQL Server Reporting Services
- Computing the Trimmed Mean in SQL
- SQL Server 2000 Gains on Oracle
- Separator First Formatting (SFF)
