I’m on page 59 of Ben Horowitz’s The Hard Thing About Hard Things. So far, the one big thing I’ve noticed about Ben’s story is that in critical moments, he ignored probability, consensus from his advisors, and perhaps reason itself. This fits with something I’ve been considering for a while: persistence is really the only thing that matters in making a great company.
I was wondering, the other day, what options there have been for developing web services on Windows. I did a little research into the question, and here is what I came up with. But first, thank you, darnold924 of msdn for helping.
When asking what are the options for web service development on Windows, we first must understand what a web service is. A web service is basically any application that operates primarily by commands received over a network. Although, some use the term to refer specifically to a service that is operated over the Internet. So, basically any network communication mechanism in Windows is an option for development of a web service.
There are four major network communication platforms in Windows, today (June 2012), that allow you to make an HTTP web service. They are
WCF is considered the current technology, and the others are legacy – in the .NET world, at least. I’m not sure if HTTP.sys is considered legacy technology; for example, what if you want to create a native web service?
Also, we must remember that there are cross-platform options, for example, the networking platforms of Java. I imagine there are also third-party options, but I haven’t seen any and haven’t looked into it.
Windows Sockets API. This is the earliest networking stack in Windows that I have learned of. It’s a general networking library, very low-level, providing little or no “web server” functionality. Winsock is a user-mode component.
So with Winsock, you could setup a simple C++ application that listens for commands on a network socket.
Hypertext Transfer Protocol stack. This is the first Windows stack offering “web server/services” functionality – i.e., more, deeper, built-in support for HTTP-based applications. It runs in a kernel-mode device driver.
So HTTP.sys is similar to Winsock except that you now get support for things like HTTP requests, responses, messages, etc.
.NET’s original web application development platform – ASP.NET. Technically, it’s not a network communication platform, but it does have a component designed for building HTTP web services. ASP.NET is largely about abstracting the statelessness of HTTP, so you program more like you’re writing a standalone application. It is also IIS-based, which the previous web service facilities are not.
So with ASP.NET, you get the support of a full-blown web server.
Windows Communication Foundation. This is .NET’s general network communication platform, introduced in .NET 3.0. It supports development of both IIS-based and non-IIS-based web services.
I think the main advantage of WCF, here, is that you get a uniform development experience for many kinds of web services, including HTTP-based and other protocols. Also, you get the power of .NET, but you don’t have to run in IIS if your application doesn’t call for that.
More on WCF
There are two major options for WCF HTTP web services, SOAP-based and REST-based. Also, WCF can have WCF Web, MSMQ, Named Pipe and TCP services.
Can you have a web service built directly on top of IIS, bypassing the .NET Framework? Would there be any advantage there?
Is there a native technology (not .NET-based) that is considered current and not legacy?
How important are the cross-platform options?
Are there any third-party options that are big players?
If you need to make a spiral path in WPF, and don’t want to calculate it yourself, the article walks you through and gives just the right amount of explanation.
(The site’s a little slow, so give it a moment.)
The person that wrote this article is totally awesome! I am so grateful.
Superb – thank you, BBIM.
I was trying to use Dotfuscator Community Edition, and I got a build error saying “Couldn’t load external type because its assembly can’t be found: System.Windows.Forms.Form,System.Windows.Forms, Version=1.0.5000.0″. I think this may have been because it was the Dotfuscator from Visual Studio 2005, although I’m not certain – the path is C:\Program Files (x86)\Microsoft Visual Studio 8\Application\PreEmptive Solutions\Dotfuscator Community Edition. So I switched over to the one in C:\Program Files (x86)\Microsoft Visual Studio 10.0\PreEmptive Solutions\Dotfuscator Community Edition, and the error went away.
Like I said, I think it was from VS 2005. But I use both VS 2005 and VS 2010, so maybe the VS 2010 install, or some update, wiped the .NET 1.0 assemblies. I only have .NET 184.108.40.206 and 220.127.116.11 versions of that assembly.
Perhaps you’re looking into web services and you’re having trouble understanding what’s the point of a WSDL document? I did a little research on this, and it seems to me that the main use of WSDL is to provide the web service interface so that software development tools like Visual Studio can generate code for working with that interface. Also, it seems like this is very common with SOAP-style web services, but not REST web services (because REST is so simple).
Here are some references.
A main idea behind wsdl is that the wsdl definition can be used to automatically generate service side skeletons that can interact with the deployed object that provides the service and to generate client side stubs that can communicate with the skeletons, thereby providing the client program with access to the functions provided by the service. Make the wsdl for a service available and you open the door to fast, easy programmable access to that service.
“Big Web services” use Extensible Markup Language (XML) messages that follow the SOAP standard and have been popular with the traditional enterprises. In such systems, there is often a machine-readable description of the operations offered by the service written in the Web Services Description Language (WSDL). The latter is not a requirement of a SOAP endpoint, but it is a prerequisite for automated client-side code generation in many Java and .NET SOAP frameworks (frameworks such as Apache Axis2, Apache CXF, and Spring being notable exceptions).
If you’re studying web services, I highly recommend RESTful Web Services, by Leonard Richardson and Sam Ruby.