Developing Locally with Visual Studio 2010

Preparing the Environment

If you want to start programming for the Windows Azure platform for self learning, before having a paid account, you can use the Development Emulator. For that, you'll need Windows Vista, Windows Server 2008 or Windows 7, Visual Studio 2010, the Azure Tools for VS and the Azure SDK. You can find the last two items in the following link: http://msdn.microsoft.com/en-us/windowsazure/cc974146.aspx.

Before installing the Azure SDK you'll have to install the IIS 7.0 (Internet Information Services) and the .NET Framework, if you haven't yet. These steps are explained here: http://msdn.microsoft.com/en-us/library/gg465715.aspx.

Application Architecture

Roles

Windows Azure apps consist of a few configuration files and a set of Role applications. The Roles are divided in Web Roles, Worker Roles and VM Roles (I won't talk about these here).

Web Roles are front-end applications that accept HTTP/HTTPS requests. They can be developed in ASP.NET (ASP.NET Web Roles) or other technologies, such as Java, PHP and Ruby (CGI Web Roles). Worker Roles are background tasks that keep running continuously. They can be developed in C# .NET.

The communication between Web and Worker roles is done by the Queue, Blob or Table Storage.

The advantage of having different roles for different kinds of processing is that it becomes easier to scale the application when needed. Since Web Roles are made to run front-end code, they don't require as powerful hardware as the Worker Roles, which are intended do run heavier tasks.

More information on each kind of Role can be found in the following link: http://msdn.microsoft.com/en-us/library/gg433065.aspx.

Storage

As mentioned in the previous section, there are 3 kinds of data storage avaible in Microsoft Azure Platform:
  • Table Storage: a structured, non-relational entity storage. The same table can store entities of different types, with different attributes.
  • Blob Storage: a file storage (blob stands for Binary Large Objects). Can store any binary data along with their metadata.
  • Queue Storage: a message storage. Used to pass messages between different Web and Worker roles.

The First App

After installing the Azure Tools and the Azure SDK, you'll be able to create an app from a template when creating a new project in VS. Just choose Visual C#, Cloud, Windows Azure Project. You'll be asked which Roles you want to add to the project.

roles.png

After creating the sample project, just hit F5 and the development server will start to run. If everything is alright, your browser should open a new tab with the local address of your application.

If you want to test your app it in the cloud you can try to get a 30 day pass for free at http://windowsazurepass.com/.

Last edited Feb 28, 2011 at 7:06 PM by bjurkovski, version 9

Comments

No comments yet.