The Personal Web Site Sample

 
 
By Jeff Cogswell  |  Posted 2009-02-24 Email Print this article Print
 
 
 
 
 
 
 


 

Included in the SDK's directory, which by default is C:\Program Files\Windows Azure SDK\v1.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.

Summary

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.

Senior Editor Jeff Cogswell can be reached at jeffrey.cogswell@ZiffDavisEnterprise.com.



 
 
 
 
Jeff Cogswell is the author of Designing Highly Useable Software (http://www.amazon.com/dp/0782143016) among other books and is the owner/operator of CogsMedia Training and Consulting.Currently Jeff is a senior editor with Ziff Davis Enterprise. Prior to joining Ziff, he spent about 15 years as a software engineer, working on Windows and Unix systems, mastering C++, PHP, and ASP.NET development. He has written over a dozen books.
 
 
 
 
 
 
 

Submit a Comment

Loading Comments...

 
Manage your Newsletters: Login   Register My Newsletters























 
 
 
 
 
 
 
 
 
 
 
Rocket Fuel