Microsoft Azure Cloud SDK

Azure is Microsoft’s entry into the cloud computing world competing against the likes of Amazon.com and Google. eWEEK Labs tries it out.

Included in the SDK’s directory, which by default is C:Program FilesWindows Azure SDKv1.0, is a file called samples.zip. If you unzip this into its own directory, you’ll find nine samples that demonstrate various aspects of the Azure SDK. I highly encourage you to compile and look through each sample and become familiar with what it does; doing so is an ideal hands-on approach to learning about Azure. The sample that I’ll look at here is the one called Personal Web Site, found in the directory PersonalWebSite (with no spaces in the name).

The Azure SDK includes a command line that’s set up with paths to all the tools in the Azure SDK. The samples can be built from this command line using batch files that accompany each sample, as well as a single batch file that will build all the samples. Although you’re certainly free to use this approach, each sample also includes its own solution that you can open in Visual Studio, which I recommend you do. That way you can visually see the different parts that make up the sample.

I opened the PersonalWebSite.sln sample to try it out. (You might get a security warning when you open the project as I did; this is normal for the situation. Just click Load Project Normally.) When you run this project, it might look familiar. It’s very similar to the ubiquitous ASP.NET Personal Web Site Starter Kit.

But if you look through the code, you’ll see a project called AspProviders, which includes a very handy set of C# files for working with various aspects of Azure. These classes are basically wrappers around the Azure API to make it easier to use from an ASP.NET perspective. For example, there are classes for a membership provider and a role provider that make use of the storage service. These are classes that you can definitely reuse for your own cloud-based software.

One reason I draw attention to these classes in particular is that they provide something that is somewhat lacking (in my opinion) in Amazon.com’s AWS. User authentication works quite differently in AWS, and much of it you have to code yourself. There is security in AWS, and it works well, but user authentication isn’t built in, at least nothing on the level of the ASP.NET membership providers. If you’ve done much development in ASP.NET, as I have, you’re probably aware of just how robust and useful the user authentication classes are that were introduced with ASP.NET 2.0. These classes include membership and role providers that work wonderfully. When I worked with AWS, I was a bit disappointed.

Of course, to be fair, AWS is very different in its architecture, and you can allocate Windows servers under AWS and run ASP.NET. From there you can use the user authentication that comes with ASP.NET. However, this authentication is separate from the requests authentication used in HTTP calls under AWS. So, personally, I welcome these classes in the Azure samples.

From here, I encourage you to explore more of the samples and look closely through the code. Pay special attention to the namespace being used, as well as the assemblies that the samples are using found in the “bin” and “ref” directories under the Azure SDK’s installation. Also, don’t miss the documentation found in the doc directory; included here is a .chm Window Help file that contains a good deal of information (although it’s still in a prerelease state).

And then watch for my next article on Azure, where I’ll walk you through some actual coding examples. It’ll be fun.