Judgement over how much overhead is in the .NET example is purely a matter of perspective. If I look at it strictly from a scripting point of view, there are about six items of extra information that may not be strictly necessary. I count in that number the following items:
- <%@ WebService Language="C#" Class="Hello" %>
- using System.Web.Services;
- [WebService(Namespace="urn:Hello")]
- [ WebMethod ]
- The return data type (string) on the method
- The parameter data type on the method
Compare the .NET version to the Perl version and the differences stick out very clearly. And yes, it was much easier to write this simple example using Perl. And I don't even like Perl.
From the point of view of somebody who is used to working in non-scripting, type-safe languages, however, I see hardly any unnecessary overhead in the .NET sample. In fact, from this perspective, the Perl version leaves much to be desired.
So which is the vest environment to create Web services? Scripting or non-scripting? Who cares, just write the code you need to write. If a scripting language does what you need it to do, knock your socks off. If a non-scripting environment works better for you, code away. Both have their respective advantages and disadvantages.
1:59:59 PM
|