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