Tips, tricks and all the info about Microsoft Visual Studio 2008

Getting started with Windows Azure

, posted: 17-Feb-2009 09:00

So, you have heard about the buzzword - Windows Azure - and want to start developing azure applications?  Then, this blog post is for you :)

The Azure Services Platform is designed to help developers quickly and easily create, deploy, manage, and distribute web applications and services. Windows Azure is a cloud services operating system that serves as the development, service hosting, and service management environment for the Azure Services Platform.

Windows Azure provides developers with on-demand compute and storage to host and manage web applications on the internet through Microsoft data centers.

How do I get started?
Below are the tools you need to install in your development machine to get started with Windows Azure

•    Visual Studio 2008
•    Windows Azure SDK
•    Windows Azure Tools for Microsoft Visual Studio

The Windows Azure SDK has all the necessary binaries, libraries and documentation that you need to build Windows Azure applications.

Windows Azure Tools for Visual Studio 2008 extends Visual Studio to build, debug, package Windows Azure applications.

The local Cloud depot
In order to publish your applications to the cloud, you need to have a valid Windows Azure account. You can apply for your account here, but in the meantime, you can make use of the local development fabric from the Windows Azure SDK.


 
The development fabric simulates Windows Azure cloud (fabric) in your local development machine and allows to run and test your Windows Azure applications.

Windows Azure Roles
Windows Azure roles are discrete scalable components built with managed code. There are two roles available in Windows Azure

•    Web Role
o    A web role is an application that listens and responds for web requests via a HTTP or HTTPS endpoint.

•    Worker Role
o    A worker role is an application which runs as a background processing application and does not expose any endpoints
o    The worker role cannot be accessed via the web

Every Windows Azure application we build is always associated either with a web role or worker role or both.

Windows Azure Visual Studio Templates
Windows Azure tools for Visual Studio install the necessary Windows Azure templates which makes it easy to start developing Windows Azure applications using Visual Studio.

After installing the SDK and Azure tools for Visual Studio, you can see the templates in the New Project menu in Visual Studio
 


Visual Studio Templates Explained
Windows Azure tools for Visual Studio installs several templates that you can make use of building Windows Azure applications.  Lets take a look at each of the template installed:

Blank Cloud Service Template
This template creates a Windows Azure service project without any roles in it. You have to manually add the roles later.

Web Cloud Service Template
This template creates a Windows Azure service project with a  web role and a web role web application project.

Worker Cloud Service Template
This template creates a Windows Azure service project with a worker role and a worker role application project
Web and Worker Cloud Service Template.

This template creates a Windows Azure service project with both web role, worker role and web role web application project and a worker role application project.

In addition to the above Cloud Service template, Visual Studio also has Roles templates.
 


Web Role Template
This template creates a web role web application project. You can later associate this web role web application project to a web role and cloud service.

Worker Role Template
This template creates a worker role application project. You can later associate this worker role application project to a worker role and cloud service.

Building our 'Hello Cloud' Sample
It's already time for us to build our 'Hello Cloud' application

For this blog post, lets create a simple web role web application project whose job is to just greet users with a text - Hello Cloud.

Open Visual Studio 2008 (as administrator) and choose to create a new Project:


 
Choose the Web Cloud Service template from Cloud Service templates:


 
Name the project as HelloCloud

Visual Studio will create two projects for you

1) HelloCloud - The cloud service project with the web role

2) HelloCloud_WebRole - The web role web application project


 
The web role - HelloCloud_WebRole -  in the HelloCloud service project is associated to your HelloCloud_WebRole web application project

Open the Default.aspx and type - Hello Cloud - Welcome to my first Windows Azure application! - in the HTML editor.
 


Your 'Hello Cloud' Windows Azure application is now ready to be tested!

Hit F5 to debug the application.

Visual Studio will start the local development fabric and host the 'Hello Cloud' web role web application project. You can see the development fabric icon in the taskbar.
 


And our first Windows Azure web application:


 
Double click on the development fabric icon in the taskbar to open the development fabric window. Here, you can see the roles currently running and hosted along with a verbose screen showing the current status or any other events.


 

As you can see in the above screenshot, our webrole HelloCloud is hosted in the development fabric and its status on the verbose window

Visual Studio 2008
simplifies building Windows Azure applications using the Windows Azure tools for Visual Studio. It also allows us to debug Windows Azure application which I think is a big boost to many developers.

Download Visual Studio 2008 90 day trial
For detailed information and to request a free 90-day trial DVD of Visual Studio 2008 Team Suite to be sent out to you, go to the Microsoft Visual Studio webpage.

About the Author
Chaks is currently working for Intergen as a Software Developer. Chaks works extensively in Microsoft Platform. His knowledge covers various Microsoft Technologies like WCF, SharePoint, Windows Azure, ASP.NET. Chaks also writes for Neowin, one of the Microsoft featured communities. You can contact Chaks via his blog - Chaks' Corner.

Other related posts:
The New Zealand ALM Conference 2011 (Application Life Cycle Management)
Writing your own Html Helpers for the ASP.NET MVC Framework
Automating Visual Studio 2008






About the Visual Studio 2008 Blog

In the years since the hugely successful release of Visual Studio 2005, Microsoft has used developer feedback from all over the world to introduce over 250 new features in the 2008 release.

This sponsored blog will bring Visual Studio 2008 tips and tricks from well known developers in the Australian and New Zealand tech community directly to you.

Make sure you bookmark this blog or subscribe to our RSS feed.



Other blog posts

The New Zealand ALM Conference...
Writing your own Html Helpers ...
Automating Visual Studio 2008...
Windows Azure Table Storage - ...
Windows Azure Table Storage - ...
XML and XSLT in Visual Studio ...
Introduction to New SQL Server...
Using the Visual Studio 2008 P...
Why consider sitting for an MC...
Unit testing .Net Compact Fram...


Some recent comments

Praveen M on Visual Studio 2008 support for building SilverLigh: I installed SILVERLIGHT TOOLS for VS2008 at my work. I am able to do silverlight...

zefo on Unit testing with Visual Studio 2008: Just minor recommendation: better use *.png for the screenshots. Jpeg is more su...

gil ziny on Unit testing with Visual Studio 2008: When I associate the unit test with TFS testing policy, if fails during check-in...

lynette on Visual Studio 2008 JavaScript Debugging: i have enable in IE the ability to debug scripts. if i go to my section in my c...

Junkie on Why consider sitting for an MCTS or MCP Certificat: The way you presented the case for certification has been completely different f...

Brian Link on Unit testing with Visual Studio 2008: You seem to be incorrect in one of your opening remarks - it seems that web.conf...

Dipanwaya on Unit testing .Net Compact Framework applications w: Steps Behind the Test in the VS 2008? How to test a module in the VS 2008 Envir...

Ricardo on Visual Studio 2008 support for building SilverLigh: Yes! Found the solution myself :) Reset the environment of Visual Web Developer...

Ricardo on Visual Studio 2008 support for building SilverLigh: Have the same problem after installing Visual Web Developer 2008 SP1 and Silverl...

kjward on Automating Visual Studio 2008: thanks lots for all the great info. i'm sure the answer to my question is in th...



Disclaimer

The Visual Studio 2008 blog is sponsored by Microsoft NZ. The blog posts are the authors' genuine accounts of their experiences with Visual Studio 2008 and are not influenced or filtered by Microsoft NZ in any way.