How to speed up Windows Azure Development (Part 1 of 2, 18 minutes)
This is part 1 of 2 screencasts I recorded that show how to speed up Windows Azure Development (see part 2 here). Specifically, in this screencast I create a sample Windows Azure project with one web role - but the web role is smart enough to load its settings when running the Azure fabric or not - allowing it to be hosted in IIS.
For more articles, screencasts and tips check out www.ehuna.org – you can also follow me on twitter.com/ehuna
Here’s what is covered in the video:
1. To get this working you need Microsoft Visual Studio and the Windows Azure SDK (November 2009 CTP) – you can get it here at -
http://www.microsoft.com/windowsazure/windowsazure/
2. Create a new CloudService project (VB.Net) called “AzureSpeed1”, with an ASP.NET web role called “AzureSpeed1_WebRole”.
3. Create a setting in the ServiceConfiguration.cscfg file.
4. Running the project in the Windows Azure local development fabric. Benefits of running in a virtual machine. A bit slower since we’re running in a virtual machine.
5. Displaying a setting in the default.aspx page – web role still running in the local development fabric.
6. How I’m impatient – I’m used to years of RAD – Rapid Application Development with IIS, ASP.NET, VB.NET and Visual Studio.
7. You can run your web roles in the local development fabric – but you can also run them in IIS! Make sure handle settings and logging properly.
8. Add new IIS site, match azure local development fabric and IIS ports (change by one number – e.g. 8080 and 9080). Try loading the page and see the exception.
9. Knowing whether you’re running the Azure fabric or not.
10. Smarter function to read settings – if not running in the cloud from the web.config.
11. We’re back to RAD development! Build your web role (really just an ASP.NET site) and start testing your ASPX pages – no need to run the local development fabric.
12. Conclusion: whenever you implement a feature in your Windows Azure projects, make sure you add support for running both in the Windows Azure fabric (local development fabric or Staging/Production cloud) or on-premise hosted in IIS. Settings, logging, and ASP.NET sessions are examples of features that need to support both.
Below you can find sample code and additional tips related to this screencast.
Continue reading "How to speed up Windows Azure Development (Part 1 of 2, 18 minutes)" »