<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-9132148272745668459</id><updated>2012-01-27T13:18:15.523-08:00</updated><category term='Azure Design Patterns'/><category term='Less is More'/><category term='Neudesic'/><category term='MVC'/><category term='Software Engineering'/><category term='Windows 8'/><category term='Responsive Web Design'/><category term='Azure Boot Camp'/><category term='Family'/><category term='30 Minute Cloud'/><category term='Parenting'/><category term='Code Camp'/><category term='Fire'/><category term='Consulting'/><category term='SOA'/><category term='Azure'/><category term='America'/><category term='Live Services'/><category term='Web'/><category term='Assessment'/><category term='Cloud Gourmet'/><category term='CCUG'/><category term='Data Book'/><category term='Travel'/><category term='Society'/><category term='Windows Azure'/><category term='Humor'/><category term='CloudComputingUserGroup.com'/><category term='Storage'/><category term='Video'/><category term='Articles'/><category term='Facebook'/><category term='Design Patterns'/><category term='Grid Computing'/><category term='Cloud'/><category term='HTML5'/><category term='Responsive Cloud Design'/><category term='Sci Fi'/><category term='XBox'/><category term='ROI'/><category term='BUILD'/><category term='AzureSamples.com'/><category term='jQuery'/><category term='SDS'/><category term='CSS'/><category term='Stupid Cloud Tricks'/><category term='Cloud Computing'/><category term='Azure User Group'/><category term='WAMS'/><category term='Azure Book'/><category term='MVP'/><category term='WP7'/><category term='Windows Server 8'/><category term='Cloud Camp'/><category term='Best Practices'/><category term='Webcast'/><category term='Dr. McCloud'/><category term='Dashboard'/><category term='AWS'/><category term='C#'/><category term='Canvas'/><category term='Rants'/><category term='WCF'/><category term='Evolution'/><category term='PDC'/><category term='Sleep'/><category term='VS2010'/><category term='Self-Improvement'/><category term='JavaScript'/><category term='Cloud Storage'/><category term='Training'/><category term='Azure Storage Explorer'/><category term='Blog'/><category term='Web Azure'/><category term='SoCal'/><category term='CodePlex'/><category term='Speaking'/><category term='Silverlight'/><category term='Ice'/><title type='text'>Fire and Ice: David Pallmann's Web and Cloud Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://davidpallmann.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://davidpallmann.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default?start-index=101&amp;max-results=100'/><author><name>David Pallmann</name><uri>http://www.blogger.com/profile/14482909040736697277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-mPcW-mu5fnI/TWGWz8308CI/AAAAAAAABZc/G7etTBFyHm0/s220/david.pallmann.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>181</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9132148272745668459.post-8492030200102894408</id><published>2012-01-27T13:14:00.000-08:00</published><updated>2012-01-27T13:18:15.544-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cloud'/><category scheme='http://www.blogger.com/atom/ns#' term='Ice'/><category scheme='http://www.blogger.com/atom/ns#' term='Azure'/><title type='text'>Taking a Fresh Look at the Windows Azure Development Experience</title><content type='html'>&lt;span style="font-family: inherit;"&gt;Windows Azure has grown up over the years since it first debuted in late 2008. In this article we're going to take an updated look at what the cloud developer experience is with Windows Azure today. Here's what we'll cover, which will include a walk-through of&amp;nbsp;developing a cloud application:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Key Online Resources&lt;/li&gt;&lt;li&gt;What You Need for Cloud Development&lt;/li&gt;&lt;li&gt;The Cloud Development Lifecycle&lt;/li&gt;&lt;li&gt;Application Development Walk-through&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Key Online Resources&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Azure.com&lt;/strong&gt;&lt;br /&gt;You can't be an effective&amp;nbsp;developer these days without knowing where your online lifelines are! In Windows Azure, that's been made easy by giving you one place to find just about everything: &lt;a href="http://azure.com/"&gt;Azure.com&lt;/a&gt;. Here are some of the things you can do there:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Set up an account or a &lt;a href="http://www.developer.com/services/step-by-step-guide-to-setting-up-a-windows-azure-free-trial.html" target="_blank"&gt;90-day free trial account&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Estimate your operation costs with a pricing calculator&lt;/li&gt;&lt;li&gt;See your current and past billing activity&lt;/li&gt;&lt;li&gt;Visit a developer center&lt;/li&gt;&lt;li&gt;Download an SDK&lt;/li&gt;&lt;li&gt;Find documentation&lt;/li&gt;&lt;li&gt;Go to community forums&lt;/li&gt;&lt;li&gt;Go to the Windows Azure Management Portal to manage your cloud solutions&lt;/li&gt;&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-9FsPTm0u6rI/TyK5mOw84qI/AAAAAAAACFs/sG6LDF29w9c/s1600/AzureDotCom.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="345" src="http://1.bp.blogspot.com/-9FsPTm0u6rI/TyK5mOw84qI/AAAAAAAACFs/sG6LDF29w9c/s400/AzureDotCom.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Whether you work in C# in Visual Studio or Java or PHP in Eclipse, Microsoft wants developers of all stripes to be able to use the Windows Azure platform. The Developer Centeron Azure.com lets you select your preferrred language/platform and gives you information relevant to the way you want to work.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-bJa4VRhWFpk/TyK6KYPZljI/AAAAAAAACF0/4ndz51j-sFc/s1600/AzureDotComDeveloperCenter.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="185" src="http://1.bp.blogspot.com/-bJa4VRhWFpk/TyK6KYPZljI/AAAAAAAACF0/4ndz51j-sFc/s400/AzureDotComDeveloperCenter.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;strong&gt;Windows Azure Management Portal&lt;/strong&gt;&lt;br /&gt;The Windows Azure Management Portal&amp;nbsp;is where you provision cloud services, manage and deploy your solutions, and view status. You can get here by clicking the Manage link on Azure.com, or by&amp;nbsp;navigating directly to &lt;a href="http://windows.azure.com/"&gt;windows.azure.com&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-X5Lb6e2hww0/TyK7OE-c7vI/AAAAAAAACF8/BkjIRNiLhWc/s1600/AzureMgmtPortal.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="306" src="http://4.bp.blogspot.com/-X5Lb6e2hww0/TyK7OE-c7vI/AAAAAAAACF8/BkjIRNiLhWc/s400/AzureMgmtPortal.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://4.bp.blogspot.com/-X5Lb6e2hww0/TyK7OE-c7vI/AAAAAAAACF8/BkjIRNiLhWc/s1600/AzureMgmtPortal.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;What You Need for Cloud Development&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Let's review what you need in order to develop for Windows Azure. You will&amp;nbsp;typically develop and testing your solution locally (using a simulator)&amp;nbsp;before you deploy to a cloud data center.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;To Develop Locally&lt;/strong&gt;&lt;br /&gt;You will need the following in order to develop locally:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A Windows PC (running Windows Vista or later, WIndows 7 recommended)&lt;/li&gt;&lt;li&gt;A development environment, such as Visual Studio or Eclipse&lt;/li&gt;&lt;li&gt;The Windows Azure SDK (download from Azure.com), which includes the Windows Azure Simulation Environment&lt;/li&gt;&lt;li&gt;SQL Server Express&lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;To Deploy and Run in the Cloud&lt;/strong&gt;&lt;br /&gt;You will need the following in order to deploy to a Windows Azure data center:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A Windows Azure account (note there is a 90-trial available, and if you have an MSDN subscription that will also give you some free hours)&lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;The Cloud Development Lifecycle&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;In Windows Azure, the pattern is to&amp;nbsp;develop and test locally as much as you can before&amp;nbsp;deploying to the cloud. Once you're ready to run in the cloud, it's typical with the Compute service to first deploy to&amp;nbsp;a Staging slot, test the solution in the cloud, and finally promote from Staging to Production (a one-click operation). After that, you allow people use your application, monitor and manage activity, and scale scale as needed if demand changes. &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-56gDUN3p9eM/TyLKUPqrxVI/AAAAAAAACGU/CSCSVDt5DSA/s1600/CloudDevLifecycle.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="204" src="http://4.bp.blogspot.com/-56gDUN3p9eM/TyLKUPqrxVI/AAAAAAAACGU/CSCSVDt5DSA/s400/CloudDevLifecycle.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Eventually you'll want to change something in your solution and then the process repeats. In an upgrade situation, promotion Staging to Production is actually swapping them. This allows you to leave the older deployment in Staging until you're sure Production is working as it should, then you can remove it.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Application Development Walk-through&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;To illustrate what development is like, let's walk through provisoning, developing, testing, and deploying a cloud solution.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What We'll Build: T-Shirt World&lt;/strong&gt;&lt;br /&gt;In this example we'll build a simple order entry and order processing application named T-Shirt World. This is a rather simple application--nothing to write home about!--but it's more than a mere Hello, Cloud: it has a front end and a back end, and will make use of multple cloud services.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-r8Nz5yZWWdU/TyLLY_0OMOI/AAAAAAAACGc/uYazU41IRnI/s1600/tshirt01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/-r8Nz5yZWWdU/TyLLY_0OMOI/AAAAAAAACGc/uYazU41IRnI/s400/tshirt01.png" width="330" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;Activity Flow&lt;/strong&gt;&lt;br /&gt;There's a 4-step sequence of activity in T-Shirt World:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Submit an Order&lt;/li&gt;&lt;li&gt;Queue the Order&lt;/li&gt;&lt;li&gt;Dequeue the Order &lt;/li&gt;&lt;li&gt;Store the Order in a Database&lt;/li&gt;&lt;/ol&gt;The first two steps happen on the front end, a web page (what we call a Web Role). The last two steps happen on the back end, in a worker process (what we call a Worker Role).&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/-KjHkHaGsy7A/TyLMGytEtVI/AAAAAAAACGk/beDd-VwpHaI/s1600/tshirt02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="274" src="http://2.bp.blogspot.com/-KjHkHaGsy7A/TyLMGytEtVI/AAAAAAAACGk/beDd-VwpHaI/s400/tshirt02.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;Cloud Services We'll be Using&lt;/strong&gt;&lt;br /&gt;Any cloud solution you create is likely to use&amp;nbsp;multiple Windows Azure services. We're going to make use of four Windows Azure services in this sample application:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Windows Azure Compute - hosts the web role (site) and worker role (back end process)&lt;/li&gt;&lt;li&gt;Windows Azure Storage - image files for the web site&lt;/li&gt;&lt;li&gt;Service Bus - we'll use a queue to route orders from front end to back end&lt;/li&gt;&lt;li&gt;SQL Azure Database - order records&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Walk-through Step 1: Service Provisioning&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;We'll provision the services we're going to use up-front. Stricly speaking, this isn't necessary to do until later since the Compute, Storage, or Database service are available to you locally in the Windows Azure Simulation Environment. However, there's no local simulation of one of the service we're going to be using, the Service Bus, so we'll provision&amp;nbsp;everything here and&amp;nbsp;now.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Provisioning Hosted Service&lt;/strong&gt;&lt;br /&gt;In Windows Azure parlance, a Hosted Service is a project workspace in the Compute service that executes, such as a web site. We go to the Windows Azure Management Portal in our browser and navigate to the Hosted Services area, then click the New Hosted Service toolbar button. We fill in a dialog where we choose a name for the service, a unique DNS prefix, and select one of 6 data center locations. We'll use the name tshirtworld for our hosted service and select the South Central US data center.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-R9fFHyXLc5I/TyMIoXzoUHI/AAAAAAAACKk/mKS2pkCHV0Q/s1600/tshirt03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-R9fFHyXLc5I/TyMIoXzoUHI/AAAAAAAACKk/mKS2pkCHV0Q/s400/tshirt03.png" width="341" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;After a minute or so the service is provisioned and appears in the portal. Here's how the service will look in the portal&amp;nbsp;later on, once we have deployed our solution to its Production slot:&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/-fBs237lF_pI/TyLPtjZchpI/AAAAAAAACG0/_xLZp1Fj1YY/s1600/tshirt04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="306" src="http://2.bp.blogspot.com/-fBs237lF_pI/TyLPtjZchpI/AAAAAAAACG0/_xLZp1Fj1YY/s400/tshirt04.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;Provisioning a Storage Account&lt;/strong&gt;&lt;br /&gt;We want a place to keep web site images, so we will next provision a storage account for the Windows Azure Storage service which includes blob storage. Blobs are similar to files and can be accessed as Internet URIs. To provision a storage account, we navigate to the Storage Accounts area of the portal and click the New Storage Account button. In a dialog we specify a name for the account, a unique DNS prefix, and a data center locaton. We'll use the name tshirtworld for our storage account and again select the South Central US data center, as we want to keep all of our services in the same location for&amp;nbsp;performance reasons.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/-l7sldcFzc8w/TyLQdOJu59I/AAAAAAAACG8/2yQLWAPzJQk/s1600/tshirt05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="229" src="http://2.bp.blogspot.com/-l7sldcFzc8w/TyLQdOJu59I/AAAAAAAACG8/2yQLWAPzJQk/s400/tshirt05.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;After a minute or so the storage account is provisioned. Here's how it looks in the management portal:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-Zgx868OL-uA/TyLQvZyOCAI/AAAAAAAACHE/HkZScSXQ3HI/s1600/tshirt06.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="175" src="http://3.bp.blogspot.com/-Zgx868OL-uA/TyLQvZyOCAI/AAAAAAAACHE/HkZScSXQ3HI/s400/tshirt06.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;Provisioning a Database Server&lt;/strong&gt;&lt;br /&gt;We want to store orders in a database, so we will provision a SQL Azure Database. To do that we first need to provision a virtual database server, and afterward we'll go on to provision a database for that server.&lt;br /&gt;&lt;br /&gt;To create the "server" (there are actually 3 behind the scenes for redundancy), we click the Create Server toolbar button. As we walk through the multi-screen dialog we are choosing a data center location, specifying admin user credentials, and setting up firewall rules.We'll again select the South Central US data center.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-jjDtcX01Ko0/TyLRXFiTxGI/AAAAAAAACHM/B9_TLhMISMY/s1600/tshirt07.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-jjDtcX01Ko0/TyLRXFiTxGI/AAAAAAAACHM/B9_TLhMISMY/s1600/tshirt07.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Soon we have a database server. Unlike most of these other provisioning activities where we get to choose meaningful names, the database server is a cryptic, generated name ("lcuh7n0fna" in our case). Here's how the database server looks in the portal once we've provisioned it:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-p_llc1vx9bE/TyML8zaFshI/AAAAAAAACK0/MC02pWpSrHI/s1600/tshirt08.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="172" src="http://3.bp.blogspot.com/-p_llc1vx9bE/TyML8zaFshI/AAAAAAAACK0/MC02pWpSrHI/s400/tshirt08.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;strong&gt;Provisioning a Database&lt;/strong&gt;&lt;br /&gt;We've just created a database server, now we need to create the database itself. Selecting the database server we just created, we click the New Database toolbar button and (you guessed it) fill in a dialog. We get to specify a name for the database--we'll use tshirtworld, of course--and a size (1-150GB).We'll choose the 1GB size.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-WVtO1flled8/TyLUJGcEd_I/AAAAAAAACHc/K8hGtsLhdzk/s1600/tshirt09.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-WVtO1flled8/TyLUJGcEd_I/AAAAAAAACHc/K8hGtsLhdzk/s1600/tshirt09.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Here's how our databaes appears in the management portal once it's been provisioned:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-K-qDBrt3Hsk/TyMMYJrIqNI/AAAAAAAACK8/2GUdMjaWBAk/s1600/tshirt010.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="258" src="http://1.bp.blogspot.com/-K-qDBrt3Hsk/TyMMYJrIqNI/AAAAAAAACK8/2GUdMjaWBAk/s400/tshirt010.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;strong&gt;Provisioning a Service Bus Namespace&lt;/strong&gt;&lt;br /&gt;We'll be using the Service Bus for a durable queue that connects our front end and our back end to communicate newly submitted orders that are ready for processing. In the Service Bus area of the management portal, we click the New Service Bus Namespace toolbar button. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-3pa2osGaunc/TyLU68E_PoI/AAAAAAAACHs/zS2X3CwcKW4/s1600/tshirt011.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="166" src="http://2.bp.blogspot.com/-3pa2osGaunc/TyLU68E_PoI/AAAAAAAACHs/zS2X3CwcKW4/s400/tshirt011.png" width="400" /&gt;&lt;/a&gt;&lt;br /&gt;Once the namespace is provisioned, here's how it looks in the managment portal.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/-Se7S6-YR2yM/TyLU-ks-oEI/AAAAAAAACH0/Ok8YrEfdfYo/s1600/tshirt012.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="138" src="http://2.bp.blogspot.com/-Se7S6-YR2yM/TyLU-ks-oEI/AAAAAAAACH0/Ok8YrEfdfYo/s400/tshirt012.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;Credentials and Connection Strings&lt;/strong&gt;&lt;br /&gt;We now have our services provisioned. Many of them require us to specify credentials or a connection string in our code in order to use them. You retrieve this information from the management portal.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Walk-through Step 2: Create Solution&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Now it's time to create our solution. We'll be using C#, the .NET Framework, and Visual Studio in this case but as&amp;nbsp;previously mentioned you have the option of using many languages and development environments with Windows Azure.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Creating a Windows Azure Project&lt;/strong&gt;&lt;br /&gt;We'll create our solution by selecting File &amp;gt; New Project. Because we've previously installed the Windows Azure SDK and Tools for Visual Studio, we have a Cloud category and a Windows Azure Project template. We'll select that project template and name our solution Orders.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-ssy47Sg4Kfc/TyLh5H4tVWI/AAAAAAAACH8/T4bLdBWfY6U/s1600/tshirt013.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="276" src="http://4.bp.blogspot.com/-ssy47Sg4Kfc/TyLh5H4tVWI/AAAAAAAACH8/T4bLdBWfY6U/s400/tshirt013.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The project template puts us in a wizard to select projects for our roles. A role in Windows Azure Compute is a tier of your application. Here we want two roles, one for our front end and one for our back end. A Web Role is the appropriate container for our web site, it will give us a load-balanced HTTP endpoint and IIS. We want to use ASP.NET, so we select an "ASP.NET Web Role" in the wizard. For the back end, we can use a Worker Role which is similar to a .NET console program or a Windows Service. With our two roles identified, we click OK to generate a solution.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-1qfe8wq3MP4/TyLkpiqskHI/AAAAAAAACIE/uu-_cbTUtaY/s1600/tshirt014.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="250" src="http://3.bp.blogspot.com/-1qfe8wq3MP4/TyLkpiqskHI/AAAAAAAACIE/uu-_cbTUtaY/s400/tshirt014.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;You might expect that the generated solution will have 2 projects, one for the web role and one for the worker role, but there are in fact 3 projects: a Windows Azure solution also includes a Windows Azure project that contains metadata. This metadata describes the shape of your application to the cloud data center (how many roles does it have? what kind of roles are they? what endpoints do you need?) as well as configuration information (what size VMs do you need, and how many?).&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-05fsGDV-DCE/TyMNkxaMDAI/AAAAAAAACLE/3unMTRbP3Bo/s1600/tshirt015.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-05fsGDV-DCE/TyMNkxaMDAI/AAAAAAAACLE/3unMTRbP3Bo/s1600/tshirt015.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://3.bp.blogspot.com/-05fsGDV-DCE/TyMNkxaMDAI/AAAAAAAACLE/3unMTRbP3Bo/s1600/tshirt015.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-05fsGDV-DCE/TyMNkxaMDAI/AAAAAAAACLE/3unMTRbP3Bo/s1600/tshirt015.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-05fsGDV-DCE/TyMNkxaMDAI/AAAAAAAACLE/3unMTRbP3Bo/s1600/tshirt015.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-05fsGDV-DCE/TyMNkxaMDAI/AAAAAAAACLE/3unMTRbP3Bo/s1600/tshirt015.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;/div&gt;&lt;a href="http://3.bp.blogspot.com/-05fsGDV-DCE/TyMNkxaMDAI/AAAAAAAACLE/3unMTRbP3Bo/s1600/tshirt015.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;Using the Windows Azure Simulation Environment&lt;/strong&gt;&lt;br /&gt;Before we write any code, let's see what it's like to use the local&amp;nbsp;Windows Azure Simulation Environment. This is integrated with Visual Studio, so&amp;nbsp;all we have to do&amp;nbsp;is&amp;nbsp;press F5 and presto, we're running in the simulator. Let's do that now.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-x6TEesy-j1I/TyLnByJP8NI/AAAAAAAACIU/VL__KQJyrnY/s1600/tshirt016.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="280" src="http://3.bp.blogspot.com/-x6TEesy-j1I/TyLnByJP8NI/AAAAAAAACIU/VL__KQJyrnY/s400/tshirt016.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;One hint that we're running in the simulator is the web address: 127.0.0.1:81. But we can see more, the simulation environment has a UI for its Compute Emulator. To bring that up, we find the blue Windows Azure system tray icon at the lower right of our desktop, right click, and select Show Compute Emulator UI. This give us an insightful&amp;nbsp;view of our roles and VM instances. At the moment, we only have 1 web role VM instance and one worker role instance, but later we'll increase that.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-G7JwRBWiWkg/TyLodTcuxaI/AAAAAAAACIk/-V7hq5ED4Y0/s1600/tshirt017.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="233" src="http://3.bp.blogspot.com/-G7JwRBWiWkg/TyLodTcuxaI/AAAAAAAACIk/-V7hq5ED4Y0/s400/tshirt017.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Now that we've seen the simulator, let's stop the solution running in Visual Studio and proceed to implement our application. We could also use the simulator for storage and database, but since we've already provisioned those in the cloud we're just going to consume those services directly in this walk-through.&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Walk-through Step 3: Using the Compute Service&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Let's move forward in time and imagine that we've implemented an order entry form in HTML and CSS:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-VYwTRotq_RM/TyLpDLuO2EI/AAAAAAAACIs/RfvUqx0RuGo/s1600/tshirt018.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="310" src="http://1.bp.blogspot.com/-VYwTRotq_RM/TyLpDLuO2EI/AAAAAAAACIs/RfvUqx0RuGo/s400/tshirt018.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://1.bp.blogspot.com/-VYwTRotq_RM/TyLpDLuO2EI/AAAAAAAACIs/RfvUqx0RuGo/s1600/tshirt018.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;br /&gt;Before we launch this, let's up the number of web role instance from 1 to 2. We can do this by editing the ServiceConfiguration..cscfg file in the Windows Azure Project. There are two versions of this file, a local one and a cloud one. The local one applies to the simulator, the cloud one to an actual cloud deployment.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-0mJIMjL8Cvk/TyLpwo-UplI/AAAAAAAACI0/sosqL0UEAnQ/s1600/tshirt019.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="135" src="http://4.bp.blogspot.com/-0mJIMjL8Cvk/TyLpwo-UplI/AAAAAAAACI0/sosqL0UEAnQ/s400/tshirt019.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now we can hit F5 to again launch the solution. Now we see our web form in the browser. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-1sGiVrlhX0c/TyLsm4DPpEI/AAAAAAAACI8/w48qoLsoJ4o/s1600/tshirt020.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-1sGiVrlhX0c/TyLsm4DPpEI/AAAAAAAACI8/w48qoLsoJ4o/s400/tshirt020.png" width="366" /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/-1sGiVrlhX0c/TyLsm4DPpEI/AAAAAAAACI8/w48qoLsoJ4o/s1600/tshirt020.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://3.bp.blogspot.com/-1sGiVrlhX0c/TyLsm4DPpEI/AAAAAAAACI8/w48qoLsoJ4o/s1600/tshirt020.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;If we again launch the Compute Emulator UI, we see now that the web role has 2 instances because of the configuration change we made:&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&amp;nbsp;&lt;a href="http://4.bp.blogspot.com/-vCAR-FfHs08/TyLs33vAN6I/AAAAAAAACJE/s_nXZOVIVDo/s1600/tshirt021.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="234" src="http://4.bp.blogspot.com/-vCAR-FfHs08/TyLs33vAN6I/AAAAAAAACJE/s_nXZOVIVDo/s400/tshirt021.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Let's stop the solution and proceed to look at storage next.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Walk-through Step 4: Using the Storage Service&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Our web site has images of T-Shirts, and while we could just add those images to the&amp;nbsp;ASP.NET project let's assume we'd like them to be dynamic and easily changeable.&amp;nbsp;To accomplish that, we can use blob storage.&lt;br /&gt;&lt;br /&gt;If you go&amp;nbsp;back and look at&amp;nbsp;the web solution, the images are not in the solution. Instead the HTML/CSS page references URIs like "tshirtworld.blob.core.windows.net/images/black-tshirt.png". This reflects that we're using blob storage. The URL format includes our storage account endpoint (tshirtworld.blob.core.windows.net), the path to our container (images), and the blob names (such as black-tshirt.png).&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-ZlqsUhjAfVs/TyLtrJHKeGI/AAAAAAAACJM/3qTqJ0VKhIE/s1600/tshirt022.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="215" src="http://1.bp.blogspot.com/-ZlqsUhjAfVs/TyLtrJHKeGI/AAAAAAAACJM/3qTqJ0VKhIE/s400/tshirt022.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;We put the images in storage using a storage tool--we'll use &lt;a href="http://azurestorageexplorer.codeplex.com/" target="_blank"&gt;Azure Storage Explorer&lt;/a&gt; here, which is free. Cloud Storage Studio is also popular. We've created a blob container named &lt;u&gt;images&lt;/u&gt; and we've uploaded our T-shirt image files to it. Because the images container was configured for public access, these image files can be accessed as Internet URIs. That allows us to referene them in our web page.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-REVwe5CFcuU/TyMP_wgDhsI/AAAAAAAACLM/F91VMpRn2fU/s1600/tshirt031.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="288" src="http://1.bp.blogspot.com/-REVwe5CFcuU/TyMP_wgDhsI/AAAAAAAACLM/F91VMpRn2fU/s400/tshirt031.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Walk-through Step 5: Using the Service Bus&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Now we want to capture a submitted order and pass it to our back end for processing. We can use a queue for that. We have two kinds of queues available in Windows Azure: simple queues (part of the Storage service) or deluxe enterprise-class queues (part of the Service Bus service). We'll use a Service Bus Queue here.&lt;br /&gt;&lt;br /&gt;In our web server code, when an order is submitted our handler will collect the order fields from the web form, construct an order message, and queue it. The code looks like this, and it uses credentials from the Service Bus namespace we set up&amp;nbsp;when we provisioned our cloud services&amp;nbsp;You might choose to put your order information in the body of the message (say in XML or JSON), or in message properties. We've actually done both below so you can compare them. Message properties are useful because you could filter on them for example to separate processing of air ship orders from ground ship orders.&lt;br /&gt;&lt;pre class="brush: csharp"&gt;protected void Submit_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;    try&lt;br /&gt;    {&lt;br /&gt;        tP = TokenProvider.CreateSharedSecretTokenProvider(issuer, key);&lt;br /&gt;&lt;br /&gt;        Uri uri = ServiceBusEnvironment.CreateServiceUri("sb", serviceBusNamespace, string.Empty);&lt;br /&gt;&lt;br /&gt;        namespaceManager = new NamespaceManager(uri, tP);&lt;br /&gt;&lt;br /&gt;        MessagingFactory factory = MessagingFactory.Create(uri, tP);&lt;br /&gt;        MessageSender messageSender = factory.CreateMessageSender(queueName);&lt;br /&gt;&lt;br /&gt;        string name = Request.Form["name"];&lt;br /&gt;        string email = Request.Form["email"];&lt;br /&gt;        string phone = Request.Form["phone"];&lt;br /&gt;        string address = Request.Form["address"];&lt;br /&gt;        string city = Request.Form["city"];&lt;br /&gt;        string state = Request.Form["state"];&lt;br /&gt;        string postalCode = Request.Form["postalcode"];&lt;br /&gt;        string country = Request.Form["country"];&lt;br /&gt;        string color = Request.Form["color"];&lt;br /&gt;        string cardNumber = Request.Form["cardnumber"];&lt;br /&gt;        string securityCode = Request.Form["secure"];&lt;br /&gt;        string nameOnCard = Request.Form["namecard"];&lt;br /&gt;&lt;br /&gt;        if (String.IsNullOrEmpty(name))&lt;br /&gt;        {&lt;br /&gt;            Status.Text = "Name is required";&lt;br /&gt;            return;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        if (String.IsNullOrEmpty(email))&lt;br /&gt;        {&lt;br /&gt;            Status.Text = "Email is required";&lt;br /&gt;            return;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        if (String.IsNullOrEmpty(phone))&lt;br /&gt;        {&lt;br /&gt;            Status.Text = "Phone is required";&lt;br /&gt;            return;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        BrokeredMessage message = new BrokeredMessage(&lt;br /&gt;            String.Format("&amp;lt;Order&amp;gt;&amp;lt;Name&amp;gt;{0}&amp;lt;/Name&amp;gt;&amp;lt;Email&amp;gt;{1}&amp;lt;/Email&amp;gt;&amp;lt;Phone&amp;gt;{2}&amp;lt;/Phone&amp;gt;&amp;lt;Address&amp;gt;&amp;lt;Street&amp;gt;{3}&amp;lt;/Street&amp;gt;&amp;lt;City&amp;gt;{4}&amp;lt;/City&amp;gt;&amp;lt;State&amp;gt;{5}&amp;lt;/State&amp;gt;&amp;lt;PostalCode&amp;gt;{6}&amp;lt;/PostalCode&amp;gt;&amp;lt;Country&amp;gt;{7}&amp;lt;/Country&amp;gt;&amp;lt;/Address&amp;gt;&amp;lt;Color&amp;gt;{8}&amp;lt;/Color&amp;gt;&amp;lt;Card number=\"{9}\" securityCode=\"{10}\" nameOnCard=\"{11}\"/&amp;gt;&amp;lt;/Order&amp;gt;",&lt;br /&gt;                name, email, phone, address, city, state, postalCode, country, color, cardNumber, securityCode, nameOnCard)&lt;br /&gt;        );&lt;br /&gt;&lt;br /&gt;        message.Properties["Name"] = name;&lt;br /&gt;        message.Properties["Email"] = email;&lt;br /&gt;        message.Properties["Phone"] = phone;&lt;br /&gt;        message.Properties["Address"] = address;&lt;br /&gt;        message.Properties["City"] = city;&lt;br /&gt;        message.Properties["State"] = state;&lt;br /&gt;        message.Properties["PostalCode"] = postalCode;&lt;br /&gt;        message.Properties["Country"] = country;&lt;br /&gt;        message.Properties["Color"] = color;&lt;br /&gt;        message.Properties["CardNumber"] = cardNumber;&lt;br /&gt;        message.Properties["SecurityCode"] = securityCode;&lt;br /&gt;        message.Properties["NameOnCard"] = nameOnCard;&lt;br /&gt;&lt;br /&gt;        // Send message to the queue&lt;br /&gt;        messageSender.Send(message);&lt;br /&gt;&lt;br /&gt;        Status.Text = "Thank you for your order!";&lt;br /&gt;    }&lt;br /&gt;    catch (Exception ex)&lt;br /&gt;    {&lt;br /&gt;        Status.Text = "ERROR";&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;That's order submission on the front end, but we also need order processing on the back end. Let's tale a look at our worker role code, which has a Run() loop. We use the Windows Azure API to loop on queue messages and process them. Our processing consists of adding an order record to&amp;nbsp;the database (we've left that part of the code for now because we'll look at it separately in the next section). Our code outputs trace messages, which we'll be able to view on the console window in the Compute Emulator UI.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;public override void Run()&lt;br /&gt;{&lt;br /&gt;    // This is a sample worker implementation. Replace with your logic.&lt;br /&gt;    Trace.WriteLine("$projectname$ entry point called", "Information");&lt;br /&gt;&lt;br /&gt;    dbConnection = new SqlConnection(connectionString);&lt;br /&gt;&lt;br /&gt;    tP = TokenProvider.CreateSharedSecretTokenProvider(issuer, key);&lt;br /&gt;&lt;br /&gt;    Uri uri = ServiceBusEnvironment.CreateServiceUri("sb", serviceBusNamespace, string.Empty);&lt;br /&gt;&lt;br /&gt;    MessagingFactory factory = MessagingFactory.Create(uri, tP);&lt;br /&gt;    MessageReceiver orders = factory.CreateMessageReceiver("orders", ReceiveMode.PeekLock);&lt;br /&gt;&lt;br /&gt;    while (true)&lt;br /&gt;    {&lt;br /&gt;        BrokeredMessage message = orders.Receive();&lt;br /&gt;&lt;br /&gt;        if (message != null)&lt;br /&gt;        {&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                // Acknowledge receipt of order.&lt;br /&gt;&lt;br /&gt;                Trace.WriteLine("-------------------- Order Received ------------------", "Information");&lt;br /&gt;                Trace.WriteLine(message.GetBody&amp;lt;string&amp;gt;(), "Information");&lt;br /&gt;&lt;br /&gt;                // Insert a record in database Order table.&lt;br /&gt;                ...removed for brevity...&lt;br /&gt;&lt;br /&gt;                // Remove message from queue&lt;br /&gt;                message.Complete();&lt;br /&gt;            }&lt;br /&gt;            catch (Exception)&lt;br /&gt;            {&lt;br /&gt;                // Indicate a problem, unlock message in queue&lt;br /&gt;                message.Abandon();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        Thread.Sleep(10000);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Let's try this out. We&amp;nbsp;again launch our solution with F5.&amp;nbsp;We'll be sure to open the Compute Emulator UI and be viewing the worker role's console window before we submit any orders because we want to see the activity.&lt;br /&gt;&lt;br /&gt;On the order form in the browser, we enter an order and click the Buy It&amp;nbsp;button. After the message is submitted to the Service Bus Queue we'll see a confirmation message on the web page:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/-mSdIOGix61k/TyL5a3ZZKaI/AAAAAAAACJU/248h1lm215Y/s1600/tshirt023.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-mSdIOGix61k/TyL5a3ZZKaI/AAAAAAAACJU/248h1lm215Y/s1600/tshirt023.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now back to the worker role console window in the Compute Emulator UI. We soon see ---- Order Received --- and the order details displayed. We thus see the Service Bus Queue doing its job of coordinating our front end and back end.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-Q5BnXPkFxSs/TyL5z9cZ98I/AAAAAAAACJc/YDjWMA_pgLI/s1600/tshirt024.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="233" src="http://3.bp.blogspot.com/-Q5BnXPkFxSs/TyL5z9cZ98I/AAAAAAAACJc/YDjWMA_pgLI/s400/tshirt024.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://3.bp.blogspot.com/-Q5BnXPkFxSs/TyL5z9cZ98I/AAAAAAAACJc/YDjWMA_pgLI/s1600/tshirt024.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Walk-through Step 6: Using SQL Azure Database&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;In the last step we showed how the Worker Role processes order messages from a queue, but we glossed over what the processing is, which is to add order records to our database. Let's see now how that is done.&lt;br /&gt;&lt;br /&gt;You'll recall that earlier we created a database server and a database in the SQL Azure Database service. That service uses the same programming model and protocol as good old SQL Server, so using it is a very familiar experience. Here's the code within our Worker Role Run loop that&amp;nbsp;inserts database records. We're using ADO.NET objects from the System.Data.SqlClient namespace like SqlConnection and SqlCommand.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;// Insert a record in database Order table.&lt;br /&gt;&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;    dbConnection.Open();&lt;br /&gt;&lt;br /&gt;    dbCmd = new SqlCommand(&lt;br /&gt;        String.Format("INSERT INTO [Order] (Name, Email, Phone, Address, City, State, PostalCode, Country, Color, CardNumber, SecurityCode, NameOnCard) VALUES ('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}')",&lt;br /&gt;            message.Properties["Name"],&lt;br /&gt;            message.Properties["Email"],&lt;br /&gt;            message.Properties["Phone"],&lt;br /&gt;            message.Properties["Address"],&lt;br /&gt;            message.Properties["City"],&lt;br /&gt;            message.Properties["State"],&lt;br /&gt;            message.Properties["PostalCode"],&lt;br /&gt;            message.Properties["Country"],&lt;br /&gt;            message.Properties["Color"],&lt;br /&gt;            Convert.ToString(message.Properties["CardNumber"]).Substring(0, 4) + "XXXXXXXXXXXXXXXXXXXX",&lt;br /&gt;            message.Properties["SecurityCode"],&lt;br /&gt;            message.Properties["NameOnCard"]&lt;br /&gt;        )&lt;br /&gt;    , dbConnection);&lt;br /&gt;&lt;br /&gt;    dbCmd.ExecuteNonQuery();&lt;br /&gt;&lt;br /&gt;    dbConnection.Close();&lt;br /&gt;&lt;br /&gt;    Trace.WriteLine("Order stored in database", "Information");&lt;br /&gt;}&lt;br /&gt;catch (Exception ex)&lt;br /&gt;{&lt;br /&gt;    Trace.WriteLine("Error inserting order in database - " + ex.Message, "Error");&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Let's view our data. We can use SQL Server Management Studio (2008 R2 edition) or the Windows Azure Management Portal to query. We'll use SSMS here. Here's the conection dialog:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-A_ECIMhEb-M/TyL-NYhKiQI/AAAAAAAACJk/C7q5_tfTm0A/s1600/tshirt025.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-A_ECIMhEb-M/TyL-NYhKiQI/AAAAAAAACJk/C7q5_tfTm0A/s1600/tshirt025.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now we can open a query window and perform a SELECT * FROM [Order} to see the orders we've been submitting. As you can see, this is a very familiar experience using tools you already know, but with some new aspects like the formats of the server address and username.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-BbiS2hBQOO0/TyL-cZ9c3PI/AAAAAAAACJs/-1dCdGmZYi4/s1600/tshirt026.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="176" src="http://1.bp.blogspot.com/-BbiS2hBQOO0/TyL-cZ9c3PI/AAAAAAAACJs/-1dCdGmZYi4/s400/tshirt026.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Walk-through Step 7: Deploy to the Cloud&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;At this point, we've seen the application do everything it's supposed to: web order entry form, order queueing, order dequeing, and database storage. We've been using using real cloud services already for storage, database, and the service bus--but we've been executing locally in the simulation environment. Our solution is not yet running in the cloud and no one else can use it. So it's time to deploy our solution to Windows Azure Compute as a hosted service.&lt;br /&gt;&lt;br /&gt;There are a few different ways we can deploy to the cloud:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Package the solution and upload through the management portal&lt;/li&gt;&lt;li&gt;Package and publish the solution all from within&amp;nbsp;Visual Studio&lt;/li&gt;&lt;li&gt;Command line / scripting&lt;/li&gt;&lt;li&gt;In code, using a Service Management API&lt;/li&gt;&lt;/ul&gt;We're going to use the first method. Specifically, we'll ask Visual Studio to package the solution and then we'll manually upload it to the Management Portal.&lt;br /&gt;&lt;br /&gt;To package our application, we go to Visual Studio's Solution Explorer, right-click our Windows Azure Project, and select the Package action. This will create a package file named Orders.cspkg ("cloud service package"), which is a zip file of the solution's runtime code and content, encrypted. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-OZN4cIUXT7o/TyMAom_HaqI/AAAAAAAACJ0/xqOcPXjlIBM/s1600/tshirt027.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-OZN4cIUXT7o/TyMAom_HaqI/AAAAAAAACJ0/xqOcPXjlIBM/s1600/tshirt027.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;When the process completes, a Publish folder will open in Windows Explorer showing two files: the package file, and your cloud service configuration file. We'll need to upload both files. The reason the configuration file is kept outside the package is so we can make changes after deployment, such as increasing the number of VM instances in a role.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-wBx8NiAAdbw/TyMA2cY_d2I/AAAAAAAACJ8/TrJ73UO6HiQ/s1600/tshirt028.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="113" src="http://3.bp.blogspot.com/-wBx8NiAAdbw/TyMA2cY_d2I/AAAAAAAACJ8/TrJ73UO6HiQ/s400/tshirt028.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now we can return to the Windows Azure Management Portal to upload our package. We navigate to the Hosted Services area and find the tshirtworld hosted service project we provisioned earlier. We click New Staging Deployment or New Production Deployment, depending which slot we want to deploy to, and fill in a dialog. The dialog prompts us for a label for the deployment (I usually put the date and time here), and is where we upload the two files that the Package action generated for us: a .cspkg and a .cscfg file.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-1Du1S15NNSs/TyMB1X5dvxI/AAAAAAAACKM/SKX2EXB5Qrs/s1600/tshirt030.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="282" src="http://3.bp.blogspot.com/-1Du1S15NNSs/TyMB1X5dvxI/AAAAAAAACKM/SKX2EXB5Qrs/s400/tshirt030.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;It will take 15 minutes or so for the deployment to complete. When it's done, you can access your solution in the cloud.&amp;nbsp;The access URL will be name&lt;name&gt;.cloudapp.net, where 'name'&amp;nbsp;&lt;name&gt; is the unique production name you chose (for a Production slot) or is&amp;nbsp;a generated cryptic&amp;nbsp;name (for a Staging slot). You can see and these URLs in the managment portal.&lt;/name&gt;&lt;/name&gt;&lt;/div&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-JbR05HSEDnY/TyMBksFXW3I/AAAAAAAACKE/UlJulebvUBA/s1600/tshirt029.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="112" src="http://3.bp.blogspot.com/-JbR05HSEDnY/TyMBksFXW3I/AAAAAAAACKE/UlJulebvUBA/s400/tshirt029.png" width="400" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To promote from Staging to Production (or to swap them, if both slots are occupied), use the Swap VIP toolbar button. This will exchange the virtual IPs, and only takes 20-30 seconds typically. I like to leave the older deployment up in Staging until I've verified what's in Production is working, then remove the Staging deployment. You do want to make sure you undeploy anything no longer needed, else you'll be spending money needlessly.&lt;br /&gt;&lt;br /&gt;Well, there you have it. The Windows Azure development experience has come a long way since its debut a few years back and it is constantly being improved. I encourage you to get the 90-day Windows Azure Free Trial and take it for a spin!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9132148272745668459-8492030200102894408?l=davidpallmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidpallmann.blogspot.com/feeds/8492030200102894408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9132148272745668459&amp;postID=8492030200102894408' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/8492030200102894408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/8492030200102894408'/><link rel='alternate' type='text/html' href='http://davidpallmann.blogspot.com/2012/01/taking-fresh-look-at-windows-azure.html' title='Taking a Fresh Look at the Windows Azure Development Experience'/><author><name>David Pallmann</name><uri>http://www.blogger.com/profile/14482909040736697277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-mPcW-mu5fnI/TWGWz8308CI/AAAAAAAABZc/G7etTBFyHm0/s220/david.pallmann.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-9FsPTm0u6rI/TyK5mOw84qI/AAAAAAAACFs/sG6LDF29w9c/s72-c/AzureDotCom.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9132148272745668459.post-5369130707034520781</id><published>2012-01-26T12:53:00.000-08:00</published><updated>2012-01-26T12:53:42.949-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='Cloud'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML5'/><category scheme='http://www.blogger.com/atom/ns#' term='Ice'/><category scheme='http://www.blogger.com/atom/ns#' term='Speaking'/><category scheme='http://www.blogger.com/atom/ns#' term='Fire'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Azure'/><title type='text'>Upcoming Sessions on Web and Cloud at SoCal Code Camp Jan 28 2012</title><content type='html'>&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Here are some talks I and my &lt;a href="http://www.neudesic.com/"&gt;Neudesic&lt;/a&gt; colleageus are&amp;nbsp;giving on web,&amp;nbsp;cloud, and programming&amp;nbsp;at SoCal Code Camp this weekend in Orange County:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;a href="http://www.socalcodecamp.com/"&gt;&lt;span style="font-size: large;"&gt;SoCal Code Camp&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;Sat&amp;nbsp; Jan 28 2012 - Sun Jan 29 2012&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;Mobile &amp;amp; Global with HTML5, MVC and Windows Azure&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;David Pallmann (@davidpallmann)&amp;nbsp;Sat Jan 28 12:15p&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;What happens when the web meets the cloud? The modern web (HTML5, mobile devices) is revolutioning the front end and our experiences, while at the same time the cloud (cloud computing, social networks) is revolutioning the back end. Putting them together gives you web-cloud applications that can run anywhere and everywhere. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;In this session you'll see how to create solutions that are "mobile &amp;amp; global" by combining HTML5, mobile devices, and open standards on the web client with the MS web platform, Windows Azure cloud computing, and social networking on the web server. We'll progressively develop a "mobile &amp;amp; global" application in 7 steps, starting with design comps and ending with global deployment on 3 continents.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;Windows Azure Design Patterns&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Mickey Williams (@mickeyw)&amp;nbsp;Sat Jan 28 2:45p&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;times new roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-ansi-language: en-us; mso-bidi-language: ar-sa; mso-fareast-font-family: calibri; mso-fareast-language: en-us; mso-fareast-theme-font: minor-latin;"&gt;&lt;span style="color: black; font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;In order to design great cloud solutions architects need to understand the design patterns intrinsic to their cloud platform. In this session we will review the design patterns inherent in the Windows Azure platform services, followed by a discussion of application patterns for combining those services. Design patterns will be reviewed for compute, storage, relational data, communication, security, and networking. Key patterns will be illustrated with application examples.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Using Lucene for Full-Text Search in Azure&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Mickey Williams (@mickeyw)&amp;nbsp;Sat Jan 28 4:00p&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;SQL Azure does not currently support full-text indexing. In this talk, we will walk through the use of Lucene to provide full-text search capabilities.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;F# - Functional Programming Fundamentals&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&lt;a href="http://www.linkedin.com/pub/oleksiy-tereshchenko/31/33/7a7"&gt;Oleksiy Tereshchenko&lt;/a&gt;&amp;nbsp;Sat Jan 28 4:00p&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;F# is functional programming language. Originally, developed by Microsoft Research. Iit is fully supported by Microsoft Development Division in Visual Studio 2010. Presentation will provide overview of the language and include fundamental programming concepts. Attendees will be able to understand what it is about F# that is interesting and exciting, even if they can’t necessarily see how to apply it themselves just yet.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;F# - Functional Programming Progamming Techniques&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&lt;a href="http://www.linkedin.com/pub/oleksiy-tereshchenko/31/33/7a7"&gt;Oleksiy Tereshchenko&lt;/a&gt; Sun Jan 29 9:00a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;F# is functional programming language. Originally, developed by Microsoft Research, it is fully supported by Microsoft Development Division in Visual Studio 2010. Presentation will provide overview of the functional programming techniques and demonstrate them using calculator parser. Attendees will be able to experience functional style development.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9132148272745668459-5369130707034520781?l=davidpallmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidpallmann.blogspot.com/feeds/5369130707034520781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9132148272745668459&amp;postID=5369130707034520781' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/5369130707034520781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/5369130707034520781'/><link rel='alternate' type='text/html' href='http://davidpallmann.blogspot.com/2012/01/upcoming-sessions-on-web-and-cloud-at.html' title='Upcoming Sessions on Web and Cloud at SoCal Code Camp Jan 28 2012'/><author><name>David Pallmann</name><uri>http://www.blogger.com/profile/14482909040736697277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-mPcW-mu5fnI/TWGWz8308CI/AAAAAAAABZc/G7etTBFyHm0/s220/david.pallmann.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9132148272745668459.post-7710293363236998076</id><published>2012-01-17T20:58:00.000-08:00</published><updated>2012-01-17T20:59:34.422-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HTML5'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><category scheme='http://www.blogger.com/atom/ns#' term='Fire'/><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Adventures in HTML5: Debug Hero game featuring CSS Sprites and jQuery Animation</title><content type='html'>&lt;br /&gt;&lt;div class="MsoNormal"&gt;I’ve created my first HTML5 game, which I call Debug Hero.You can play it online &lt;a href="http://debughero.cloudapp.net/"&gt;here&lt;/a&gt;. Theobject is to kill bugs. This is not an HTML5 canvas game; rather, it uses CSSsprites and jQuery animation, combined with purchased stock art &lt;a href="http://www.shutterstock.com/pic-38549419/stock-vector-bee-idea.html?src=lb-10841212"&gt;characters&lt;/a&gt; and&lt;a href="http://www.shutterstock.com/pic-90874964/stock-vector-vector-blue-electronic-tree-eps.html?src=lb-10841212"&gt;backgrounds&lt;/a&gt;. The art came from several different sources but works welltogether.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-WVd_MWqx1JY/TxZNXo0fmaI/AAAAAAAACE8/2Ozc_m-oCoQ/s1600/bugs1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-WVd_MWqx1JY/TxZNXo0fmaI/AAAAAAAACE8/2Ozc_m-oCoQ/s400/bugs1.png" width="397" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;In Debug Hero, you’re the nerd and it’s your job, naturally,to kill all the bugs. On each level, the variety of bugs increases and so doesthe effectiveness of your weapon. Bugs include the ground-based roly poly, thelow-flying dragonfly, the high flying bees, and the mosquito (which can end thegame for you if you get stung). Your weapons begin with a spray can ofinsecticide, then you graduate to a small sprayer and then a large sprayer. Youneed a certain amount of energy to operate your weapon, and you can recharge byvisiting the vending machine for some caffeine.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-xTsHiOeYXhU/TxZNgJFl5YI/AAAAAAAACFE/74CyLc8Jq9o/s1600/bugs.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="135" src="http://4.bp.blogspot.com/-xTsHiOeYXhU/TxZNgJFl5YI/AAAAAAAACFE/74CyLc8Jq9o/s400/bugs.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Here’s the entire body of the page, which couldn’t besimpler: it’s just divs.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;div&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="canvas"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="canvas1"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;div&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="message"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="message"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: red;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;div&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="level"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="level"&amp;gt;&lt;/span&gt;&lt;span style="color: red;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;div&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="energy"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="energy10"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: red;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;div&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="toolbox"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="sprite toolbox"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;div&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="vending"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="sprite vending"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="vendingLogo"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="sprite vendingLogo"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;div&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="weapon"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="sprite"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;div&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="nerd"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="sprite geek1"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;div&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="bug0"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="sprite hiddenbug"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;div&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="bug1"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="sprite hiddenbug"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;div&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="bug2"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="sprite hiddenbug"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;div&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="bug3"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="sprite hiddenbug"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;div&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="bug4"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="sprite hiddenbug"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;div&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="bug5"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="sprite hiddenbug"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;div&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="bug6"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="sprite hiddenbug"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;div&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="bug7"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="sprite hiddenbug"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;div&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="bug8"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="sprite hiddenbug"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;div&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="bug9"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="sprite hiddenbug"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;div&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="bug10"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="sprite hiddenbug"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;div&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="bug11"&lt;/span&gt; &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="sprite hiddenbug"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;I’m using CSS sprites to avoid lots of image downloads.Characters like the bee bug have several different appearances (standing,dancing, afraid) but are contained in a single image. By changing the CSS classon a div I can change the appearance to select the portion of the image I wantto be visible. The other bugs types, weapons, and the nerd are all handled withthis technique.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.beebug1&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/bugbee_sprites.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;0px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.beebug2&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/bugbee_sprites.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;-70px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.beebugHit&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;:&lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/bugbee_sprites.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;-140px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-4GVHOH9o5Yw/TxZNvdeLJ8I/AAAAAAAACFM/Wm6qTEVTHpQ/s1600/bugbee_sprites_70.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-4GVHOH9o5Yw/TxZNvdeLJ8I/AAAAAAAACFM/Wm6qTEVTHpQ/s400/bugbee_sprites_70.png" width="133" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;Here’s the CSS for the game, also short and sweet:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.canvas1&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;: &lt;span style="color: blue;"&gt;relative&lt;/span&gt;; &lt;span style="color: red;"&gt;top&lt;/span&gt;: &lt;span style="color: blue;"&gt;0px&lt;/span&gt;; &lt;span style="color: red;"&gt;left&lt;/span&gt;: &lt;span style="color: blue;"&gt;0px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;800px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;800px&lt;/span&gt;; &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;black&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/background1.png')&lt;/span&gt;} &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.canvas2&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;: &lt;span style="color: blue;"&gt;relative&lt;/span&gt;; &lt;span style="color: red;"&gt;top&lt;/span&gt;: &lt;span style="color: blue;"&gt;0px&lt;/span&gt;; &lt;span style="color: red;"&gt;left&lt;/span&gt;: &lt;span style="color: blue;"&gt;0px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;800px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;800px&lt;/span&gt;; &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;black&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/background2.png')&lt;/span&gt;} &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.sprite&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;display&lt;/span&gt;: &lt;span style="color: blue;"&gt;inherit&lt;/span&gt;; &lt;span style="color: red;"&gt;position&lt;/span&gt;: &lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;100px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;100px&lt;/span&gt;; &lt;span style="color: red;"&gt;float&lt;/span&gt;: &lt;span style="color: blue;"&gt;none&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: darkgreen; font-family: Consolas; font-size: 9.5pt;"&gt;/* Notification */&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.message&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;: &lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt;; &lt;span style="color: red;"&gt;color&lt;/span&gt;: &lt;span style="color: blue;"&gt;White&lt;/span&gt;; &lt;span style="color: red;"&gt;font-family&lt;/span&gt;: &lt;span style="color: blue;"&gt;Arial&lt;/span&gt;; &lt;span style="color: red;"&gt;font-size&lt;/span&gt;: &lt;span style="color: blue;"&gt;1.75em&lt;/span&gt;; &lt;span style="color: red;"&gt;opacity&lt;/span&gt;: &lt;span style="color: blue;"&gt;0.5&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;800px&lt;/span&gt;; &lt;span style="color: red;"&gt;top&lt;/span&gt;: &lt;span style="color: blue;"&gt;10px&lt;/span&gt;; &lt;span style="color: red;"&gt;left&lt;/span&gt;: &lt;span style="color: blue;"&gt;10px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.level&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;: &lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt;; &lt;span style="color: red;"&gt;color&lt;/span&gt;: &lt;span style="color: blue;"&gt;White&lt;/span&gt;; &lt;span style="color: red;"&gt;font-family&lt;/span&gt;: &lt;span style="color: blue;"&gt;Arial&lt;/span&gt;; &lt;span style="color: red;"&gt;font-size&lt;/span&gt;: &lt;span style="color: blue;"&gt;1.75em&lt;/span&gt;; &lt;span style="color: red;"&gt;opacity&lt;/span&gt;: &lt;span style="color: blue;"&gt;0.5&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;800px&lt;/span&gt;; &lt;span style="color: red;"&gt;top&lt;/span&gt;: &lt;span style="color: blue;"&gt;10px&lt;/span&gt;; &lt;span style="color: red;"&gt;left&lt;/span&gt;: &lt;span style="color: blue;"&gt;350px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: darkgreen; font-family: Consolas; font-size: 9.5pt;"&gt;/* Bug sprites */&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.hiddenbug&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;display&lt;/span&gt;:&lt;span style="color: blue;"&gt;none&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.beebug1&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/bugbee_sprites.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;0px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.beebug2&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/bugbee_sprites.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;-70px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.beebugHit&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;:&lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/bugbee_sprites.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;-140px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.dragonflybug1&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;:&lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/bugdragonfly_sprites.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;0px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.dragonflybug2&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;:&lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/bugdragonfly_sprites.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;-70px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.dragonflybugHit&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;:&lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/bugdragonfly_sprites.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;-140px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.rolypolybug1&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;:&lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/bugrolypoly_sprites.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;0px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.rolypolybug2&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;:&lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/bugrolypoly_sprites.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;-70px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.rolypolybugHit&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;:&lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/bugrolypoly_sprites.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;-140px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.mosquitobug&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;:&lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/bugmosquito.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;0px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;70px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: darkgreen; font-family: Consolas; font-size: 9.5pt;"&gt;/* Nerd sprite */&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.geek1&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/nerd_sprites_100.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;0px&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.geek2&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/nerd_sprites_100.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;-100px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.geek3&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/nerd_sprites_100.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;-200px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: darkgreen; font-family: Consolas; font-size: 9.5pt;"&gt;/* Status */&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.energy0&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;: &lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/energy.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;0px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;29px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;175px&lt;/span&gt;; &lt;span style="color: red;"&gt;top&lt;/span&gt;: &lt;span style="color: blue;"&gt;4px&lt;/span&gt;; &lt;span style="color: red;"&gt;left&lt;/span&gt;: &lt;span style="color: blue;"&gt;622px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.energy1&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;: &lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/energy.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;-29px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;29px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;175px&lt;/span&gt;; &lt;span style="color: red;"&gt;top&lt;/span&gt;: &lt;span style="color: blue;"&gt;4px&lt;/span&gt;; &lt;span style="color: red;"&gt;left&lt;/span&gt;: &lt;span style="color: blue;"&gt;622px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.energy2&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;: &lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/energy.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;-58px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;29px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;175px&lt;/span&gt;; &lt;span style="color: red;"&gt;top&lt;/span&gt;: &lt;span style="color: blue;"&gt;4px&lt;/span&gt;; &lt;span style="color: red;"&gt;left&lt;/span&gt;: &lt;span style="color: blue;"&gt;622px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.energy3&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;: &lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/energy.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;-87px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;29px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;175px&lt;/span&gt;; &lt;span style="color: red;"&gt;top&lt;/span&gt;: &lt;span style="color: blue;"&gt;4px&lt;/span&gt;; &lt;span style="color: red;"&gt;left&lt;/span&gt;: &lt;span style="color: blue;"&gt;622px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.energy4&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;: &lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/energy.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;-116px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;29px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;175px&lt;/span&gt;; &lt;span style="color: red;"&gt;top&lt;/span&gt;: &lt;span style="color: blue;"&gt;4px&lt;/span&gt;; &lt;span style="color: red;"&gt;left&lt;/span&gt;: &lt;span style="color: blue;"&gt;622px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.energy5&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;: &lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/energy.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;-145px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;29px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;175px&lt;/span&gt;; &lt;span style="color: red;"&gt;top&lt;/span&gt;: &lt;span style="color: blue;"&gt;4px&lt;/span&gt;; &lt;span style="color: red;"&gt;left&lt;/span&gt;: &lt;span style="color: blue;"&gt;622px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.energy6&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;: &lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/energy.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;-174px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;29px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;175px&lt;/span&gt;; &lt;span style="color: red;"&gt;top&lt;/span&gt;: &lt;span style="color: blue;"&gt;4px&lt;/span&gt;; &lt;span style="color: red;"&gt;left&lt;/span&gt;: &lt;span style="color: blue;"&gt;622px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.energy7&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;: &lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/energy.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;-203px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;29px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;175px&lt;/span&gt;; &lt;span style="color: red;"&gt;top&lt;/span&gt;: &lt;span style="color: blue;"&gt;4px&lt;/span&gt;; &lt;span style="color: red;"&gt;left&lt;/span&gt;: &lt;span style="color: blue;"&gt;622px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.energy8&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;: &lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/energy.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;-232px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;29px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;175px&lt;/span&gt;; &lt;span style="color: red;"&gt;top&lt;/span&gt;: &lt;span style="color: blue;"&gt;4px&lt;/span&gt;; &lt;span style="color: red;"&gt;left&lt;/span&gt;: &lt;span style="color: blue;"&gt;622px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.energy9&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;: &lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/energy.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;-261px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;29px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;175px&lt;/span&gt;; &lt;span style="color: red;"&gt;top&lt;/span&gt;: &lt;span style="color: blue;"&gt;4px&lt;/span&gt;; &lt;span style="color: red;"&gt;left&lt;/span&gt;: &lt;span style="color: blue;"&gt;622px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.energy10&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;:&lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;background&lt;/span&gt;:&lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/energy.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;-290px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;29px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;175px&lt;/span&gt;; &lt;span style="color: red;"&gt;top&lt;/span&gt;: &lt;span style="color: blue;"&gt;4px&lt;/span&gt;; &lt;span style="color: red;"&gt;left&lt;/span&gt;: &lt;span style="color: blue;"&gt;622px&lt;/span&gt; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: darkgreen; font-family: Consolas; font-size: 9.5pt;"&gt;/* Furniture */&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.toolbox&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/toolbox.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;0px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;37px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;75px&lt;/span&gt;; &lt;span style="color: red;"&gt;top&lt;/span&gt;: &lt;span style="color: blue;"&gt;720px&lt;/span&gt;; &lt;span style="color: red;"&gt;left&lt;/span&gt;: &lt;span style="color: blue;"&gt;30px&lt;/span&gt;; &amp;nbsp;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.vending&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/vending_machine_100.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;0px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;120px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;49px&lt;/span&gt;; &lt;span style="color: red;"&gt;top&lt;/span&gt;: &lt;span style="color: blue;"&gt;620px&lt;/span&gt;; &lt;span style="color: red;"&gt;left&lt;/span&gt;: &lt;span style="color: blue;"&gt;720px&lt;/span&gt;;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.vendingLogo&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;:&lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/sodacan.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;0px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;37px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;37px&lt;/span&gt;; &lt;span style="color: red;"&gt;top&lt;/span&gt;: &lt;span style="color: blue;"&gt;620px&lt;/span&gt;; &lt;span style="color: red;"&gt;left&lt;/span&gt;: &lt;span style="color: blue;"&gt;720px&lt;/span&gt;;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.vendingLogo2&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;:&lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/NeudesicLogoIcon.png')&lt;/span&gt;&lt;span style="color: blue;"&gt;0px&lt;/span&gt; &lt;span style="color: blue;"&gt;0px&lt;/span&gt;; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;36px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;36px&lt;/span&gt;; &lt;span style="color: red;"&gt;top&lt;/span&gt;: &lt;span style="color: blue;"&gt;620px&lt;/span&gt;; &lt;span style="color: red;"&gt;left&lt;/span&gt;: &lt;span style="color: blue;"&gt;720px&lt;/span&gt;;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: darkgreen; font-family: Consolas; font-size: 9.5pt;"&gt;/* Weapon sprites */&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.left-facing&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;-moz-transform&lt;/span&gt;:&lt;span style="color: blue;"&gt;scaleX(-1)&lt;/span&gt;; &lt;span style="color: red;"&gt;-o-transform&lt;/span&gt;:&lt;span style="color: blue;"&gt;scaleX(-1)&lt;/span&gt;; &lt;span style="color: red;"&gt;-webkit-transform&lt;/span&gt;:&lt;span style="color: blue;"&gt;scaleX(-1)&lt;/span&gt;; &lt;span style="color: red;"&gt;transform&lt;/span&gt;:&lt;span style="color: blue;"&gt;scaleX(-1)&lt;/span&gt;; &lt;span style="color: red;"&gt;filter&lt;/span&gt;:&lt;span style="color: blue;"&gt;FlipH&lt;/span&gt;; &lt;span style="color: red;"&gt;-ms-filter&lt;/span&gt;:&lt;span style="color: blue;"&gt;"FlipH"&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.weapon1&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/spraycan.png')&lt;/span&gt;;&lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;29px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;25px&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.weapon2&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/sprayer-yellow.png')&lt;/span&gt;;&lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;34px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;21px&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.weapon3&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/sprayer-orange.png')&lt;/span&gt;;&lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;62px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;34px&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.weapon4&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;background&lt;/span&gt;: &lt;span style="color: blue;"&gt;transparent&lt;/span&gt; &lt;span style="color: blue;"&gt;url('../../Content/Images/honey.png')&lt;/span&gt;;&lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;62px&lt;/span&gt;; &lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;42px&lt;/span&gt;; }&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;The biggest part of the game is the JavaScript code whichhas the game logic, game.js. Bugs are stored in JSON objects like these:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;bugs.push({&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: &lt;span style="color: maroon;"&gt;'bug0'&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; obj:$(&lt;span style="color: maroon;"&gt;'#bug0'&lt;/span&gt;),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type:&lt;span style="color: maroon;"&gt;'mosquito'&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x:100,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y:100,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;alive: &lt;span style="color: blue;"&gt;true&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hit: &lt;span style="color: blue;"&gt;false&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;hitDelay: 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;jQuery animations are used to move the characters. Forexample, here’s a bug movement being animated:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; bug.obj.animate({&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;top: y,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;left: x&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }, 900);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;The cloud of insecticideemitted by the weapons is another matter: it swells, floats slowly upward, andfades. For this I used the smoke puffing effect from &lt;span style="color: darkgreen; font-family: Consolas; font-size: 9.5pt;"&gt;http://www.gayadesign.com/diy/puffing-smoke-effect-in-jquery/&lt;/span&gt;with some minor modifications.&lt;span style="color: darkgreen; font-family: Consolas; font-size: 9.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-7BNhNK3c7e4/TxZN8S_XnrI/AAAAAAAACFU/kw9Qpi_WMY8/s1600/cloud1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="288" src="http://1.bp.blogspot.com/-7BNhNK3c7e4/TxZN8S_XnrI/AAAAAAAACFU/kw9Qpi_WMY8/s320/cloud1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;In the more advanced levels, you are combating multiple kinds of bugs at the same time. You can go to a toolbox andselect from a variety of different weapons.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/-EERo1WO5tBA/TxZOgUDeXlI/AAAAAAAACFc/DX7V1SF0xZk/s1600/bugs2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="398" src="http://2.bp.blogspot.com/-EERo1WO5tBA/TxZOgUDeXlI/AAAAAAAACFc/DX7V1SF0xZk/s400/bugs2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As you can see, CSS sprites and jQuery animation are quite powerful.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;I have plans to also support touch so Debug Hero can be played on tablets and perhaps even phones at some point but that's not in place yet.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Debug Hero is hosted in the Windows Azure cloud but could really be hosted anywhere as there's no server-side logic or storage.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Regrettably I can’t release the source code for Debug Hero sinceI’m using stock art I can't distribute.&amp;nbsp;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9132148272745668459-7710293363236998076?l=davidpallmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidpallmann.blogspot.com/feeds/7710293363236998076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9132148272745668459&amp;postID=7710293363236998076' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/7710293363236998076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/7710293363236998076'/><link rel='alternate' type='text/html' href='http://davidpallmann.blogspot.com/2012/01/adventures-in-html5-debug-hero-game.html' title='Adventures in HTML5: Debug Hero game featuring CSS Sprites and jQuery Animation'/><author><name>David Pallmann</name><uri>http://www.blogger.com/profile/14482909040736697277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-mPcW-mu5fnI/TWGWz8308CI/AAAAAAAABZc/G7etTBFyHm0/s220/david.pallmann.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-WVd_MWqx1JY/TxZNXo0fmaI/AAAAAAAACE8/2Ozc_m-oCoQ/s72-c/bugs1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9132148272745668459.post-7374300651014797431</id><published>2011-12-27T07:44:00.000-08:00</published><updated>2011-12-29T06:20:46.383-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='Responsive Cloud Design'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='Cloud'/><category scheme='http://www.blogger.com/atom/ns#' term='Responsive Web Design'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML5'/><category scheme='http://www.blogger.com/atom/ns#' term='Ice'/><category scheme='http://www.blogger.com/atom/ns#' term='Azure'/><category scheme='http://www.blogger.com/atom/ns#' term='Fire'/><title type='text'>Mobile &amp; Global with HTML5, MVC &amp; Windows Azure, Step 7: Globally-Deployed</title><content type='html'>&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;/span&gt;In &lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-in-7-steps-with-html5-mvc.html"&gt;this series&lt;/a&gt; of posts we’re progressively demonstrating amobile and global sample, Responsive Tours. The source code for all 7 steps ison CodePlex at &lt;a href="http://responsivetours.codeplex.com/"&gt;&lt;span style="color: blue;"&gt;http://responsivetours.codeplex.com&lt;/span&gt;&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;Here in Step 7 of 7 we’re going to deploy the solution to aWindows Azure data center. In this step we will:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;• Create hosted services in multiple data centers&lt;br /&gt;• Configure traffic management&lt;br /&gt;• Update the Access Control Service to support the new data centers&lt;br /&gt;• Enable Content Delivery Network for image blobs&lt;br /&gt;• Deploy the solution to multiple Windows Azure data centers around the world&lt;br /&gt;• Set up automated traffic management&lt;br /&gt;• Set up a friendly DNS for the solution&lt;br /&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;br /&gt;Creating Hosted Services in Multiple Data Centers&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;/span&gt;In Step 6 we deployed the solution as a Windows AzureCompute hosted service in a single Windows Azure data center (we chose the SouthCentral US location, which is in Texas). Now imagine we are serving a worldwideaudience, and that we’d like a global presence. We can achieve that by creatingadditional hosted services in other parts of the world. &lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;There are currently 6 Windows Azure data centers to choosefrom: 2 in North America, 2 in Europe, and 2 in Asia. We’ll plan on running oursolution in two additional places: Western Europe (Amsterdam) and East Asia(Hong Kong).&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;/span&gt;To streamline the work we need to do&amp;nbsp;in this step, it’ll workout best if we &lt;i style="mso-bidi-font-style: normal;"&gt;create&lt;/i&gt; the hostedservices now in the Windows Azure portal (noting their names and productionURLs) but &lt;i style="mso-bidi-font-style: normal;"&gt;do not deploy&lt;/i&gt; our solutionto them just yet. We need to note the production URLs for our hosted services. Inour example, they are &lt;i style="mso-bidi-font-style: normal;"&gt;responsive-us.cloudapp.net&lt;/i&gt;,&lt;i style="mso-bidi-font-style: normal;"&gt;responsive-europe.cloudapp.net&lt;/i&gt;, and &lt;i style="mso-bidi-font-style: normal;"&gt;responsive-asia.cloudapp.net&lt;/i&gt;. Your nameswill be different, as they must be unique.&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-3W2V4RpSlko/Tvn1lrOY3PI/AAAAAAAACDI/3ATaKIDRdes/s1600/ResponsiveTours_07_hostedservices_allocated.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="112" src="http://2.bp.blogspot.com/-3W2V4RpSlko/Tvn1lrOY3PI/AAAAAAAACDI/3ATaKIDRdes/s400/ResponsiveTours_07_hostedservices_allocated.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="mso-no-proof: yes;"&gt;&lt;v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f"&gt; &lt;v:stroke joinstyle="miter"&gt; &lt;v:formulas&gt;  &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;  &lt;v:f eqn="sum @0 1 0"&gt;  &lt;v:f eqn="sum 0 0 @1"&gt;  &lt;v:f eqn="prod @2 1 2"&gt;  &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;  &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;  &lt;v:f eqn="sum @0 0 1"&gt;  &lt;v:f eqn="prod @6 1 2"&gt;  &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;  &lt;v:f eqn="sum @8 21600 0"&gt;  &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;  &lt;v:f eqn="sum @10 21600 0"&gt; &lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:formulas&gt; &lt;v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f"&gt; &lt;o:lock aspectratio="t" v:ext="edit"&gt;&lt;/o:lock&gt;&lt;/v:path&gt;&lt;/v:stroke&gt;&lt;/v:shapetype&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;/span&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;A decision to make at this point is whether to create threeseparate editions of your web site project. If you will be customizing contentbased on location (for example, using different languages or content for eachlocale) or creating a separate database for each data center (which would be necessaryin a real setting for performance), you may want to split out the web projectsseparately or do the equivalent with clever build configuration. In oursample code we have simply made three copies of the project (named /us, /europe,and /asia), one for each data center.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;/span&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;/span&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;Configuring TrafficManagement&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;/span&gt;A nice feature of Windows Azure is the Traffic Managerservice (currently in Community Technology Preview), which will allow us tohave a single .com address for our deployment even though it will exist in 3data centers on 3 continents. &lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;To set up the traffic manager, we use the Windows Azureportal, choosing a unique name prefix for the Traffic Manager. In our examplethat name is &lt;em&gt;responsive&lt;/em&gt;, making the Traffic Manager endpoint &lt;a href="http://responsive.ctp.trafficmgr.com/"&gt;&lt;span style="color: blue;"&gt;http://responsive.ctp.trafficmgr.com&lt;/span&gt;&lt;/a&gt;.This will ultimately be the endpoint we can use to access Responsive Toursregardless of location. We then enroll each of our three hosted services (US,Europe, Asia). Of course the hosted services aren’t deployed yet, but we’re doingthis now because we’ll need the Traffic Manager URL for configuring security.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-52PXSy7zMUo/Tvn1vtmaQLI/AAAAAAAACDU/O-8HqdCENog/s1600/ResponsiveTours_07_traffic.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="272" src="http://4.bp.blogspot.com/-52PXSy7zMUo/Tvn1vtmaQLI/AAAAAAAACDU/O-8HqdCENog/s400/ResponsiveTours_07_traffic.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;We get to choose a policy in our Traffic Manager configuration(performance, failover, or round-robin).&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;The best choice for this scenario would be Performance-based routingbased on location, but we’re going to use Round Robin in our example since&amp;nbsp;itis a demo, to prove that as you access the site at different times youwill in fact be routed to different data centers. In our HTML code, we’vechanged the footer text of each site to indicate which location it is in so wewill have an easy way to detect that when we visit the site.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;/span&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;Updating AccessControl Service to Support the New Hosted Services&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;br /&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;The Access Control Service we are using for authenticationneeds to be configured to allow the additional data centers. You might think weneed to identify each hosted service as an additional Relying Party, butactually all we have to do is identify the Traffic Manager endpoint as an RP.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-jp9EtAlLq3A/Tvn1_z9DH2I/AAAAAAAACDg/5RZ4YKsRMO8/s1600/ResponsiveTours_07_acs_rp.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="173" src="http://4.bp.blogspot.com/-jp9EtAlLq3A/Tvn1_z9DH2I/AAAAAAAACDg/5RZ4YKsRMO8/s400/ResponsiveTours_07_acs_rp.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;One other change we need to make is in the Windows IdentityFoundation configuration in the Web.config file of our web project(s). In thewsFederation element, we need to set the &lt;i style="mso-bidi-font-style: normal;"&gt;realm&lt;/i&gt;to the Traffic Manager endpoint.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre class="brush: xml"&gt;&amp;lt;federatedAuthentication&amp;gt;&lt;br /&gt;  &amp;lt;wsFederation passiveRedirectEnabled="true" issuer="https://[MY-ACS-NAMESPACE].accesscontrol.windows.net/v2/wsfederation" realm="http://[MY-TRAFFIC-NAME].ctp.trafficmgr.com/" requireHttps="false" /&amp;gt;&lt;br /&gt;  &amp;lt;cookieHandler requireSsl="false" /&amp;gt;&lt;br /&gt;&amp;lt;/federatedAuthentication&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/span&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;/span&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Enabling Content Delivery Network for Image Blobs&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;Our promotional images are residing in Blob Storage in theSouth Central US Data Center. We can enable efficient worldwide access throughthe Windows Azure Content Delivery Network. The CDN will use a worldwide networkof 24 edge cache servers to serve images with high performance based on locale.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-zzqyWFqjyw0/TvnnO4CeqDI/AAAAAAAACC8/lNAM8d7HCTQ/s1600/ResponsiveTours_07_cdn_config.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="291" src="http://1.bp.blogspot.com/-zzqyWFqjyw0/TvnnO4CeqDI/AAAAAAAACC8/lNAM8d7HCTQ/s400/ResponsiveTours_07_cdn_config.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="mso-no-proof: yes;"&gt;&lt;v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f"&gt;&lt;span style="font-family: Calibri;"&gt; &lt;v:stroke joinstyle="miter"&gt; &lt;v:formulas&gt;  &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;  &lt;v:f eqn="sum @0 1 0"&gt;  &lt;v:f eqn="sum 0 0 @1"&gt;  &lt;v:f eqn="prod @2 1 2"&gt;  &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;  &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;  &lt;v:f eqn="sum @0 0 1"&gt;  &lt;v:f eqn="prod @6 1 2"&gt;  &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;  &lt;v:f eqn="sum @8 21600 0"&gt;  &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;  &lt;v:f eqn="sum @10 21600 0"&gt; &lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:formulas&gt; &lt;v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f"&gt; &lt;o:lock aspectratio="t" v:ext="edit"&gt;&lt;/o:lock&gt;&lt;/v:path&gt;&lt;/v:stroke&gt;&lt;/span&gt;&lt;/v:shapetype&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;Configuring the CDN for our storage account in the WindowsAzure portal provides us with a special CDN endpoint for our images. We change ourview pages to use the new endpoint.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: xml"&gt;&amp;lt;!-- begin - homepage promos --&amp;gt;&lt;br /&gt;&amp;lt;div class="home_promo_container"&amp;gt;&lt;br /&gt; &amp;lt;div class="home_promo"&amp;gt;&lt;br /&gt;  &amp;lt;div class="home_promo_content" style="background-image:url(http://responsive.blob.core.windows.net/images/@(ViewBag.Promos["1"].ImageURL));"&amp;gt;&lt;br /&gt;   &amp;lt;h2 data-bind="text: PromoTitle1"&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;   &amp;lt;p  data-bind="text: PromoText1"/&amp;gt;&lt;br /&gt;   &amp;lt;a class="button" href="#"&amp;gt;Learn more &amp;amp;raquo;&amp;lt;/a&amp;gt;&lt;br /&gt;  &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;div class="home_promo"&amp;gt;&lt;br /&gt;  &amp;lt;div class="home_promo_content" style="background-image:url(http://responsive.blob.core.windows.net/images/@(ViewBag.Promos["2"].ImageURL));"&amp;gt;&lt;br /&gt;   &amp;lt;h2 data-bind="text: PromoTitle2"&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;   &amp;lt;p  data-bind="text: PromoText2"/&amp;gt;&lt;br /&gt;   &amp;lt;a class="button" href="#"&amp;gt;Learn more &amp;amp;raquo;&amp;lt;/a&amp;gt;&lt;br /&gt;  &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;div class="home_promo"&amp;gt;&lt;br /&gt;  &amp;lt;div class="home_promo_content" style="background-image:url(http://responsive.blob.core.windows.net/images/@(ViewBag.Promos["3"].ImageURL));"&amp;gt;&lt;br /&gt;   &amp;lt;h2 data-bind="text: PromoTitle3"&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;   &amp;lt;p  data-bind="text: PromoText3"/&amp;gt;&lt;br /&gt;   &amp;lt;a class="button" href="#"&amp;gt;Learn more &amp;amp;raquo;&amp;lt;/a&amp;gt;&lt;br /&gt;  &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;div class="clear_both"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Deploying the SolutionWorldwide&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;Now it’s time to deploy our hosted services to the US,European, and Asian data centers. As in Step 6, we can use Visual Studio topackage and publish the solutions. When we’re done, we should see 3 deployments ready in the Windows Azure portal.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-uzP9qnBrQDA/Tvn58ZzbO5I/AAAAAAAACDs/PAlgngjAOtw/s1600/ResponsiveTours_07_hostedservices.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-uzP9qnBrQDA/Tvn58ZzbO5I/AAAAAAAACDs/PAlgngjAOtw/s400/ResponsiveTours_07_hostedservices.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="mso-no-proof: yes;"&gt;&lt;v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f"&gt;&lt;span style="font-family: Calibri;"&gt; &lt;v:stroke joinstyle="miter"&gt; &lt;v:formulas&gt;  &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;  &lt;v:f eqn="sum @0 1 0"&gt;  &lt;v:f eqn="sum 0 0 @1"&gt;  &lt;v:f eqn="prod @2 1 2"&gt;  &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;  &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;  &lt;v:f eqn="sum @0 0 1"&gt;  &lt;v:f eqn="prod @6 1 2"&gt;  &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;  &lt;v:f eqn="sum @8 21600 0"&gt;  &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;  &lt;v:f eqn="sum @10 21600 0"&gt; &lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:formulas&gt; &lt;v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f"&gt; &lt;o:lock aspectratio="t" v:ext="edit"&gt;&lt;/o:lock&gt;&lt;/v:path&gt;&lt;/v:stroke&gt;&lt;/span&gt;&lt;/v:shapetype&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;Once we’ve deployed all 3 hosted services, we’re in aposition to serve a worldwide audience.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Testing the GlobalSite&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;Now we’re ready to see our mobile and global solution workin its global deployment. All we have to do is visit our Traffic Managerendpoint with a desktop browser, tablet, or phone. In our example the endpointis &lt;/span&gt;&lt;a href="http://responsive.ctp.trafficmgr.com/"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;http://responsive.ctp.trafficmgr.com&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;.The site comes up just as we expect it to, and as we do this from multiplesessions and devices we can see that the location (shown in the page footer) variesbetween South Central US, Western Europe, and East Asia. Note, you may get an occasional hiccup because we are not routing traffic based on location.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-5Tlu1Qggx_g/Tvn6LtZVXxI/AAAAAAAACD4/NttBhGgNjLw/s1600/ResponsiveTours_07_locations.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="301" src="http://2.bp.blogspot.com/-5Tlu1Qggx_g/Tvn6LtZVXxI/AAAAAAAACD4/NttBhGgNjLw/s400/ResponsiveTours_07_locations.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Friendly DNS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;One last thing we can do is give our web site a friendly DNSname. We’ll do this by purchasing the domain responsive-tours.com from GoDaddy.Now you can access the global site at &lt;/span&gt;&lt;a href="http://responsive-tours.com/"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;http://responsive-tours.com&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;.There are a number of ways we can forward the domain, we’ll deliberately choosehere to do simple forwarding--so you can see the URL change when you visit thesite &lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;to show the Windows Azure TrafficManager is at work.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Summary&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;In Step 7 we enabled the CDN for edge caching of blobimages, deployed the solution globally to 3 continents, and used the WindowsAzure Traffic Manager to manage traffic. Our site now has the followingfunctionality:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;• Embodies responsive web design and runs on desktops,tablets, and phones.&lt;br /&gt;• Uses HTML5 and open standards on the web client&lt;br /&gt;• Uses the Microsoft web platform on the web server.&lt;br /&gt;• Provides server-side dynamic content (promotional items)&lt;br /&gt;• Provides client-side dynamic content (Bing Maps)&lt;br /&gt;• Is set up for Windows Azure Compute&lt;br /&gt;• Can authenticate against web identities&lt;br /&gt;• Is hosted in Windows Azure Compute&lt;br /&gt;• Stores images in Windows Azure Blob Storage&lt;br /&gt;• Stores promotional content in SQL Azure Database&lt;br /&gt;• Uses Content Delivery Network for worldwide image caching&lt;br /&gt;• Manages global traffic across 3 data centers on 3 continents&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;In this series we’ve seen the power that comes from combiningHTML5, open standards, mobile devices, and responsive web design on the frontend with the Microsoft web platform and Windows Azure cloud computing on theback end: true “mobile and global” web/cloud solutions that truly run anywhereand everywhere. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9132148272745668459-7374300651014797431?l=davidpallmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidpallmann.blogspot.com/feeds/7374300651014797431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9132148272745668459&amp;postID=7374300651014797431' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/7374300651014797431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/7374300651014797431'/><link rel='alternate' type='text/html' href='http://davidpallmann.blogspot.com/2011/12/mobile-global-with-html5-mvc-windows_6369.html' title='Mobile &amp; Global with HTML5, MVC &amp; Windows Azure, Step 7: Globally-Deployed'/><author><name>David Pallmann</name><uri>http://www.blogger.com/profile/14482909040736697277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-mPcW-mu5fnI/TWGWz8308CI/AAAAAAAABZc/G7etTBFyHm0/s220/david.pallmann.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-3W2V4RpSlko/Tvn1lrOY3PI/AAAAAAAACDI/3ATaKIDRdes/s72-c/ResponsiveTours_07_hostedservices_allocated.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9132148272745668459.post-1315171608429197170</id><published>2011-12-27T07:32:00.000-08:00</published><updated>2011-12-29T07:08:31.551-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='Responsive Cloud Design'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='Cloud'/><category scheme='http://www.blogger.com/atom/ns#' term='Responsive Web Design'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML5'/><category scheme='http://www.blogger.com/atom/ns#' term='Ice'/><category scheme='http://www.blogger.com/atom/ns#' term='Azure'/><category scheme='http://www.blogger.com/atom/ns#' term='Fire'/><title type='text'>Mobile &amp; Global with HTML5, MVC &amp; Windows Azure, Step 6: Cloud-Deployed</title><content type='html'>&lt;span style="font-family: Calibri;"&gt;In &lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-in-7-steps-with-html5-mvc.html"&gt;this series&lt;/a&gt; of posts we’re progressively demonstrating amobile and global sample, Responsive Tours. The source code for all 7 steps ison CodePlex at &lt;/span&gt;&lt;a href="http://responsivetours.codeplex.com/"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;http://responsivetours.codeplex.com&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;Here in Step&amp;nbsp;6 of&amp;nbsp;7 we’re going to deploy the solution to aWindows Azure data center. In this step we will:&lt;u&gt;&lt;span style="color: blue;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;• Migrate the local SQL Server database to a SQLAzure database in the cloud&lt;br /&gt;• Migrate the promotional item image files to Blob Storage&lt;br /&gt;• Update how we handle session cookies to be compatible with Windows Azure&lt;br /&gt;• Package the application and publish it to the Windows Azure Compute Service&lt;br /&gt;• Configure the Access Control Service for the hosted service&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Migrating theDatabase to SQL Azure&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;Since Step 3 we’ve been using dynamic content forpromotional items, driven by a Promotions table in a SQL Server database. Nowwe’ll need to move that over to a SQL Azure database in the cloud. To do that,we use the &lt;/span&gt;&lt;a href="http://windows.azure.com/"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;Windows Azure portal&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt; tocreate a virtual database server in the cloud. This involves selecting a datacenter, specifying an admin username/password, and setting up firewall rules.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-3aG5gg0jzgo/TvnYK2J2nII/AAAAAAAACBE/afHkhtAvrYk/s1600/ResponsiveTours_06_db_server_create.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="172" src="http://4.bp.blogspot.com/-3aG5gg0jzgo/TvnYK2J2nII/AAAAAAAACBE/afHkhtAvrYk/s400/ResponsiveTours_06_db_server_create.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;Once the database server is created we need to create aTours database. We can go with the smallest size (1GB) since we’re only storinga small amount of data in this sample.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-OJ22EdNIRUU/TvnYTARcyzI/AAAAAAAACBQ/jIZoYTmSEcA/s1600/ResponsiveTours_06_db_create.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="215" src="http://4.bp.blogspot.com/-OJ22EdNIRUU/TvnYTARcyzI/AAAAAAAACBQ/jIZoYTmSEcA/s400/ResponsiveTours_06_db_create.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span style="font-family: Calibri;"&gt;From this point, working with the database is much likeworking with SQL Server. We have the choice of using familiar tools like SQLServer Management Studio or managing design and data through the SQL Azure portal.We need to design the Promotions table and migrate the promotional item recordswe previously created in a local database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-W9tIdx68Uqo/TvnYiruQ37I/AAAAAAAACBc/9TdOnVJMZDg/s1600/ResponsiveTours_06_db_design.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="171" src="http://1.bp.blogspot.com/-W9tIdx68Uqo/TvnYiruQ37I/AAAAAAAACBc/9TdOnVJMZDg/s400/ResponsiveTours_06_db_design.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-UPASPlGIypU/TvnYoMqxiKI/AAAAAAAACBo/ngv31GNerQM/s1600/ResponsiveTours_06_db_data.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="203" src="http://2.bp.blogspot.com/-UPASPlGIypU/TvnYoMqxiKI/AAAAAAAACBo/ngv31GNerQM/s400/ResponsiveTours_06_db_data.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;There’s one last item to attend to on the database. With ourdatabase now in SQL Azure, we must change the connection string in the web project’sWeb.config to reference the cloud database. &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre class="brush: xml"&gt;  &amp;lt;connectionStrings&amp;gt;&lt;br /&gt;    &amp;lt;add name="Tours" connectionString="Data Source=[MY-SQL-AZURE-SERVER].database.windows.net;Initial Catalog=Tours;UID=[MY-SQL-AZURE-USER]@[MY-SQL-AZURE-SERVER];PWD=[MY-SQL-AZURE-PASSWORD];" /&amp;gt;&lt;br /&gt;  &amp;lt;/connectionStrings&amp;gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;/pre&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;Migrating Images to BlobStorage&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-family: 'Times New Roman';"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Up till now our promotional images have been part of the webproject. To make them truly dynamic like the rest of the promotional content weshould be able to change them out quickly and easily. We can achieve this byrelocating the image files to Windows Azure Blob Storage, where they can beaccessed as Internet URLs if we set appropriate permissions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-family: 'Times New Roman';"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;We first need to create a Windows Azure storage account inthe Windows Azure portal. We’ll need to capture the storage account’s uniquename and a storage key.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;a href="http://3.bp.blogspot.com/-9YXbybsPpJY/TvnbeFLWJBI/AAAAAAAACB0/MaaJixQXtFk/s1600/ResponsiveTours_06_storage_account.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="223" src="http://3.bp.blogspot.com/-9YXbybsPpJY/TvnbeFLWJBI/AAAAAAAACB0/MaaJixQXtFk/s400/ResponsiveTours_06_storage_account.png" width="400" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;&lt;br /&gt;&lt;span style="font-family: 'Times New Roman';"&gt;&lt;/span&gt;With the storage account created, we can create a container(allowing public read access) and upload our promotional images to it. Use atool like &lt;a href="http://cerebrata.com/"&gt;&lt;span style="color: blue;"&gt;Cerebrata Cloud Storage Studio&lt;/span&gt;&lt;/a&gt; or&lt;a href="http://azurestorageexplorer.codeplex.com/"&gt;&lt;span style="color: blue;"&gt;Azure Storage Explorer&lt;/span&gt;&lt;/a&gt;for this.&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style="font-family: 'Times New Roman';"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-2MWOfoQyi9w/TvnbmUk22kI/AAAAAAAACCA/4X0mhf9g-jk/s1600/ResponsiveTours_06_blobs.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="176" src="http://2.bp.blogspot.com/-2MWOfoQyi9w/TvnbmUk22kI/AAAAAAAACCA/4X0mhf9g-jk/s400/ResponsiveTours_06_blobs.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;br /&gt;With the images in a new location we must change thepromotional item markup on our HTML pages to match. We use the blob container’sURL format, [STORAGE-ACCOUNT-NAME].blob.windows.net/[CONTAINER-NAME]/[BLOB-NAME].&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;pre class="brush: xml; highlight: [4,11,18]"&gt;&amp;lt;!-- begin - homepage promos --&amp;gt;&lt;br /&gt;&amp;lt;div class="home_promo_container"&amp;gt;&lt;br /&gt; &amp;lt;div class="home_promo"&amp;gt;&lt;br /&gt;  &amp;lt;div class="home_promo_content" style="background-image:url(http://responsive.blob.core.windows.net/images/@(ViewBag.Promos["1"].ImageURL));"&amp;gt;&lt;br /&gt;   &amp;lt;h2 data-bind="text: PromoTitle1"&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;   &amp;lt;p  data-bind="text: PromoText1"/&amp;gt;&lt;br /&gt;   &amp;lt;a class="button" href="#"&amp;gt;Learn more &amp;amp;raquo;&amp;lt;/a&amp;gt;&lt;br /&gt;  &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;div class="home_promo"&amp;gt;&lt;br /&gt;  &amp;lt;div class="home_promo_content" style="background-image:url(http://responsive.blob.core.windows.net/images/@(ViewBag.Promos["2"].ImageURL));"&amp;gt;&lt;br /&gt;   &amp;lt;h2 data-bind="text: PromoTitle2"&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;   &amp;lt;p  data-bind="text: PromoText2"/&amp;gt;&lt;br /&gt;   &amp;lt;a class="button" href="#"&amp;gt;Learn more &amp;amp;raquo;&amp;lt;/a&amp;gt;&lt;br /&gt;  &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;div class="home_promo"&amp;gt;&lt;br /&gt;  &amp;lt;div class="home_promo_content" style="background-image:url(http://responsive.blob.core.windows.net/images/@(ViewBag.Promos["3"].ImageURL));"&amp;gt;&lt;br /&gt;   &amp;lt;h2 data-bind="text: PromoTitle3"&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;   &amp;lt;p  data-bind="text: PromoText3"/&amp;gt;&lt;br /&gt;   &amp;lt;a class="button" href="#"&amp;gt;Learn more &amp;amp;raquo;&amp;lt;/a&amp;gt;&lt;br /&gt;  &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;div class="clear_both"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;span style="font-family: 'Times New Roman';"&gt;&lt;/span&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;strong&gt;Updating Session Cookie Handling for Windows Azure&lt;/strong&gt;&lt;/div&gt;By default, our WIF-enabled ASP.NET MVC3 application is encrypting session cookies using the Data Protection API (DPAPI). DPAPI is not compatible with Windows Azure, so we need to add some code to encrypt cookies with RSA using a certificate. We do this in global.asax.cs.&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;br /&gt;&lt;pre class="brush: csharp; highlight: [24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,75,78,79,80,81,82,83,84,85,86,87,88,89,90,91]"&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Linq;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.Mvc;&lt;br /&gt;using System.Web.Routing;&lt;br /&gt;using Microsoft.IdentityModel.Tokens;&lt;br /&gt;using Microsoft.IdentityModel.Web;&lt;br /&gt;using Microsoft.IdentityModel.Web.Configuration;&lt;br /&gt;using System.Security.Cryptography.X509Certificates;&lt;br /&gt;using System.Text;&lt;br /&gt;&lt;br /&gt;namespace html5_mvc_razor&lt;br /&gt;{&lt;br /&gt;    // Note: For instructions on enabling IIS6 or IIS7 classic mode, &lt;br /&gt;    // visit http://go.microsoft.com/?LinkId=9394801&lt;br /&gt;&lt;br /&gt;    public class MvcApplication : System.Web.HttpApplication&lt;br /&gt;    {&lt;br /&gt;        /// Retrieves the address that was used in the browser for accessing &lt;br /&gt;        /// the web application, and injects it as WREPLY parameter in the&lt;br /&gt;        /// request to the STS &lt;br /&gt;        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;        void WSFederationAuthenticationModule_RedirectingToIdentityProvider(object sender, RedirectingToIdentityProviderEventArgs e)&lt;br /&gt;        {&lt;br /&gt;            //&lt;br /&gt;            // In the Windows Azure environment, build a wreply parameter for  the SignIn request&lt;br /&gt;            // that reflects the real address of the application.&lt;br /&gt;            //&lt;br /&gt;            HttpRequest request = HttpContext.Current.Request;&lt;br /&gt;            Uri requestUrl = request.Url;&lt;br /&gt;            StringBuilder wreply = new StringBuilder();&lt;br /&gt;&lt;br /&gt;            wreply.Append(requestUrl.Scheme);     // e.g. "http" or "https"&lt;br /&gt;            wreply.Append("://");&lt;br /&gt;            wreply.Append(request.Headers["Host"] ?? requestUrl.Authority);&lt;br /&gt;            wreply.Append(request.ApplicationPath);&lt;br /&gt;&lt;br /&gt;            if (!request.ApplicationPath.EndsWith("/"))&lt;br /&gt;                wreply.Append("/");&lt;br /&gt;            e.SignInRequestMessage.Reply = wreply.ToString();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        public static void RegisterGlobalFilters(GlobalFilterCollection filters)&lt;br /&gt;        {&lt;br /&gt;            filters.Add(new HandleErrorAttribute());&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public static void RegisterRoutes(RouteCollection routes)&lt;br /&gt;        {&lt;br /&gt;            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");&lt;br /&gt;&lt;br /&gt;            routes.MapRoute(&lt;br /&gt;                "Default", // Route name&lt;br /&gt;                "{controller}/{action}/{id}", // URL with parameters&lt;br /&gt;                new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults&lt;br /&gt;            );&lt;br /&gt;&lt;br /&gt;            routes.MapRoute(&lt;br /&gt;                "Map", // Route name&lt;br /&gt;                "{controller}/{action}/{id}", // URL with parameters&lt;br /&gt;                new { controller = "Map", action = "Index", id = UrlParameter.Optional } // Parameter defaults&lt;br /&gt;            );&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        protected void Application_Start()&lt;br /&gt;        {&lt;br /&gt;            AreaRegistration.RegisterAllAreas();&lt;br /&gt;&lt;br /&gt;            RegisterGlobalFilters(GlobalFilters.Filters);&lt;br /&gt;            RegisterRoutes(RouteTable.Routes);&lt;br /&gt;&lt;br /&gt;            FederatedAuthentication.ServiceConfigurationCreated += OnServiceConfigurationCreated;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        void OnServiceConfigurationCreated(object sender, ServiceConfigurationCreatedEventArgs e)&lt;br /&gt;        {&lt;br /&gt;            //&lt;br /&gt;            // Use the &amp;lt;serviceCertificate&amp;gt; to protect the cookies that are&lt;br /&gt;            // sent to the client.&lt;br /&gt;            //&lt;br /&gt;            List&amp;lt;CookieTransform&amp;gt; sessionTransforms =&lt;br /&gt;              new List&amp;lt;CookieTransform&amp;gt;(new CookieTransform[] {&lt;br /&gt;                new DeflateCookieTransform(), &lt;br /&gt;                new RsaEncryptionCookieTransform(e.ServiceConfiguration.ServiceCertificate),&lt;br /&gt;                new RsaSignatureCookieTransform(e.ServiceConfiguration.ServiceCertificate) });&lt;br /&gt;            SessionSecurityTokenHandler sessionHandler = new SessionSecurityTokenHandler(sessionTransforms.AsReadOnly());&lt;br /&gt;            e.ServiceConfiguration.SecurityTokenHandlers.AddOrReplace(sessionHandler);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;If we were using SSL for this site we'd use the SSL&amp;nbsp;certificate. Since we're not, we upload our own certificate to the Windows Azure portal for this purpose and specify it in our Web.config.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: xml; highlight: [24,25,26]"&gt;  &amp;lt;microsoft.identityModel&amp;gt;&lt;br /&gt;    &amp;lt;service&amp;gt;&lt;br /&gt;      &amp;lt;audienceUris&amp;gt;&lt;br /&gt;        &amp;lt;add value="http://MY-SERVICE-NAME.cloudapp.net/" /&amp;gt;&lt;br /&gt;      &amp;lt;/audienceUris&amp;gt;&lt;br /&gt;      &amp;lt;federatedAuthentication&amp;gt;&lt;br /&gt;        &amp;lt;wsFederation passiveRedirectEnabled="true" issuer="https://[MY-ACS-NAMESPACE].accesscontrol.windows.net/v2/wsfederation" realm="http://MY-SERVICE-NAME.net/" requireHttps="false" /&amp;gt;&lt;br /&gt;        &amp;lt;cookieHandler requireSsl="false" /&amp;gt;&lt;br /&gt;      &amp;lt;/federatedAuthentication&amp;gt;&lt;br /&gt;      &amp;lt;applicationService&amp;gt;&lt;br /&gt;        &amp;lt;claimTypeRequired&amp;gt;&lt;br /&gt;          &amp;lt;!--Following are the claims offered by STS 'https://[MY-ACS-NAMESPACE].accesscontrol.windows.net/'. Add or uncomment claims that you require by your application and then update the federation metadata of this application.--&amp;gt;&lt;br /&gt;          &amp;lt;claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" optional="true" /&amp;gt;&lt;br /&gt;          &amp;lt;claimType type="http://schemas.microsoft.com/ws/2008/06/identity/claims/role" optional="true" /&amp;gt;&lt;br /&gt;          &amp;lt;!--&amp;lt;claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier" optional="true" /&amp;gt;--&amp;gt;&lt;br /&gt;          &amp;lt;!--&amp;lt;claimType type="http://schemas.microsoft.com/accesscontrolservice/2010/07/claims/identityprovider" optional="true" /&amp;gt;--&amp;gt;&lt;br /&gt;        &amp;lt;/claimTypeRequired&amp;gt;&lt;br /&gt;      &amp;lt;/applicationService&amp;gt;&lt;br /&gt;      &amp;lt;issuerNameRegistry type="Microsoft.IdentityModel.Tokens.ConfigurationBasedIssuerNameRegistry, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&amp;gt;&lt;br /&gt;        &amp;lt;trustedIssuers&amp;gt;&lt;br /&gt;          &amp;lt;add thumbprint="ED98B07917624AEE89EDDC086589A6149ADE6859" name="https://[MY-ACS-NAMESPACE].accesscontrol.windows.net/" /&amp;gt;&lt;br /&gt;        &amp;lt;/trustedIssuers&amp;gt;&lt;br /&gt;      &amp;lt;/issuerNameRegistry&amp;gt;&lt;br /&gt;      &amp;lt;serviceCertificate&amp;gt;&lt;br /&gt;        &amp;lt;certificateReference storeLocation="LocalMachine" storeName="My" x509FindType="FindByThumbprint" findValue="308EFDEE6453FFF68C402E5ECEEE5B8BB9EAA619"/&amp;gt;&lt;br /&gt;      &amp;lt;/serviceCertificate&amp;gt;&lt;br /&gt;      &amp;lt;certificateValidation certificateValidationMode="None" /&amp;gt;&lt;br /&gt;    &amp;lt;/service&amp;gt;&lt;br /&gt;  &amp;lt;/microsoft.identityModel&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;Publishing the Site toWindows Azure Compute&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: 'Times New Roman';"&gt;&lt;/span&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;Back in Step 4 we set the site up for hosting in WindowsAzure Compute but up till now we’ve only been running it locally in the WindowsAzure Simulation Environment. Now we want to deploy the solution to aWindows Azure Data Center.&lt;br /&gt;&lt;br /&gt;We first create a Hosted Service in the Windows Azuremanagement portal. In our example we chose the South Central US data center and call the service &lt;em&gt;responsive&lt;/em&gt;, which means its production URL will be &lt;a href="http://responsive.cloudapp.net/"&gt;http://responsive.cloudapp.net&lt;/a&gt;. Your name will be different as they must be unique.&lt;/div&gt;&lt;span style="font-family: 'Times New Roman';"&gt;&lt;/span&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-dBtkyR_0NS8/TvnhHRUPw5I/AAAAAAAACCM/J5wDbyJzHnM/s1600/ResponsiveTours_06_new_hosted_servicet.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="281" src="http://2.bp.blogspot.com/-dBtkyR_0NS8/TvnhHRUPw5I/AAAAAAAACCM/J5wDbyJzHnM/s400/ResponsiveTours_06_new_hosted_servicet.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f"&gt; &lt;v:stroke joinstyle="miter"&gt; &lt;v:formulas&gt;  &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;  &lt;v:f eqn="sum @0 1 0"&gt;  &lt;v:f eqn="sum 0 0 @1"&gt;  &lt;v:f eqn="prod @2 1 2"&gt;  &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;  &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;  &lt;v:f eqn="sum @0 0 1"&gt;  &lt;v:f eqn="prod @6 1 2"&gt;  &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;  &lt;v:f eqn="sum @8 21600 0"&gt;  &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;  &lt;v:f eqn="sum @10 21600 0"&gt; &lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:formulas&gt; &lt;v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f"&gt; &lt;o:lock aspectratio="t" v:ext="edit"&gt;&lt;/o:lock&gt;&lt;/v:path&gt;&lt;/v:stroke&gt;&lt;/v:shapetype&gt;&lt;br /&gt;After setting the number of VM instances in the WindowsAzure project’s .cscfg file (to 2, the minimum for high availability), we are almost ready to deploy but we need to make one change to the project first relating to security.&lt;br /&gt;&lt;br /&gt;Our impending change in deployment location will cause ACS authentication to fail unless we change our web project's&amp;nbsp;configuration settings (which we'll do now) and ACS configuration (which we'll do later in this post). In the web project's Web.config file, change the &lt;em&gt;realm&lt;/em&gt; attribute in the&amp;nbsp;wsFederation element to reflect&amp;nbsp;the new production URL.&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: xml; highlight: [2]"&gt;&lt;br /&gt;&amp;lt;federatedAuthentication&amp;gt;&lt;br /&gt;  &amp;lt;wsFederation passiveRedirectEnabled="true" issuer="https://[MY-ACS-NAMESPACE].accesscontrol.windows.net/v2/wsfederation" realm="http://MY-SERVICE-NAME.net/" requireHttps="false" /&amp;gt;&lt;br /&gt;  &amp;lt;cookieHandler requireSsl="false" /&amp;gt;&lt;br /&gt;&amp;lt;/federatedAuthentication&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;We can now proceed to packageand deploy our solution, which can done directly from Visual Studio. We do this inSolution Explorer by right-clicking the Windows Azure project (ResponsiveSite.Azure)and selecting &lt;i style="mso-bidi-font-style: normal;"&gt;Publish&lt;/i&gt;. A wizard thenguides us through the publishing action, which packages up the solution and itsconfiguration, uploads both to the cloud, allocates VM instances, and deploysan image to them that includes our web site. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;span style="font-family: 'Times New Roman';"&gt;&lt;/span&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-GwX-LFs-Gp4/TvnhSLPg2wI/AAAAAAAACCY/2_Y_PA3Oai4/s1600/ResponsiveTours_06_publish.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="270" src="http://1.bp.blogspot.com/-GwX-LFs-Gp4/TvnhSLPg2wI/AAAAAAAACCY/2_Y_PA3Oai4/s400/ResponsiveTours_06_publish.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;br /&gt;The Publish action can take 10-20 minutes, and when completewe’ll see the hosted service showing a status of Ready in the Windows Azuremanagement portal.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;span style="font-family: 'Times New Roman';"&gt;&lt;/span&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-wo7j2YfW6B4/Tvnhb5zXFII/AAAAAAAACCk/NyK_BzNCA8A/s1600/ResponsiveTours_06_published.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="136" src="http://2.bp.blogspot.com/-wo7j2YfW6B4/Tvnhb5zXFII/AAAAAAAACCk/NyK_BzNCA8A/s400/ResponsiveTours_06_published.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Configuring Access Control Service for the Hosted Service&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;In Step 5 we configured the Windows Azure Access Control Service to allow our local development endpoint as a Relying Party. Now we need add another RP, our hosted service endpoint (&lt;a href="http://responsive.cloudapp.net/"&gt;http://responsive.cloudapp.net&lt;/a&gt; in our example) using the Windows Azure portal.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-7bR4pDvSPD8/TvoB2YvQMeI/AAAAAAAACEE/voLLkklkK-k/s1600/ResponsiveTours_06_acs_rp.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="173" src="http://1.bp.blogspot.com/-7bR4pDvSPD8/TvoB2YvQMeI/AAAAAAAACEE/voLLkklkK-k/s400/ResponsiveTours_06_acs_rp.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;Running the Solutionin the Cloud&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: 'Times New Roman';"&gt;&lt;/span&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;All that remains now is try things out. Our hosted servicein the cloud is accessed at a production URL based on the unique name we chosewhen the hosted service was created – http://[SERVICE-NAME].cloudapp.net. &lt;span style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;"&gt;Ourexample deployment is at &lt;a href="http://responsive.cloudapp.net/"&gt;&lt;span style="color: blue;"&gt;http://responsive.cloudapp.net&lt;/span&gt;&lt;/a&gt;.&lt;/span&gt;Whenwe access this URL, we see the hosted service respond, now using a database inthe cloud for promotional content and promotional images served up from blob storage. As inthe past we first have to sign in with a web identity. In short, the site looksand acts like it has in previous steps except that it is now running in aWindows Azure data center accessible on the Internet.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;span style="font-family: 'Times New Roman';"&gt;&lt;/span&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-fhH7WJ4v6K8/Tvnhn2cd0FI/AAAAAAAACCw/h2Ae5AVk4A0/s1600/ResponsiveTours_06_result.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="291" src="http://2.bp.blogspot.com/-fhH7WJ4v6K8/Tvnhn2cd0FI/AAAAAAAACCw/h2Ae5AVk4A0/s400/ResponsiveTours_06_result.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;span style="font-family: 'Times New Roman';"&gt;&lt;/span&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;Summary&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: 'Times New Roman';"&gt;&lt;/span&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;In Step 6 we moved to the cloud, by hosting our web site inWindows Azure Compute, our promotional images in Blob Storage, and ourpromotional content in SQL Azure Database. Our site now has the followingfunctionality:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;span style="font-family: 'Times New Roman';"&gt;&lt;/span&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;• Embodies responsive web design and runs on desktops,tablets, and phones.&lt;br /&gt;• Uses HTML5 and open standards on the web client&lt;br /&gt;• Uses the Microsoft web platform on the web server.&lt;br /&gt;• Provides server-side dynamic content (promotional items)&lt;br /&gt;• Provides client-side dynamic content (Bing Maps)&lt;br /&gt;• Is set up for Windows Azure Compute&lt;br /&gt;• Can authenticate against web identities&lt;br /&gt;• Is hosted in Windows Azure Compute&lt;br /&gt;• Stores images in Windows Azure Blob Storage&lt;br /&gt;• Stores promotional content in SQL Azure Database&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;span style="font-family: 'Times New Roman';"&gt;&lt;/span&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;We've come pretty far, but there's more we can do. In the next step, we'll deploy the application globally tomultiple Windows Azure data centers around the world.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;span style="font-family: 'Times New Roman';"&gt;&lt;/span&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;Next: &lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-with-html5-mvc-windows_6369.html"&gt;Mobile &amp;amp;Global with HTML5, MVC, and Windows Azure, Step 7: Globally-Deployed&lt;o:p&gt;&lt;/o:p&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-family: 'Times New Roman';"&gt;&lt;/span&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;span style="font-family: 'Times New Roman';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9132148272745668459-1315171608429197170?l=davidpallmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidpallmann.blogspot.com/feeds/1315171608429197170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9132148272745668459&amp;postID=1315171608429197170' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/1315171608429197170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/1315171608429197170'/><link rel='alternate' type='text/html' href='http://davidpallmann.blogspot.com/2011/12/mobile-global-with-html5-mvc-windows_27.html' title='Mobile &amp; Global with HTML5, MVC &amp; Windows Azure, Step 6: Cloud-Deployed'/><author><name>David Pallmann</name><uri>http://www.blogger.com/profile/14482909040736697277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-mPcW-mu5fnI/TWGWz8308CI/AAAAAAAABZc/G7etTBFyHm0/s220/david.pallmann.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-3aG5gg0jzgo/TvnYK2J2nII/AAAAAAAACBE/afHkhtAvrYk/s72-c/ResponsiveTours_06_db_server_create.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9132148272745668459.post-173616236069991601</id><published>2011-12-26T22:12:00.000-08:00</published><updated>2011-12-31T08:00:58.777-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='Responsive Cloud Design'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='Cloud'/><category scheme='http://www.blogger.com/atom/ns#' term='Responsive Web Design'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML5'/><category scheme='http://www.blogger.com/atom/ns#' term='Ice'/><category scheme='http://www.blogger.com/atom/ns#' term='Azure'/><category scheme='http://www.blogger.com/atom/ns#' term='Fire'/><title type='text'>Mobile &amp; Global with HTML5, MVC &amp; Windows Azure, Step 5: Secured</title><content type='html'>&lt;span style="font-family: Calibri;"&gt;In &lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-in-7-steps-with-html5-mvc.html"&gt;this series&lt;/a&gt; of posts we’re progressively demonstrating amobile and global sample, Responsive Tours. The source code for all 7 steps ison CodePlex at &lt;/span&gt;&lt;a href="http://responsivetours.codeplex.com/"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;http://responsivetours.codeplex.com&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Here in Step 5 of 7 we’re going to make the site secure byrequiring sign-in with a web identity. To be friendly we’ll let users apply anexisting web/social identity and give them a choice of several identityproviders. &lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;/b&gt;In this step we will:&lt;u&gt;&lt;span style="color: blue; mso-themecolor: hyperlink;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;• Configure the Windows Azure Access Control Service withseveral identity providers&lt;br /&gt;• Implement authentication in the web site with Windows Identity Foundation&lt;br /&gt;• Retrieve claims information (display name) after the user authenticates&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Configuring theAccess Control Service&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;The Windows Azure Access Control Service provides claims-basedsecurity federation. We’ll be using it to handle authentication. After creatingan Access Control Service namespace in the Windows Azure portal it’s necessaryto configure it, which will involve several configuration screens. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;First off we authorize identity providers. For this samplewe’ll use the 3 that are easiest and already built-in to the service: Google,Windows Live ID, and Yahoo!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-Gf3OKAPvz5s/TvlaJwoFGOI/AAAAAAAAB_o/W4Y_3bBuPfI/s1600/ResponsiveTours_05_acs_ip.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="168" src="http://4.bp.blogspot.com/-Gf3OKAPvz5s/TvlaJwoFGOI/AAAAAAAAB_o/W4Y_3bBuPfI/s400/ResponsiveTours_05_acs_ip.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="mso-no-proof: yes;"&gt;&lt;v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f"&gt;&lt;span style="font-family: Calibri;"&gt; &lt;v:stroke joinstyle="miter"&gt; &lt;v:formulas&gt;  &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;  &lt;v:f eqn="sum @0 1 0"&gt;  &lt;v:f eqn="sum 0 0 @1"&gt;  &lt;v:f eqn="prod @2 1 2"&gt;  &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;  &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;  &lt;v:f eqn="sum @0 0 1"&gt;  &lt;v:f eqn="prod @6 1 2"&gt;  &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;  &lt;v:f eqn="sum @8 21600 0"&gt;  &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;  &lt;v:f eqn="sum @10 21600 0"&gt; &lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:formulas&gt; &lt;v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f"&gt; &lt;o:lock aspectratio="t" v:ext="edit"&gt;&lt;/o:lock&gt;&lt;/v:path&gt;&lt;/v:stroke&gt;&lt;/span&gt;&lt;/v:shapetype&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;Next we configure a relying party (RP)—that is, an applicationpermitted to authenticate with this ACS namespace. For the time being, thatwill be our local machine Window Azure Simulation Environment address,http://127.0.0.1:81/. In later steps we’ll add our deployment addresses in thecloud. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-wluRwCJuuBw/TvlaRkI0grI/AAAAAAAAB_0/tyenTusGINc/s1600/ResponsiveTours_05_acs_RP.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="175" src="http://4.bp.blogspot.com/-wluRwCJuuBw/TvlaRkI0grI/AAAAAAAAB_0/tyenTusGINc/s400/ResponsiveTours_05_acs_RP.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;We configure claim rules for our relying party. Claims arename-value pairs our application will be able to retrieve after authentication.Google and Yahoo! will give us a display name, while Windows Live ID does not supplythat value.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-uBif6uA1Moo/TvlafBzrxJI/AAAAAAAACAA/uceS_RJjRfg/s1600/ResponsiveTours_05_acs_rules.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="http://1.bp.blogspot.com/-uBif6uA1Moo/TvlafBzrxJI/AAAAAAAACAA/uceS_RJjRfg/s400/ResponsiveTours_05_acs_rules.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;Finally, the Application Integration area of the portalgives us a WS-Federation Metadata address which we’ll use in the next section.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-MSwfLM-_J80/TvlbKH1ljMI/AAAAAAAACAY/oIR5wxch--c/s1600/ResponsiveTours_05_acs_AP.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="266" src="http://3.bp.blogspot.com/-MSwfLM-_J80/TvlbKH1ljMI/AAAAAAAACAY/oIR5wxch--c/s400/ResponsiveTours_05_acs_AP.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;ImplementAuthentication with Windows Identity Foundation&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;We can instrument our application for claims-based authenticationwith Windows Identity Foundation (WIF). WIF can be used to directlyauthenticate against security token services (STSs) for domain identity and webidentity; and we can also use it to talk to the Windows Azure Access Control Service.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;We add WIF to the solution by right-clicking the web projectand selecting &lt;i style="mso-bidi-font-style: normal;"&gt;Add STS reference&lt;/i&gt;. Thatbrings up a wizard in which we enter our WS-Federation Metadata address (seeprevious section). WIF updates the application and its configuration forclaims-based security.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-wai0rtWK8FM/TvlbSx-woLI/AAAAAAAACAk/0O9nKoUPWKE/s1600/ResponsiveTours_05_wif.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-wai0rtWK8FM/TvlbSx-woLI/AAAAAAAACAk/0O9nKoUPWKE/s400/ResponsiveTours_05_wif.png" width="370" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;The WIF wizard adds the following configuration toWeb.config:&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;pre class="brush: xml"&gt;  &amp;lt;microsoft.identityModel&amp;gt;&lt;br /&gt;    &amp;lt;service&amp;gt;&lt;br /&gt;      &amp;lt;audienceUris&amp;gt;&lt;br /&gt;        &amp;lt;add value="http://127.0.0.1:81/" /&amp;gt;&lt;br /&gt;      &amp;lt;/audienceUris&amp;gt;&lt;br /&gt;      &amp;lt;federatedAuthentication&amp;gt;&lt;br /&gt;        &amp;lt;wsFederation passiveRedirectEnabled="true" issuer="https://MY-ACS-NAMESPACE.accesscontrol.windows.net/v2/wsfederation" realm="http://127.0.0.1:81/" requireHttps="false" /&amp;gt;&lt;br /&gt;        &amp;lt;cookieHandler requireSsl="false" /&amp;gt;&lt;br /&gt;      &amp;lt;/federatedAuthentication&amp;gt;&lt;br /&gt;      &amp;lt;applicationService&amp;gt;&lt;br /&gt;        &amp;lt;claimTypeRequired&amp;gt;&lt;br /&gt;          &amp;lt;!--Following are the claims offered by STS 'https://[MY-ACS-NAMESPACE].accesscontrol.windows.net/'. Add or uncomment claims that you require by your application and then update the federation metadata of this application.--&amp;gt;&lt;br /&gt;          &amp;lt;claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" optional="true" /&amp;gt;&lt;br /&gt;          &amp;lt;claimType type="http://schemas.microsoft.com/ws/2008/06/identity/claims/role" optional="true" /&amp;gt;&lt;br /&gt;          &amp;lt;!--&amp;lt;claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier" optional="true" /&amp;gt;--&amp;gt;&lt;br /&gt;          &amp;lt;!--&amp;lt;claimType type="http://schemas.microsoft.com/accesscontrolservice/2010/07/claims/identityprovider" optional="true" /&amp;gt;--&amp;gt;&lt;br /&gt;        &amp;lt;/claimTypeRequired&amp;gt;&lt;br /&gt;      &amp;lt;/applicationService&amp;gt;&lt;br /&gt;      &amp;lt;issuerNameRegistry type="Microsoft.IdentityModel.Tokens.ConfigurationBasedIssuerNameRegistry, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&amp;gt;&lt;br /&gt;        &amp;lt;trustedIssuers&amp;gt;&lt;br /&gt;          &amp;lt;add thumbprint="ED98B07917624AEE89EDDC086589A6149ADE6859" name="https://MY-ACS-NAMESPACE.accesscontrol.windows.net/" /&amp;gt;&lt;br /&gt;        &amp;lt;/trustedIssuers&amp;gt;&lt;br /&gt;      &amp;lt;/issuerNameRegistry&amp;gt;&lt;br /&gt;      &amp;lt;certificateValidation certificateValidationMode="None" /&amp;gt;&lt;br /&gt;    &amp;lt;/service&amp;gt;&lt;br /&gt;  &amp;lt;/microsoft.identityModel&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="brush: xml"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;If we were doing an in-depth application, we’d configure someparts of the site to require authentication and other parts not to. As this isa demo, we’ll just keep things simple and require authentication to access anyof it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Retrieve ClaimsInformation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;span style="font-family: Calibri;"&gt;We’d like to retrieve and show a display name when one isavailable (some of the identity providers will give us this claim and some donot). Below we add code to the MVC project's Home controller to retrieve a display name claimif available and fashion a welcome string. The welcome string will be passed tothe view via its ViewBag.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Linq;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.Mvc;&lt;br /&gt;using System.Data.SqlClient;&lt;br /&gt;using System.Threading;&lt;br /&gt;using Microsoft.IdentityModel;&lt;br /&gt;using Microsoft.IdentityModel.Claims;&lt;br /&gt;&lt;br /&gt;namespace html5_mvc_razor.Controllers&lt;br /&gt;{&lt;br /&gt;    public class HomeController : Controller&lt;br /&gt;    {&lt;br /&gt;        //&lt;br /&gt;        // GET: /Home/&lt;br /&gt;&lt;br /&gt;        [ValidateInput(false)]&lt;br /&gt;        public ActionResult Index()&lt;br /&gt;        {&lt;br /&gt;            LoadClaims();&lt;br /&gt;            LoadPromos();&lt;br /&gt;            return View();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void LoadClaims()&lt;br /&gt;        {&lt;br /&gt;            ViewBag.Welcome = "Welcome Back!";&lt;br /&gt;            var principal = Thread.CurrentPrincipal;&lt;br /&gt;            var identity = principal.Identity as IClaimsIdentity;&lt;br /&gt;            var claims = identity.Claims;&lt;br /&gt;            ViewBag.Claims = claims;&lt;br /&gt;&lt;br /&gt;            string displayName = null;&lt;br /&gt;&lt;br /&gt;            if (claims != null)&lt;br /&gt;            {&lt;br /&gt;                string claimType;&lt;br /&gt;                foreach (Claim claim in claims)&lt;br /&gt;                {&lt;br /&gt;                    claimType = claim.ClaimType;&lt;br /&gt;                    if (claimType.EndsWith("/nameidentifier"))&lt;br /&gt;                    {&lt;br /&gt;                        displayName = claim.Subject.Name;&lt;br /&gt;                        break;&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;                if (!String.IsNullOrEmpty(displayName))&lt;br /&gt;                {&lt;br /&gt;                    ViewBag.Welcome = "Welcome back, " + displayName;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void LoadPromos()&lt;br /&gt;        {&lt;br /&gt;            ...&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    ...&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre class="brush: xml"&gt;&amp;lt;nav&amp;gt;&lt;br /&gt;    @(ViewBag.Welcome)&lt;br /&gt; &amp;lt;a href=""&amp;gt;Home&amp;lt;/a&amp;gt;&lt;br /&gt; &amp;lt;a href="Map"&amp;gt;Walking Map&amp;lt;/a&amp;gt;&lt;br /&gt; &amp;lt;a href="#"&amp;gt;About Us&amp;lt;/a&amp;gt;&lt;br /&gt;&amp;lt;/nav&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="brush: xml"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;div class="brush: xml"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;strong&gt;Testing Authentication&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;span style="font-family: Calibri;"&gt;Now it's time to see it work. When we run the solution (with F5 out of Visual Studio), we see a sign-in screen. That's because the application realized it did not have a security token and redirected us to the Access Control Service for sign-in. The sign-in screen&amp;nbsp;requires the user to select an identity provider, after which the user will sign in with that provider.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-wYbFP6I08_k/Tv8xKT-L9hI/AAAAAAAACEo/fg16VKdJAH4/s1600/ResponsiveTours_05_signin.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-wYbFP6I08_k/Tv8xKT-L9hI/AAAAAAAACEo/fg16VKdJAH4/s320/ResponsiveTours_05_signin.png" width="267" /&gt;&lt;/a&gt;&lt;/div&gt;Once we successfully sign in with an identity provider, we are redirected back to the application which is now happy because it sees a security token this time. We can see the display name claim is being retrieved via the "Welcome back, &lt;name&gt;" message on the web page.&lt;/name&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-rWqIqQN3EX0/Tv8xS74PKhI/AAAAAAAACE0/141Vie4Qxg8/s1600/ResponsiveTours_05_displayclaim.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="39" src="http://1.bp.blogspot.com/-rWqIqQN3EX0/Tv8xS74PKhI/AAAAAAAACE0/141Vie4Qxg8/s320/ResponsiveTours_05_displayclaim.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="brush: xml"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Summary&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;span style="font-family: Calibri;"&gt;I&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;n Step 5 we secured the site by authenticating webidentities using the Windows Azure Access Control Service. Our site now has thefollowing functionality:&lt;/span&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;span style="font-family: Calibri;"&gt;• Uses HTML5 and open standards on the web client&lt;br /&gt;• Embodies responsive web design and runs on desktops, tablets, and phones.&lt;br /&gt;• Provides server-side dynamic content (promotional items)&lt;br /&gt;• Provides client-side dynamic content (Bing Maps)&lt;br /&gt;• Is set up for Windows Azure Compute&lt;br /&gt;• Can authenticate against web identities&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;span style="font-family: Calibri;"&gt;In the next step, we'll deploy the application to a WindowsAzure data center.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;span style="font-family: Calibri;"&gt;Next: &lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-with-html5-mvc-windows_27.html"&gt;Mobile &amp;amp;Global with HTML5, MVC, and Windows Azure, Step 6: Cloud-Deployed&lt;o:p&gt;&lt;/o:p&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9132148272745668459-173616236069991601?l=davidpallmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidpallmann.blogspot.com/feeds/173616236069991601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9132148272745668459&amp;postID=173616236069991601' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/173616236069991601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/173616236069991601'/><link rel='alternate' type='text/html' href='http://davidpallmann.blogspot.com/2011/12/mobile-global-with-html5-mvc-windows_5299.html' title='Mobile &amp; Global with HTML5, MVC &amp; Windows Azure, Step 5: Secured'/><author><name>David Pallmann</name><uri>http://www.blogger.com/profile/14482909040736697277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-mPcW-mu5fnI/TWGWz8308CI/AAAAAAAABZc/G7etTBFyHm0/s220/david.pallmann.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-Gf3OKAPvz5s/TvlaJwoFGOI/AAAAAAAAB_o/W4Y_3bBuPfI/s72-c/ResponsiveTours_05_acs_ip.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9132148272745668459.post-1665669294163515037</id><published>2011-12-26T18:51:00.000-08:00</published><updated>2011-12-27T11:20:17.313-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='Responsive Cloud Design'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='Cloud'/><category scheme='http://www.blogger.com/atom/ns#' term='Responsive Web Design'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML5'/><category scheme='http://www.blogger.com/atom/ns#' term='Ice'/><category scheme='http://www.blogger.com/atom/ns#' term='Azure'/><category scheme='http://www.blogger.com/atom/ns#' term='Fire'/><title type='text'>Mobile &amp; Global with HTML5, MVC &amp; Windows Azure, Step 4: Cloud-Ready</title><content type='html'>&lt;span style="font-family: Calibri;"&gt;In &lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-in-7-steps-with-html5-mvc.html"&gt;this series&lt;/a&gt; of posts we’re progressively demonstrating amobile and global sample, Responsive Tours. The source code for all 7 steps is on CodePlex at &lt;a href="http://responsivetours.codeplex.com/"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;http://responsivetours.codeplex.com&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;Here in Step 4 of 7 we’re going tomake the project ready for cloud computing with Windows Azure. For the timebeing we are still going to be running the project locally on our developmentmachine, using the Windows Azure Simulation Environment.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;In thisstep we will:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;• Add a Windows Azure project to the solution &lt;br /&gt;• Configure the MVC project as a Windows Azure web role&lt;br /&gt;• Run the solution in the Windows Azure Simulation Environment&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;For this step and successive steps you need the Windows Azure Tools for Visual Studio &amp;amp; SDK version&amp;nbsp;1.6.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Adding a WindowsAzure Project to the Solution&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;To make the solution runnable in Windows Azure we must add aWindows Azure project to it that contains metadata describing the solution’sshape and runtime requirements. We can do this easily by right-clicking thesolution in Visual Studio Solution Explorer and selecting &lt;i style="mso-bidi-font-style: normal;"&gt;Add Windows Azure Deployment Project&lt;/i&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f"&gt;&lt;span style="font-family: Calibri;"&gt; &lt;v:stroke joinstyle="miter"&gt; &lt;v:formulas&gt;  &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;  &lt;v:f eqn="sum @0 1 0"&gt;  &lt;v:f eqn="sum 0 0 @1"&gt;  &lt;v:f eqn="prod @2 1 2"&gt;  &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;  &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;  &lt;v:f eqn="sum @0 0 1"&gt;  &lt;v:f eqn="prod @6 1 2"&gt;  &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;  &lt;v:f eqn="sum @8 21600 0"&gt;  &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;  &lt;v:f eqn="sum @10 21600 0"&gt; &lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:formulas&gt; &lt;v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f"&gt; &lt;o:lock aspectratio="t" v:ext="edit"&gt;&lt;/o:lock&gt;&lt;/v:path&gt;&lt;/v:stroke&gt;&lt;/span&gt;&lt;/v:shapetype&gt;&lt;a href="http://2.bp.blogspot.com/-rRenNwP0KGs/TvkvTXK3dXI/AAAAAAAAB-4/CowPck2Mx5Y/s1600/ResponsiveTours_04_add_azure_deployment.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="341" src="http://2.bp.blogspot.com/-rRenNwP0KGs/TvkvTXK3dXI/AAAAAAAAB-4/CowPck2Mx5Y/s400/ResponsiveTours_04_add_azure_deployment.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;This action adds a new ResponsiveSite.Azure project to thesolution and makes it the start-up project.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Configuring a WebRole&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;Windows Azure solutions consist of one or more &lt;i style="mso-bidi-font-style: normal;"&gt;roles&lt;/i&gt;. A role is like a tier of asolution, and there are several varieties. In this case we want to let the WindowsAzure project know that our solution has a &lt;i style="mso-bidi-font-style: normal;"&gt;WebRole&lt;/i&gt;, and that the ResponsiveSite (MVC) project is that web role. All ittakes to do this is to right-click the ResponsiveSite.Azure project’s &lt;i style="mso-bidi-font-style: normal;"&gt;Roles&lt;/i&gt; folder and select &lt;i style="mso-bidi-font-style: normal;"&gt;Associate With &amp;gt; Web Role Project inSolution&lt;/i&gt;. The ResponsiveSite project now appears under the Roles folder asshown below.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-1jrP7YGuFDM/TvkvgIHbSJI/AAAAAAAAB_E/U6ZuDRvbMAs/s1600/ResponsiveTours_04_solution.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/-1jrP7YGuFDM/TvkvgIHbSJI/AAAAAAAAB_E/U6ZuDRvbMAs/s400/ResponsiveTours_04_solution.png" width="327" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Configuring Instances&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;The metadata files in the Windows Azure project allow us toconfigure runtime information including the number of instances for each role.We’ll set the number of VM&amp;nbsp;instances for our web role to 4&amp;nbsp;in ServiceConfiguration.Local.cscfg (usedin the local simulator) and 2 in ServiecConfiguration.Cloud.cscfg (used in anactual deployment to a cloud data center). Note 2 is a minimum for high availability.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: xml"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br /&gt;&amp;lt;ServiceConfiguration serviceName="ResponsiveSite.Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="1" osVersion="*"&amp;gt;&lt;br /&gt;  &amp;lt;Role name="ResponsiveSite"&amp;gt;&lt;br /&gt;    &amp;lt;Instances count="4" /&amp;gt;&lt;br /&gt;    &amp;lt;ConfigurationSettings&amp;gt;&lt;br /&gt;      &amp;lt;Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" /&amp;gt;&lt;br /&gt;    &amp;lt;/ConfigurationSettings&amp;gt;&lt;br /&gt;  &amp;lt;/Role&amp;gt;&lt;br /&gt;&amp;lt;/ServiceConfiguration&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Running the Solutionin the Windows Azure Simulation Environment&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;We’re now ready to run the solution in the Windows AzureSimulation Environment, a feature that allows local development and testing ofcloud solutions. Press F5 in Visual Studio, wait for the simulation environmentto initialize, and note the solution starts up as usual. &lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-lDfEf0QK9Qk/TvkxgljzC9I/AAAAAAAAB_c/F5URJuDd_VE/s1600/ResponsiveTours_04_127.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="138" src="http://2.bp.blogspot.com/-lDfEf0QK9Qk/TvkxgljzC9I/AAAAAAAAB_c/F5URJuDd_VE/s400/ResponsiveTours_04_127.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f"&gt;&lt;span style="font-family: Calibri;"&gt; &lt;v:stroke joinstyle="miter"&gt; &lt;v:formulas&gt;  &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;  &lt;v:f eqn="sum @0 1 0"&gt;  &lt;v:f eqn="sum 0 0 @1"&gt;  &lt;v:f eqn="prod @2 1 2"&gt;  &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;  &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;  &lt;v:f eqn="sum @0 0 1"&gt;  &lt;v:f eqn="prod @6 1 2"&gt;  &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;  &lt;v:f eqn="sum @8 21600 0"&gt;  &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;  &lt;v:f eqn="sum @10 21600 0"&gt; &lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:formulas&gt; &lt;v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f"&gt; &lt;o:lock aspectratio="t" v:ext="edit"&gt;&lt;/o:lock&gt;&lt;/v:path&gt;&lt;/v:stroke&gt;&lt;/span&gt;&lt;/v:shapetype&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;One clue that you’re running a little differently under the hood&amp;nbsp;is the webaddress you’ll see in the browser: 127.0.0.1:81. To get a better sense for what’shappening, we can use the Compute Emulator UI that is part of Windows Azure SimulationEnvironment. To do so, right-click the blue Windows Azure icon in your systemtray (bottom right on the Windows desktop) and select &lt;em&gt;Show Compute Emulator UI&lt;/em&gt;.You’ll soon see a display like the one below showing each of the VM ‘instances’running (in the simulator, they are processes).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-qAJlRlOtzxI/TvkxZN2wZmI/AAAAAAAAB_Q/6o3DvyQ7eVk/s1600/ResponsiveTours_emulator.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="233" src="http://4.bp.blogspot.com/-qAJlRlOtzxI/TvkxZN2wZmI/AAAAAAAAB_Q/6o3DvyQ7eVk/s400/ResponsiveTours_emulator.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;o:p&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;We won’t be deploying to the public cloud for a few moresteps, but we’re set up for cloud hosting at this point with the Windows AzureCompute Service. When we do deploy to the cloud, we’ll also move our SQL Serverdatabase to a SQL Azure database in the cloud.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;Summary&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;br /&gt;In Step&amp;nbsp;4 we&amp;nbsp;made the solution ready for Windows Azure by adding a Windows Azure project, declaring the web project a&amp;nbsp;web&amp;nbsp;role,&amp;nbsp;and configuring instances. Our site now has thefollowing functionality:&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;br /&gt;• Uses HTML5 and open standards on the web client&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;• Embodies responsive web design and runs on desktops, tablets, and phones.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;• Provides server-side dynamic content (promotional items)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;• Provides client-side dynamic content (Bing Maps)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;• Is set up for Windows Azure Compute&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;In the next step, we'll secure the application for sign-inwith a web/social identity.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;Next: &lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-with-html5-mvc-windows_5299.html"&gt;Mobile &amp;amp;Global with HTML5, MVC, and Windows Azure, Step 5: Secured&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9132148272745668459-1665669294163515037?l=davidpallmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidpallmann.blogspot.com/feeds/1665669294163515037/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9132148272745668459&amp;postID=1665669294163515037' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/1665669294163515037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/1665669294163515037'/><link rel='alternate' type='text/html' href='http://davidpallmann.blogspot.com/2011/12/mobile-global-with-html5-mvc-windows_8218.html' title='Mobile &amp; Global with HTML5, MVC &amp; Windows Azure, Step 4: Cloud-Ready'/><author><name>David Pallmann</name><uri>http://www.blogger.com/profile/14482909040736697277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-mPcW-mu5fnI/TWGWz8308CI/AAAAAAAABZc/G7etTBFyHm0/s220/david.pallmann.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-rRenNwP0KGs/TvkvTXK3dXI/AAAAAAAAB-4/CowPck2Mx5Y/s72-c/ResponsiveTours_04_add_azure_deployment.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9132148272745668459.post-8882513609595399292</id><published>2011-12-26T18:12:00.000-08:00</published><updated>2011-12-27T11:27:27.806-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='Responsive Cloud Design'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='Cloud'/><category scheme='http://www.blogger.com/atom/ns#' term='Responsive Web Design'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML5'/><category scheme='http://www.blogger.com/atom/ns#' term='Ice'/><category scheme='http://www.blogger.com/atom/ns#' term='Azure'/><category scheme='http://www.blogger.com/atom/ns#' term='Fire'/><title type='text'>Mobile &amp; Global with HTML5, MVC &amp; Windows Azure, Step 3: Dynamic Content</title><content type='html'>&lt;span style="font-family: Calibri;"&gt;In &lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-in-7-steps-with-html5-mvc.html"&gt;this series&lt;/a&gt; of posts we’re progressively demonstrating amobile and global sample, Responsive Tours. The source code for all 7 steps is on CodePlex at &lt;a href="http://responsivetours.codeplex.com/"&gt;&lt;span style="color: blue;"&gt;http://responsivetours.codeplex.com&lt;/span&gt;&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;Here in Step 3 of 7 we’re going toimplement some dynamic content for the site—specifically, dynamic promotional itemcontent and map integration.&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt; &lt;/b&gt;In thisstep we will add:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;• Server-side dynamic content for promotional items driven by a database&lt;br /&gt;• Client-side dynamic content for Bing Maps integration using device current location&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Server-side Dynamic Content for Promotional Items&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;The bottom area of our web pages is for promotional items. There is room for three items each with an image, title, and description. We would like all of this to be dynamic so that new offers can be easily advertised.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-f6zPHUrfwrM/TvkFdS2KRHI/AAAAAAAAB98/ZlmWR2TMYUo/s1600/ResponsiveTours_03_promo_content_before.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="72" src="http://4.bp.blogspot.com/-f6zPHUrfwrM/TvkFdS2KRHI/AAAAAAAAB98/ZlmWR2TMYUo/s320/ResponsiveTours_03_promo_content_before.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f"&gt;&lt;span style="font-family: Calibri;"&gt; &lt;v:stroke joinstyle="miter"&gt; &lt;v:formulas&gt;  &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;  &lt;v:f eqn="sum @0 1 0"&gt;  &lt;v:f eqn="sum 0 0 @1"&gt;  &lt;v:f eqn="prod @2 1 2"&gt;  &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;  &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;  &lt;v:f eqn="sum @0 0 1"&gt;  &lt;v:f eqn="prod @6 1 2"&gt;  &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;  &lt;v:f eqn="sum @8 21600 0"&gt;  &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;  &lt;v:f eqn="sum @10 21600 0"&gt; &lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:formulas&gt; &lt;v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f"&gt; &lt;o:lock aspectratio="t" v:ext="edit"&gt;&lt;/o:lock&gt;&lt;/v:path&gt;&lt;/v:stroke&gt;&lt;/span&gt;&lt;/v:shapetype&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;There are several ways we might store content (database,primitive storage,&amp;nbsp;content management system). In this case we’ll use a SQLServer database for the content and create a Promotions table that holds theimage URL, title, and description for each promotional item. We add a databaseproject to the solution for this purpose. We define three records ofpromotional content.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-r_1fCxoHz_8/TvkFnyURHQI/AAAAAAAAB-I/57m6L-oQoCA/s1600/ResponsiveTours_03_promo_db.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="113" src="http://3.bp.blogspot.com/-r_1fCxoHz_8/TvkFnyURHQI/AAAAAAAAB-I/57m6L-oQoCA/s320/ResponsiveTours_03_promo_db.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;Now that we have this data, we need to implement retrieving it in our web project on the server side. The right place to do that isin our MVC controllers, by querying our database table and storing acollection of Promo items in the ViewBag for our views.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Linq;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.Mvc;&lt;br /&gt;using System.Data.SqlClient;&lt;br /&gt;&lt;br /&gt;namespace html5_mvc_razor.Controllers&lt;br /&gt;{&lt;br /&gt;    public class HomeController : Controller&lt;br /&gt;    {&lt;br /&gt;        //&lt;br /&gt;        // GET: /Home/&lt;br /&gt;&lt;br /&gt;        public ActionResult Index()&lt;br /&gt;        {&lt;br /&gt;            LoadPromos();&lt;br /&gt;            return View();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void LoadPromos()&lt;br /&gt;        {&lt;br /&gt;            Dictionary&amp;lt;string, Promo&amp;gt; Promos = new Dictionary&amp;lt;string, Promo&amp;gt;();&lt;br /&gt;&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                using (SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["Tours"].ConnectionString))&lt;br /&gt;                {&lt;br /&gt;                    conn.Open();&lt;br /&gt;&lt;br /&gt;                    using (SqlCommand cmd = new SqlCommand("SELECT * FROM Promotions ORDER BY Id", conn))&lt;br /&gt;                    {&lt;br /&gt;                        using (SqlDataReader reader = cmd.ExecuteReader())&lt;br /&gt;                        {&lt;br /&gt;                            while (reader.Read())&lt;br /&gt;                            {&lt;br /&gt;                                Promos.Add(Convert.ToString(reader["Id"]), new Promo&lt;br /&gt;                                    {&lt;br /&gt;                                        Title = Convert.ToString(reader["Title"]),&lt;br /&gt;                                        Text = Convert.ToString(reader["Text"]),&lt;br /&gt;                                        ImageURL = Convert.ToString(reader["ImageURL"])&lt;br /&gt;                                    }&lt;br /&gt;                                );&lt;br /&gt;                            }&lt;br /&gt;                        }&lt;br /&gt;                    }&lt;br /&gt;                    conn.Close();&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            catch (SqlException)&lt;br /&gt;            {&lt;br /&gt;                // TODO: log exception&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            ViewBag.Promos = Promos;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public class Promo&lt;br /&gt;    {&lt;br /&gt;        public string Title;&lt;br /&gt;        public string Text;&lt;br /&gt;        public string ImageURL;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="brush: csharp"&gt;&lt;span style="font-family: Calibri;"&gt;One way to set dynamic content in MVC is with Razor. We canset the image URLs based on what’s in the ViewBag using the @ syntax:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="brush: csharp"&gt;&lt;/div&gt;&lt;pre class="brush: xml"&gt;&amp;lt;!-- begin - homepage promos --&amp;gt;&lt;br /&gt;&amp;lt;div class="home_promo_container"&amp;gt;&lt;br /&gt; &amp;lt;div class="home_promo"&amp;gt;&lt;br /&gt;  &amp;lt;div class="home_promo_content" style="background-image:url(images/@(ViewBag.Promos["1"].ImageURL));"&amp;gt;&lt;br /&gt;   &amp;lt;h2&amp;gt;...&amp;lt;/h2&amp;gt;&lt;br /&gt;   &amp;lt;p&amp;gt;...&amp;lt;/p&amp;gt;&lt;br /&gt;   &amp;lt;a class="button" href="#"&amp;gt;Learn more &amp;amp;raquo;&amp;lt;/a&amp;gt;&lt;br /&gt;  &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;div class="home_promo"&amp;gt;&lt;br /&gt;  &amp;lt;div class="home_promo_content" style="background-image:url(images/@(ViewBag.Promos["2"].ImageURL));"&amp;gt;&lt;br /&gt;   &amp;lt;h2&amp;gt;...&amp;lt;/h2&amp;gt;&lt;br /&gt;   &amp;lt;p&amp;gt;...&amp;lt;/p&amp;gt;&lt;br /&gt;   &amp;lt;a class="button" href="#"&amp;gt;Learn more &amp;amp;raquo;&amp;lt;/a&amp;gt;&lt;br /&gt;  &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;div class="home_promo"&amp;gt;&lt;br /&gt;  &amp;lt;div class="home_promo_content" style="background-image:url(images/@(ViewBag.Promos["3"].ImageURL));"&amp;gt;&lt;br /&gt;   &amp;lt;h2&amp;gt;...&amp;lt;/h2&amp;gt;&lt;br /&gt;   &amp;lt;p&amp;gt;...&amp;lt;/p&amp;gt;&lt;br /&gt;   &amp;lt;a class="button" href="#"&amp;gt;Learn more &amp;amp;raquo;&amp;lt;/a&amp;gt;&lt;br /&gt;  &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;div class="clear_both"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="brush: xml"&gt;&lt;span style="font-family: Calibri;"&gt;Of course the images aren’t really dynamic yet—they’re stillstatic files that are&amp;nbsp;part of our web project—but once we change that in a later step wehave a way to indicate the URL dynamically from our database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="brush: xml"&gt;&lt;span style="font-family: Calibri;"&gt;Now let’s look at a more modern and versatile way to passdynamic content from an MVC web back end to an open standards web client: databinding with &lt;a href="http://knockoutjs.com/"&gt;Knockout.js&lt;/a&gt;. The Knockout library lets us apply the Model-View-ViewModelpattern to JavaScript. To do this, we need to:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;• Use Razor to generate JavaScript code to create aViewModel (JavaScript object) with content.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;• Annotate HTML DOM elements with data-bind attributes to denote where databinding should occur.&lt;br /&gt;• Initialize and call the Knockout library to apply data binding to the HTML.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;You can see all three of these activities in the Home viewpage (Views/Home/Index.cshtml):&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="brush: xml"&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre class="brush: xml"&gt;@{&lt;br /&gt;    ViewBag.Title = "Responsive Tours";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@* Optional : Include additional stylesheets *@&lt;br /&gt;@section StylesTop&lt;br /&gt;{&lt;br /&gt;&amp;lt;link rel="stylesheet" type="text/css" href="~/../css/stylesheet.css" /&amp;gt;&lt;br /&gt;&amp;lt;link rel="stylesheet" type="text/css" media="only screen and (min-width:50px) and (max-width:550px)"  href="~/../css/screen_small.css"&amp;gt;&lt;br /&gt;&amp;lt;link rel="stylesheet" type="text/css" media="only screen and (min-width:551px) and (max-width:800px)" href="~/../css/screen_medium.css"&amp;gt;&lt;br /&gt;&amp;lt;!--[if lt IE 9]&amp;gt;&lt;br /&gt; &amp;lt;script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt; &amp;lt;link rel="stylesheet" type="text/css" href="~/../css/stylesheet_ie.css" /&amp;gt;&lt;br /&gt;&amp;lt;![endif]--&amp;gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@* Optional : Include additional immediately executed script references *@&lt;br /&gt;@section ScriptsTop&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@* Optional : Header content *@&lt;br /&gt;@section Header&lt;br /&gt;{&lt;br /&gt;&amp;lt;meta name="description" content="This site was created from a template originally designed and developed by Codify Design Studio. Find more free templates at http://www.adobe.com/devnet/author_bios/chris_converse.html" /&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="X-UA-Compatible" content="IE=9" /&amp;gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@* Required : Render body container here *@&lt;br /&gt;  &amp;lt;div class="page"&amp;gt;&lt;br /&gt;   &amp;lt;header&amp;gt;&amp;lt;a class="logo" href="#"&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/header&amp;gt;&lt;br /&gt;   &amp;lt;div class="page_content"&amp;gt;&lt;br /&gt;&lt;br /&gt;     &lt;br /&gt;     &amp;lt;!-- begin - homepage promo --&amp;gt;&lt;br /&gt;     &amp;lt;div class="marquee_container"&amp;gt;&lt;br /&gt;      &amp;lt;div class="marquee_photos"&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;loading...&amp;lt;/div&amp;gt;&lt;br /&gt;      &amp;lt;div class="marquee_caption"&amp;gt;&lt;br /&gt;       &amp;lt;div class="marquee_caption_content"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;       &lt;br /&gt;      &amp;lt;/div&amp;gt;&lt;br /&gt;      &amp;lt;div class="marquee_nav"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;      &amp;lt;div class="marquee_panel_data"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;     &amp;lt;/div&amp;gt;&lt;br /&gt;     &amp;lt;div class="marquee_smallscreen"&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;loading...&amp;lt;/div&amp;gt;&lt;br /&gt;     &amp;lt;!-- end - homepage promo --&amp;gt;&lt;br /&gt;     &lt;br /&gt;     &amp;lt;!-- begin - homepage promos --&amp;gt;&lt;br /&gt;     &amp;lt;div class="home_promo_container"&amp;gt;&lt;br /&gt;      &amp;lt;div class="home_promo"&amp;gt;&lt;br /&gt;       &amp;lt;div class="home_promo_content" style="background-image:url(images/@(ViewBag.Promos["1"].ImageURL));"&amp;gt;&lt;br /&gt;        &amp;lt;h2 data-bind="text: PromoTitle1"&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;        &amp;lt;p  data-bind="text: PromoText1"/&amp;gt;&lt;br /&gt;        &amp;lt;a class="button" href="#"&amp;gt;Learn more &amp;amp;raquo;&amp;lt;/a&amp;gt;&lt;br /&gt;       &amp;lt;/div&amp;gt;&lt;br /&gt;      &amp;lt;/div&amp;gt;&lt;br /&gt;      &amp;lt;div class="home_promo"&amp;gt;&lt;br /&gt;       &amp;lt;div class="home_promo_content" style="background-image:url(images/@(ViewBag.Promos["2"].ImageURL));"&amp;gt;&lt;br /&gt;        &amp;lt;h2 data-bind="text: PromoTitle2"&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;        &amp;lt;p  data-bind="text: PromoText2"/&amp;gt;&lt;br /&gt;        &amp;lt;a class="button" href="#"&amp;gt;Learn more &amp;amp;raquo;&amp;lt;/a&amp;gt;&lt;br /&gt;       &amp;lt;/div&amp;gt;&lt;br /&gt;      &amp;lt;/div&amp;gt;&lt;br /&gt;      &amp;lt;div class="home_promo"&amp;gt;&lt;br /&gt;       &amp;lt;div class="home_promo_content" style="background-image:url(images/@(ViewBag.Promos["3"].ImageURL));"&amp;gt;&lt;br /&gt;        &amp;lt;h2 data-bind="text: PromoTitle3"&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;        &amp;lt;p  data-bind="text: PromoText3"/&amp;gt;&lt;br /&gt;        &amp;lt;a class="button" href="#"&amp;gt;Learn more &amp;amp;raquo;&amp;lt;/a&amp;gt;&lt;br /&gt;       &amp;lt;/div&amp;gt;&lt;br /&gt;      &amp;lt;/div&amp;gt;&lt;br /&gt;      &amp;lt;div class="clear_both"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;      &amp;lt;!-- begin - homepage promos --&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;/div&amp;gt;&lt;br /&gt;    &amp;lt;nav&amp;gt;&lt;br /&gt;     &amp;lt;a href=""&amp;gt;Home&amp;lt;/a&amp;gt;&lt;br /&gt;     &amp;lt;a href="Map"&amp;gt;Walking Map&amp;lt;/a&amp;gt;&lt;br /&gt;     &amp;lt;a href="#"&amp;gt;About Us&amp;lt;/a&amp;gt;&lt;br /&gt;    &amp;lt;/nav&amp;gt;&lt;br /&gt;   &amp;lt;/div&amp;gt;&lt;br /&gt;   &amp;lt;footer&amp;gt;&amp;amp;copy; 2011 &amp;amp;bull; Responsive Tours (a fictitious company)&amp;lt;/footer&amp;gt;&lt;br /&gt;  &amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;@* Optional : Include fooder content *@&lt;br /&gt;@section Footer&lt;br /&gt;{&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@* Optional : Include additional deferred script references, or page initialisation *@&lt;br /&gt;@section ScriptsBottom&lt;br /&gt;{&lt;br /&gt;&amp;lt;script type="text/javascript" src="~/../scripts/farinspace/jquery.imgpreload.min.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript" src="~/../scripts/farinspace/template.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;    var timeToChange = 6;     //seconds&lt;br /&gt;    var transitionTime = 1.5; //seconds&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;$(document).ready(function () {&lt;br /&gt;&lt;br /&gt;    // Knockout view model.&lt;br /&gt;        &lt;br /&gt;    var viewModel = {&lt;br /&gt;        PromoTitle1: "@(ViewBag.Promos["1"].Title)",&lt;br /&gt;        PromoTitle2: "@(ViewBag.Promos["2"].Title)",&lt;br /&gt;        PromoTitle3: "@(ViewBag.Promos["3"].Title)",&lt;br /&gt;        PromoText1: "@(ViewBag.Promos["1"].Text)",&lt;br /&gt;        PromoText2: "@(ViewBag.Promos["2"].Text)",&lt;br /&gt;        PromoText3: "@(ViewBag.Promos["3"].Text)"&lt;br /&gt;    };&lt;br /&gt;&lt;br /&gt;    // Activates knockout.js&lt;br /&gt;    ko.applyBindings(viewModel);&lt;br /&gt;});&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;!-- Knockout data binding --&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript" src="~/../scripts/libs/knockout-1.2.1.min.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="brush: xml"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;With all of this in place, when we run the project we nowsee the promotional item content is&amp;nbsp;loaded from&amp;nbsp;the database on the server side and bound to the web page on the client side. Voila! -- dynamic content.&lt;/span&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-akJ3hy-VRRY/TvkR2EK4XzI/AAAAAAAAB-U/gFLYJ7Q4X7c/s1600/ResponsiveTours_03_promo_content_after.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="242" src="http://4.bp.blogspot.com/-akJ3hy-VRRY/TvkR2EK4XzI/AAAAAAAAB-U/gFLYJ7Q4X7c/s400/ResponsiveTours_03_promo_content_after.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f"&gt;&lt;span style="font-family: Calibri;"&gt; &lt;v:stroke joinstyle="miter"&gt; &lt;v:formulas&gt;  &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;  &lt;v:f eqn="sum @0 1 0"&gt;  &lt;v:f eqn="sum 0 0 @1"&gt;  &lt;v:f eqn="prod @2 1 2"&gt;  &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;  &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;  &lt;v:f eqn="sum @0 0 1"&gt;  &lt;v:f eqn="prod @6 1 2"&gt;  &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;  &lt;v:f eqn="sum @8 21600 0"&gt;  &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;  &lt;v:f eqn="sum @10 21600 0"&gt; &lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:formulas&gt; &lt;v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f"&gt; &lt;o:lock aspectratio="t" v:ext="edit"&gt;&lt;/o:lock&gt;&lt;/v:path&gt;&lt;/v:stroke&gt;&lt;/span&gt;&lt;/v:shapetype&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Client-side Map Integration&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;"&gt;Theother area of dynamic content is the map view. When a user clicks the WalkingMap link, they are supposed to get an interactive map that is initiallycentered on their current location. This is an integration we can handle on theclient side. We’ll do it using Bing Maps and HTML5’s geolocation feature.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;With a Bing Maps key in hand, a small amount of JavaScriptis all that is needed to render an interactive map, obtain the current location(if the user grants it), and center a map on that point. &lt;span style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;"&gt;Thecode selects one of two map elements (“map1” or “map2”) based on which isvisible for thr active device layout.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;/div&gt;&lt;div class="brush: xml"&gt;&lt;/div&gt;&lt;pre class="brush: javascript"&gt;&amp;lt;!-- Bing Maps --&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;    var map = null;&lt;br /&gt;&lt;br /&gt;    function getMap() {&lt;br /&gt;&lt;br /&gt;        var mapOptions = {&lt;br /&gt;            credentials: 'PucpG1...BING-MAPS-KEY...ByFfkTmeGP',&lt;br /&gt;            mapTypeId: Microsoft.Maps.MapTypeId.automatic,&lt;br /&gt;            zoom: 17&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        var mapElement = document.getElementById("map1");&lt;br /&gt;        if (!isVisible(mapElement)) {&lt;br /&gt;            mapElement = document.getElementById("map2");&lt;br /&gt;        }&lt;br /&gt;        map = new Microsoft.Maps.Map(mapElement, mapOptions);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    function setMapZoom(zoomLevel) {&lt;br /&gt;        map.setView({ zoom: zoomLevel });&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    function getCurrentLocation() {&lt;br /&gt;        var geoLocationProvider = new Microsoft.Maps.GeoLocationProvider(map);&lt;br /&gt;        geoLocationProvider.getCurrentPosition({ errorCallback: errorCallback, successCallback: displayCenter });&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    function displayCenter(args) {&lt;br /&gt;        setMapZoom(17);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    function errorCallback(object) {&lt;br /&gt;        alert('Error callback invoked, error code ' + object.errorCode);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    function isVisible(obj) {&lt;br /&gt;        if (obj == document) return true&lt;br /&gt;&lt;br /&gt;        if (!obj) return false&lt;br /&gt;        if (!obj.parentNode) return false&lt;br /&gt;        if (obj.style) {&lt;br /&gt;            if (obj.style.display == 'none') return false&lt;br /&gt;            if (obj.style.visibility == 'hidden') return false&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        //Try the computed style in a standard way&lt;br /&gt;        if (window.getComputedStyle) {&lt;br /&gt;            var style = window.getComputedStyle(obj, "")&lt;br /&gt;            if (style.display == 'none') return false&lt;br /&gt;            if (style.visibility == 'hidden') return false&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        //Or get the computed style using IE's silly proprietary way&lt;br /&gt;        var style = obj.currentStyle&lt;br /&gt;        if (style) {&lt;br /&gt;            if (style['display'] == 'none') return false&lt;br /&gt;            if (style['visibility'] == 'hidden') return false&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        return isVisible(obj.parentNode)&lt;br /&gt;    }&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="brush: javascript"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;When we run the project, select the map view, and givepermission to use our location we are greeted with an interactive map initiallyshowing our current location. We can use this in a walking tour of a city tosee where we are, find points of interest, bookmark favorite spots, and findothers in our party.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-7kqqVQbu91s/TvkmbgLkShI/AAAAAAAAB-g/-tZ1FVhRebA/s1600/ResponsiveTours_03_location.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="21" src="http://2.bp.blogspot.com/-7kqqVQbu91s/TvkmbgLkShI/AAAAAAAAB-g/-tZ1FVhRebA/s400/ResponsiveTours_03_location.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-LTQjdQoko4E/TvkmljO49LI/AAAAAAAAB-s/6hXu9thae0s/s1600/ResponsiveTours_03_map.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="242" src="http://2.bp.blogspot.com/-LTQjdQoko4E/TvkmljO49LI/AAAAAAAAB-s/6hXu9thae0s/s400/ResponsiveTours_03_map.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="brush: javascript"&gt;&lt;/div&gt;&lt;div class="brush: javascript"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;The final result of all this integration is a web site that has bothclient-side and server-side dynamic content: an interactive map for walking tours,&amp;nbsp;and promotional items that can be easily changed via a database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="brush: javascript"&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Summary&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;In Step&amp;nbsp;3 we enabled server-side dynamic content for promotional items&amp;nbsp;using&amp;nbsp;a database, MVC Razor, and Knockout. We also enabled client-side dynamic content via Bing Maps.&amp;nbsp;Our site now has thefollowing functionality:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;"&gt;• Uses HTML5 and open standards on the webclient&lt;br /&gt;• Embodies responsive web design and runs on desktops, tablets, and phones.&lt;br /&gt;• Provides server-side dynamic content (promotional items)&lt;br /&gt;• Provides client-side dynamic content (Bing Maps)&lt;/span&gt;&lt;/div&gt;&lt;div class="brush: javascript"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;In the next step, we'll prepare the application for cloudcomputing on Windows Azure.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="brush: javascript"&gt;&lt;span style="font-family: Calibri;"&gt;Next: &lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-with-html5-mvc-windows_8218.html"&gt;Mobile &amp;amp;Global with HTML5, MVC, and Windows Azure, Step 4: Cloud-Ready&lt;o:p&gt;&lt;/o:p&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="brush: javascript"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9132148272745668459-8882513609595399292?l=davidpallmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidpallmann.blogspot.com/feeds/8882513609595399292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9132148272745668459&amp;postID=8882513609595399292' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/8882513609595399292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/8882513609595399292'/><link rel='alternate' type='text/html' href='http://davidpallmann.blogspot.com/2011/12/mobile-global-with-html5-mvc-windows_3991.html' title='Mobile &amp; Global with HTML5, MVC &amp; Windows Azure, Step 3: Dynamic Content'/><author><name>David Pallmann</name><uri>http://www.blogger.com/profile/14482909040736697277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-mPcW-mu5fnI/TWGWz8308CI/AAAAAAAABZc/G7etTBFyHm0/s220/david.pallmann.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-f6zPHUrfwrM/TvkFdS2KRHI/AAAAAAAAB98/ZlmWR2TMYUo/s72-c/ResponsiveTours_03_promo_content_before.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9132148272745668459.post-7402700630012918226</id><published>2011-12-26T14:50:00.000-08:00</published><updated>2011-12-27T11:19:48.530-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='Responsive Cloud Design'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='Cloud'/><category scheme='http://www.blogger.com/atom/ns#' term='Responsive Web Design'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML5'/><category scheme='http://www.blogger.com/atom/ns#' term='Ice'/><category scheme='http://www.blogger.com/atom/ns#' term='Azure'/><category scheme='http://www.blogger.com/atom/ns#' term='Fire'/><title type='text'>Mobile &amp; Global with HTML5, MVC &amp; Windows Azure, Step 2: Web Project</title><content type='html'>&lt;span style="font-family: Calibri;"&gt;In &lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-in-7-steps-with-html5-mvc.html"&gt;this series&lt;/a&gt; of posts we’re progressively demonstrating amobile and global sample, Responsive Tours. The source code for all 7 steps is on CodePlex at &lt;a href="http://responsivetours.codeplex.com/"&gt;&lt;span style="color: blue;"&gt;http://responsivetours.codeplex.com&lt;/span&gt;&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;Here in Step 2 of 7 we’re going tofocus on taking design assets and creating a web project, using open standardson the web client and the Microsoft web platform on the web server.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;In thisstep we will:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;• Create a web project from a template.&lt;br /&gt;• Import the designer assets into the web template.&lt;br /&gt;• Be able to run the site from Visual Studio.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;HTML5/MVC Web ProjectTemplate&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;In Step 1 we were fortunate to be working with a progressivedesign outfitted with good designer tools, and so the web developer receives designerassets already in the form of HTML5, CSS, JavaScript, and media files. They’ve alreadybeen coded for responsive web design that will adapt to desktop, tablet, orphone size screens.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;It’s now the web developer’s job to take these assets andput them into a web project. In this scenario we’ll use a Visual Studio template for our project we use at Neudesic that combines open standards on theweb client with the Microsoft web platform on the server side. Specifically, onthe front end we’ll be using HTML5, CSS3, JavaScript, and the popular librariesModernizr and jQuery. On the back end we’ll be using Windows Server, IIS,ASP.NET, MVC3, and the Knockout.js library.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-fq-72MXpPbo/Tvj5AOlJAyI/AAAAAAAAB9M/AzOt7Jc7dy8/s1600/ResponsiveTours_02_webproject_view.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="255" src="http://3.bp.blogspot.com/-fq-72MXpPbo/Tvj5AOlJAyI/AAAAAAAAB9M/AzOt7Jc7dy8/s400/ResponsiveTours_02_webproject_view.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Importing theDesigner Assets into the Web Project&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;It’s not &lt;i style="mso-bidi-font-style: normal;"&gt;difficult&lt;/i&gt;to move the designer assets into this project format, but it does require beingcareful and paying attention to detail. Here are some of the things that needto be done in order to move the assets into the web project:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;• CSS files need to be moved from the includesfolder to the project’s CSS folder.&lt;br /&gt;• Script files need to be moved from the includes folder to theproject’s scripts folder.&lt;br /&gt;• Image files need to be moved from the images folder to the project’simages folder.&lt;/span&gt;&lt;span style="font-family: &amp;quot;MS Shell Dlg 2&amp;quot;, sans-serif; font-size: 8.5pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;• The index.html and map.html markup need to be turned into Home and MapMVC views.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;Of all of the above, it’s converting the HTML pages intoviews that is the most work. Our template wants well-separated sections, so wemust surgically move sections of the original HTML markup into the view pages.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-mlmYrOGnJCQ/Tvj5LNyTrFI/AAAAAAAAB9Y/At2hbWjByIM/s1600/ResponsiveTours_02_webproject_view.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="255" src="http://1.bp.blogspot.com/-mlmYrOGnJCQ/Tvj5LNyTrFI/AAAAAAAAB9Y/At2hbWjByIM/s400/ResponsiveTours_02_webproject_view.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;When we’re done, we have fitted our design assets into awell-factored MVC3 project organization:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-BJeIrA6Tz1M/Tvj5UhuwyzI/AAAAAAAAB9k/g392rA0Jbk0/s1600/ResponsiveTours_02_webproject_solution.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/-BJeIrA6Tz1M/Tvj5UhuwyzI/AAAAAAAAB9k/g392rA0Jbk0/s400/ResponsiveTours_02_webproject_solution.png" width="208" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Result: A Web Projectfor Developing the Application&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;The final result of all this is a project we can run out ofVisual Studio with F5. It doesn’t look or act any differently from the designerassets produced in Step 1, but we now have a web project and server back end inplace. This gives us the foundation to turn this site into a real application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-j0LEHsi0SsA/Tvj5k_XAy5I/AAAAAAAAB9w/ED2g2kHHFLA/s1600/ResponsiveTours_02_webproject_result.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="250" src="http://1.bp.blogspot.com/-j0LEHsi0SsA/Tvj5k_XAy5I/AAAAAAAAB9w/ED2g2kHHFLA/s400/ResponsiveTours_02_webproject_result.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;"&gt;Summary&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;In Step 2 we created a web project from design assets, with open standards on the web client and the Microsoft web platform on the server. Our site now has the following functionality:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;"&gt;&lt;span style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;"&gt;• Embodies responsive web design and runs on desktops, tablets, and phones.&lt;br /&gt;• Uses HTML5 and open standards on the web client&lt;br /&gt;• Uses the Microsoft web platform on the web server.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;In the next step, we'll bring the application to life by implementing dynamic content.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;Next: &lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-with-html5-mvc-windows_3991.html"&gt;Mobile &amp;amp;Global with HTML5, MVC, and Windows Azure, Step 3: Dynamic Content&lt;o:p&gt;&lt;/o:p&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9132148272745668459-7402700630012918226?l=davidpallmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidpallmann.blogspot.com/feeds/7402700630012918226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9132148272745668459&amp;postID=7402700630012918226' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/7402700630012918226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/7402700630012918226'/><link rel='alternate' type='text/html' href='http://davidpallmann.blogspot.com/2011/12/mobile-global-with-html5-mvc-windows_26.html' title='Mobile &amp; Global with HTML5, MVC &amp; Windows Azure, Step 2: Web Project'/><author><name>David Pallmann</name><uri>http://www.blogger.com/profile/14482909040736697277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-mPcW-mu5fnI/TWGWz8308CI/AAAAAAAABZc/G7etTBFyHm0/s220/david.pallmann.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-fq-72MXpPbo/Tvj5AOlJAyI/AAAAAAAAB9M/AzOt7Jc7dy8/s72-c/ResponsiveTours_02_webproject_view.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9132148272745668459.post-318004291865198969</id><published>2011-12-26T13:37:00.001-08:00</published><updated>2011-12-27T11:19:39.193-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='Responsive Cloud Design'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='Cloud'/><category scheme='http://www.blogger.com/atom/ns#' term='Responsive Web Design'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML5'/><category scheme='http://www.blogger.com/atom/ns#' term='Ice'/><category scheme='http://www.blogger.com/atom/ns#' term='Azure'/><category scheme='http://www.blogger.com/atom/ns#' term='Fire'/><title type='text'>Mobile &amp; Global with HTML5, MVC &amp; Windows Azure, Step 1: Design</title><content type='html'>&lt;span style="font-family: Calibri;"&gt;In &lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-in-7-steps-with-html5-mvc.html"&gt;this series&lt;/a&gt; of posts we’re progressively demonstrating amobile and global sample, Responsive Tours. The source code for all 7 steps is on CodePlex at &lt;a href="http://responsivetours.codeplex.com/"&gt;&lt;span style="color: blue;"&gt;http://responsivetours.codeplex.com&lt;/span&gt;&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Here in Step 1 of 7 we’re going tofocus on the design of the web site by a designer. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Starting Point:Responsive Web Design Sample&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;What designers produce for web developers can vary: if you’refortunate, you might get assets in the form of HTML and CSS you can directlywork with; other times you may only receive wireframes and graphic assets and haveto craft your own markup and stylesheets. As web design tools improve in thewake of the HTML5 revolution, it’s increasingly likely your web designer may beable to just hand you HTML5, CSS3, and JavaScript. That’s the scenario we’regoing to assume here, that a web developer is using sophisticated tools: Dreamweaver,part of the Adobe Create Suite 5.5.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;Designers and developers also need to be in agreement onapproach. In this scenario we’re assuming progressive designers and webdevelopers who have agreed to use &lt;/span&gt;&lt;a href="http://www.alistapart.com/articles/responsive-web-design/"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;responsive webdesign&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;. This will yield adaptive layout that works across desktop, tablet,and phone-size screens on modern browsers. This is accomplished through the useof a fluid grid layout system, CSS media queries to switch to the mostappropriate layout, and media sizing.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;The starting point we’ll use for this project is a &lt;/span&gt;&lt;a href="http://www.adobe.com/devnet/dreamweaver/articles/dw-template-responsive-jquery-marquee.html#articlecontentAdobe_numberedheader_1"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;samplefrom Adobe&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt; for an Adobe Dreamweaver tutorial that is already set up for responsiveweb design (&lt;/span&gt;&lt;a href="http://download.macromedia.com/pub/developer/html5/template_13_Publish/index.html"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;previewit here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;). This is a front-end web site with HTML/CSS/JavaScript code but noback end. When viewed in Dreamweaver with the Multi-screen Preview viewer, it lookslike this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-1twKqJjOFOE/TvjyVVRGd9I/AAAAAAAAB8Q/Ny7UrNrfa0g/s1600/AdobeResponsiveSample.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="287" src="http://4.bp.blogspot.com/-1twKqJjOFOE/TvjyVVRGd9I/AAAAAAAAB8Q/Ny7UrNrfa0g/s400/AdobeResponsiveSample.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;You can run the project by opening index.html in a browser.Note that as you resize the browser to desktop, tablet, and phone sizes thelayout adjusts. As you run the sample, you’ll see that the sample hasanimation: there are 3 main pictures and marquees that periodically rotate.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-5h5LbYPdGT8/TvjyhnAEEgI/AAAAAAAAB8c/KzABV023thg/s1600/ResponsiveTours_01_original.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="246" src="http://3.bp.blogspot.com/-5h5LbYPdGT8/TvjyhnAEEgI/AAAAAAAAB8c/KzABV023thg/s400/ResponsiveTours_01_original.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Customizing theContent&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;This sample is a pretty good fit for our tour operatorscenario—even the images fit! —but we do of course want to customize thecontent a bit even if this is just a demo. Let’s tackle the following contentcustomizations:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;• A logo for Responsive Tours&lt;br /&gt;• Different links (&lt;i style="mso-bidi-font-style: normal;"&gt;Home&lt;/i&gt; and &lt;i style="mso-bidi-font-style: normal;"&gt;Walking Map&lt;/i&gt; in place of &lt;i style="mso-bidi-font-style: normal;"&gt;Who We Are&lt;/i&gt; and &lt;i style="mso-bidi-font-style: normal;"&gt;What We Do&lt;/i&gt;)&lt;br /&gt;• Custom text for the 3 marquees (brown slides)&lt;/span&gt;&lt;span style="font-family: &amp;quot;MS Shell Dlg 2&amp;quot;, sans-serif; font-size: 8.5pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;• A second HTML page, map.html, with a placeholder for an interactivemap.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;The designer can make most of these changes directly inDreamweaver. There’s a nice Multiscreen Viewer facility for previewing the sitein 3 screen sizes.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-AU6s81esxH8/Tvjy9umzktI/AAAAAAAAB8o/P_VVTiqEnlY/s1600/ResponsiveTours_01_dreamweaver.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="243" src="http://1.bp.blogspot.com/-AU6s81esxH8/Tvjy9umzktI/AAAAAAAAB8o/P_VVTiqEnlY/s400/ResponsiveTours_01_dreamweaver.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;One area of content we are &lt;em&gt;not&lt;/em&gt; changing in this step is the3 promotion items on the bottom of the page. We want those to be dynamic content,so that will be left of the web developer in a future step.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;With the above content changes, our site now looks likethis:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-PbOYe0roYZQ/TvjzSwokh5I/AAAAAAAAB80/Xdpi7z9uX2k/s1600/ResponsiveTours_01_customized_content.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="250" src="http://2.bp.blogspot.com/-PbOYe0roYZQ/TvjzSwokh5I/AAAAAAAAB80/Xdpi7z9uX2k/s400/ResponsiveTours_01_customized_content.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-n_PAYXX7yts/TvjzeSBHH5I/AAAAAAAAB9A/l1Rx2_16BrY/s1600/ResponsiveTours_01_map_page.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="165" src="http://3.bp.blogspot.com/-n_PAYXX7yts/TvjzeSBHH5I/AAAAAAAAB9A/l1Rx2_16BrY/s320/ResponsiveTours_01_map_page.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;At this point, we have a good start on the site design andthe assets are already in the form of HTML5, CSS, and JavaScript plus mediafiles. However, we only have the front end. In the next step, we’ll hand thisoff to a web developer who will add the necessary server side to the webproject.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;strong&gt;&lt;span style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;"&gt;Summary&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;In Step&amp;nbsp;1 we created design assets from a responsive web design HTML5 template.&amp;nbsp;Our site now has thefollowing functionality:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;• Embodies responsive web design and runs on desktops, tablets, and phones.&lt;br /&gt;• Usesd HTML5 and open standards on the web client.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;"&gt;&lt;span style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;"&gt;In the next step, we'll create a web project and import the design assets into it.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;Next: &lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-with-html5-mvc-windows_26.html"&gt;Mobile &amp;amp;Global with HTML5, MVC, and Windows Azure, Step 2: Web Project&lt;o:p&gt;&lt;/o:p&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9132148272745668459-318004291865198969?l=davidpallmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidpallmann.blogspot.com/feeds/318004291865198969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9132148272745668459&amp;postID=318004291865198969' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/318004291865198969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/318004291865198969'/><link rel='alternate' type='text/html' href='http://davidpallmann.blogspot.com/2011/12/mobile-global-with-html5-mvc-windows.html' title='Mobile &amp; Global with HTML5, MVC &amp; Windows Azure, Step 1: Design'/><author><name>David Pallmann</name><uri>http://www.blogger.com/profile/14482909040736697277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-mPcW-mu5fnI/TWGWz8308CI/AAAAAAAABZc/G7etTBFyHm0/s220/david.pallmann.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-1twKqJjOFOE/TvjyVVRGd9I/AAAAAAAAB8Q/Ny7UrNrfa0g/s72-c/AdobeResponsiveSample.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9132148272745668459.post-1151721344282927829</id><published>2011-12-26T13:36:00.000-08:00</published><updated>2011-12-29T06:26:39.687-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='Responsive Cloud Design'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='Cloud'/><category scheme='http://www.blogger.com/atom/ns#' term='Responsive Web Design'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML5'/><category scheme='http://www.blogger.com/atom/ns#' term='Ice'/><category scheme='http://www.blogger.com/atom/ns#' term='Azure'/><category scheme='http://www.blogger.com/atom/ns#' term='Fire'/><title type='text'>Mobile &amp; Global in 7 Steps with HTML5, MVC &amp; Windows Azure</title><content type='html'>&lt;span style="font-family: Calibri;"&gt;In &lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-in-7-steps-with-html5-mvc.html"&gt;this series&lt;/a&gt; of posts I’ll be walking you through a samplethat shows web and cloud working well together. Recently I’ve been writingabout &lt;/span&gt;&lt;a href="http://www.alistapart.com/articles/responsive-web-design/"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;responsiveweb design&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt; and a complementary concept, &lt;/span&gt;&lt;a href="http://davidpallmann.blogspot.com/2011/12/responsive-cloud-design.html"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;responsivecloud design&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;. This sample and tutorial show them in action. The sampleillustrates an application that is truly mobile and global, that can runanywhere and everywhere. It leverages HTML5 and open standards on the web client;&amp;nbsp;works across desktop browsers,tablets, and phones; uses the Microsoft webplatform (notably MVC) on the web server; runs on&amp;nbsp;the Windows Azure cloud computingplatform; and is globally deployed to data centers on 3 continents withautomatic traffic management. &lt;span style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;"&gt;That’sa lot of capability, but we’re going to accomplish all this in 7 straightforward steps.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Responsive ToursSample&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;The sample is for a fictitious company that operates citytours named Responsive Tours. The source code is on CodePlex at &lt;/span&gt;&lt;a href="http://responsivetours.codeplex.com/"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;http://responsivetours.codeplex.com&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;and the final result can be accessed online at &lt;/span&gt;&lt;a href="http://responsive-tours.com/"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;http://responsive-tours.com&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-Lj1BqPffxF8/Tvjfwpq3Z-I/AAAAAAAAB7U/xF5NwqSRGG4/s1600/ResponsiveTours.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="http://2.bp.blogspot.com/-Lj1BqPffxF8/Tvjfwpq3Z-I/AAAAAAAAB7U/xF5NwqSRGG4/s400/ResponsiveTours.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Workflow&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;This sample is also intended to show designer &amp;lt;-&amp;gt;developer &amp;lt;-&amp;gt; deployment workflow. The source code is in 7 progressive projects:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-with-html5-mvc-windows.html"&gt;1. Design: Design site front end&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-with-html5-mvc-windows_26.html"&gt;2. Web Project: Import into web template&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-with-html5-mvc-windows_3991.html"&gt;3. Integrate: Add dynamic content&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-with-html5-mvc-windows_8218.html"&gt;4. Cloud-ready: Set up for Windows Azure&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-with-html5-mvc-windows_5299.html"&gt;5. Secured: Sign-in with web/social identity&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-with-html5-mvc-windows_27.html"&gt;6. Deployed: Deployed to the cloud&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-with-html5-mvc-windows_6369.html"&gt;7. Global: Deployed worldwide with traffic management&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;o:p&gt;Of course, there should be overlap and iteration between designer and developer but as we're dealing with a relatively simple application here we can proceed serially.&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-SYQ2lL0_Nx8/TvoEADjZKZI/AAAAAAAACEc/e7dMy8tP_Do/s1600/responsive_workflow.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="252" src="http://2.bp.blogspot.com/-SYQ2lL0_Nx8/TvoEADjZKZI/AAAAAAAACEc/e7dMy8tP_Do/s400/responsive_workflow.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;&lt;br /&gt;In this first post we’ll give you an overview of the sample, and in Parts 2 through 8 we’ll go into each step of this workflow in some detail.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif; font-size: 9.5pt; line-height: 115%;"&gt;1. Design: Design Site Front End&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif; font-size: 9.5pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;br /&gt;In this step a responsive web design HTML5 sample from Adobe is used as astarting point. It detects device characteristics and dimensions and adapts todesktop, tablet, or phone size screens automatically. The designer uses AdobeDreamweaver to customize the sample for a fictitious city tour operator,Responsive Tours. &lt;br /&gt;&lt;br /&gt;This is Project 1 in the sample. You can run this project locally in a browser by opening index.html.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. Web Project: Import into Web Template&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In this step the design assets (HTML, CSS, JavaScript, images) are handed offto a web developer, who inserts them into a web template to create a webproject. The developer can now work in Visual Studio. The web project'sfront-end is open standards-based and the back end uses the Microsoft webplatform, including MVC3.&lt;br /&gt;&lt;br /&gt;This is Project&amp;nbsp;2 in the sample. You can run this project locally by opening the solution in Visual Studio andpressing F5.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3. Integrate: Add Dynamic Content&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In this step the developer implements dynamic content for promotional items,querying a database on the server side. MVC-Razor and Knockout.js are used fordata binding. Visual integration with Bing Maps&amp;nbsp;is also added onthe web client side.&lt;br /&gt;&lt;br /&gt;This step requires you to set up a database with a table for promotional items, and also to obtain a Bing Maps key.&lt;br /&gt;&lt;br /&gt;This is Project&amp;nbsp;3 in the sample. You can run this project locally by opening the solution in Visual Studio andpressing F5.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;4. Cloud-ready: Set up for Windows Azure&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In this step the developer adds a Windows Azure project to the solution so thatit can be run as a web role in the Windows Azure Simulation Environment on thelocal machine.&lt;br /&gt;&lt;br /&gt;This is Project&amp;nbsp;4 in the sample. You can run this project locally by opening the solution in Visual Studio andpressing F5. It will run in the Windows Azure Simulation Environment.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;5. Secured: Sign-in with web identity&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In this step the developer sets up authentication using the Access ControlService. The user can sign in with a Windows Live, Yahoo!, or Google social/webidentity.&lt;br /&gt;&lt;br /&gt;This step requires you to configure an Access Control Service namespace in theWindows Azure portal.&lt;br /&gt;&lt;br /&gt;This is Project&amp;nbsp;5 in the sample. You can run this project locally by opening the solution in Visual Studio andpressing F5. It will run in the Windows Azure Simulation Environment.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;6. Deployed: Deployed to the cloud&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In this step the developer deploys the solution code and data to a the cloudWindows Azure data center. The promotional item images are moved to blobstorage.&lt;br /&gt;&lt;br /&gt;This step requires you to create, configure, and populate a Hosted Service,Database, Blob Storage, and Access Control Service in a Windows Azure datacenter.&lt;br /&gt;&lt;br /&gt;This is Project&amp;nbsp;6 in the sample. You can run this project online by directing your browser to the production URLfor your hosted service. After signing in with the identity provider of yourchoice, the web site will run from a Windows Azure data center.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;7. Global: Deployed worldwide with traffic management&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In this step the developer deploys the solution to additional data centers forworldwide presence and sets up automated traffic management. The promotionalitem images are accessed via the Content Delivery Network for performance basedon locale.&lt;br /&gt;&lt;br /&gt;This step requires you to create, configure, and populate 3 Hosted Services(each in a different data center), a Database, Blob Storage, the Access ControlService, and Traffic Management in Windows Azure.&lt;br /&gt;&lt;br /&gt;This is Project&amp;nbsp;7 in the sample. You can run this project online by directing your browser to the trafficmanager URL for your hosted service. After signing in with the identityprovider of your choice, the web site will run in a randomly selected datacenter (US, Europe, or Asia).&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;Next: &lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-with-html5-mvc-windows.html"&gt;Mobile &amp;amp; Global with HTML5, MVC, and Windows Azure, Step 1: Design&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9132148272745668459-1151721344282927829?l=davidpallmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidpallmann.blogspot.com/feeds/1151721344282927829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9132148272745668459&amp;postID=1151721344282927829' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/1151721344282927829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/1151721344282927829'/><link rel='alternate' type='text/html' href='http://davidpallmann.blogspot.com/2011/12/mobile-global-in-7-steps-with-html5-mvc.html' title='Mobile &amp; Global in 7 Steps with HTML5, MVC &amp; Windows Azure'/><author><name>David Pallmann</name><uri>http://www.blogger.com/profile/14482909040736697277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-mPcW-mu5fnI/TWGWz8308CI/AAAAAAAABZc/G7etTBFyHm0/s220/david.pallmann.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-Lj1BqPffxF8/Tvjfwpq3Z-I/AAAAAAAAB7U/xF5NwqSRGG4/s72-c/ResponsiveTours.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9132148272745668459.post-350544265154249384</id><published>2011-12-16T07:24:00.000-08:00</published><updated>2011-12-29T10:32:04.834-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Responsive Cloud Design'/><category scheme='http://www.blogger.com/atom/ns#' term='Responsive Web Design'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML5'/><category scheme='http://www.blogger.com/atom/ns#' term='Ice'/><category scheme='http://www.blogger.com/atom/ns#' term='Azure'/><category scheme='http://www.blogger.com/atom/ns#' term='Fire'/><title type='text'>Responsive Cloud Design</title><content type='html'>&lt;span style="font-family: Calibri;"&gt;As readers of this blog know, I’m big on both web and cloud,especially when used together: particularly, HTML5 and mobile devices on the frontend and the Microsoft cloud (Windows Azure) on the back end. A big movement inthe modern web world is &lt;/span&gt;&lt;a href="http://www.alistapart.com/articles/responsive-web-design/"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;Responsive WebDesign&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt; (RWD), the brainchild of Ethan Marcotte. When web and cloud are usedtogether, what is the cloud’s role in an RWD approach? I’d like to suggestthere are symmetric principles and that there is such a thing as &lt;i style="mso-bidi-font-style: normal;"&gt;Responsive Cloud Design&lt;/i&gt; (RCD). RWD andRCD are a powerful combination.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Principles of ResponsiveWeb Design&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;Responsive Web Design lets you create a single webapplication that works across desktop browsers, tablets, and phones. Here’s anexample of responsive web design (from an &lt;/span&gt;&lt;a href="http://www.adobe.com/devnet/dreamweaver/articles/dw-template-responsive-jquery-marquee.html#articlecontentAdobe_numberedheader_1"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;Adobesample&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;):&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-VEkeqlnWMYA/Tuti-yhi8jI/AAAAAAAAB7A/8LdfxOH6eP8/s1600/rcd1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-VEkeqlnWMYA/Tuti-yhi8jI/AAAAAAAAB7A/8LdfxOH6eP8/s320/rcd1.png" width="215" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;The driving idea behind RWD is that your web application &lt;i&gt;detects&lt;/i&gt; the dimensions and characteristicsof the browser and device it is running on and &lt;i&gt;adapts&lt;/i&gt; layout and behavior accordingly. That means working wellfrom big screens on the desktop down to tablets and phone-size screens. It alsomeans supporting touch, mouse, and keyboard equally well. This involves use offluid grids, media queries, browser feature detection, and use of percentagesand proportional values in CSS, all of which are explained well in Ethan’s &lt;/span&gt;&lt;a href="http://www.abookapart.com/products/responsive-web-design"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;book&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;. &amp;nbsp;A corollary of this approach is that to be &lt;i&gt;efficient&lt;/i&gt; you will download smallermedia content for a small screen than you would for a large screen.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;1.&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i&gt;Detection&lt;/i&gt;:Sense what you are running on&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;2.&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;Adaptation&lt;/i&gt;:Adapt layout and behavior to what you are running on&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;3.&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;Efficiency&lt;/i&gt;:Deliver appropriately-sized content for efficiency&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;I can’t help expanding on these three core tenets because theRWD philosophy so easily applies to other key considerations we see in theweb/mobile space. I like to add three more: location, availability, and sync. In&lt;i style="mso-bidi-font-style: normal;"&gt;location&lt;/i&gt;, we adjust content and inputdefaults (and perhaps even language) according to where a user is right now.Just as we detect device characteristics for a fluid layout we can also detectlocation to give a localized experience. In &lt;i style="mso-bidi-font-style: normal;"&gt;availability&lt;/i&gt;,the user should be able to access the web application no matter where they areand whether or not they are online at the moment. This is more than just beingable to render well on any convenient device, it also means the application canintelligently know where to find its back end services (which may be multiply deployed)and can handle temporarily disconnected use. Lastly, &lt;i style="mso-bidi-font-style: normal;"&gt;sync&lt;/i&gt; is vital to making availability a reality so that userinformation and state can be consistently maintained despite switching betweendevices and being occasionally disconnected. This means having a well-thoughtout data and state strategy that leverages local browser/device caching andstorage as well as back-end services and storage, possibly across multiple datacenters.&lt;i style="mso-bidi-font-style: normal;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;4.&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;Location&lt;/i&gt;:Detect location and adjust content accordingly&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;5.&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;Availability&lt;/i&gt;:Your web application is always available to you&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;6.&lt;/span&gt;&lt;span style="font: normal normal normal 7pt/normal 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;Sync: &lt;/i&gt;Dataand state consistency across devices&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;RWD is awesome. What about the back end? You can appreciatehow the server side of your web application can play an important role inserving up tailored, efficient content and supporting the web client well.Anders Andersen has a good presentation on &lt;/span&gt;&lt;a href="http://www.slideshare.net/4nd3rsen/ress-responsive-design-server-side-components-10084972"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;RESS&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;,RWD with server-side components. I think if you add cloud computing to the mixand use its strengths, you not only support RWD well but extend it withsynergistic capabilities. Let’s see what that looks like.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;Principles ofResponsive Cloud Design&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;You might say that on the front end we think about &lt;i style="mso-bidi-font-style: normal;"&gt;the user&lt;/i&gt; whereas on the back end we mustalso think about &lt;i style="mso-bidi-font-style: normal;"&gt;the users&lt;/i&gt; overall. I’vewritten previously about how both web and cloud have synergistic considerationsof &lt;/span&gt;&lt;a href="http://davidpallmann.blogspot.com/2011/09/when-worlds-collide-2-html5-cloud.html"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;elasticity&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;and &lt;/span&gt;&lt;a href="http://davidpallmann.blogspot.com/2011/10/when-worlds-collide-part-3-html5-cloud.html"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;location&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-4XyauGXCaRY/TutjIF_qybI/AAAAAAAAB7I/dvOTEbk-AUY/s1600/shutterstock_83351815.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="295" src="http://4.bp.blogspot.com/-4XyauGXCaRY/TutjIF_qybI/AAAAAAAAB7I/dvOTEbk-AUY/s320/shutterstock_83351815.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Calibri;"&gt;It turns out there is a pretty direct symmetry between the useof RWD on the web client side and what you should do on the back end to supportit, especially when using cloud computing for hosting, storage, and otherservices. Each of the six considerations I’ve described above has a cloudcounterpart.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;Although &lt;i style="mso-bidi-font-style: normal;"&gt;detection&lt;/i&gt;is a client-side activity, the server can use that information as well as logit for analysis. Analytics will tell you how many users you have, what thebreakdown of devices and browsers is, and provide raw data you can mine toanalyze behavior. Although you could use an analytics service, you might alsochoose to store your own analytics in cheap cloud storage where you can addbusiness context to the data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;Adaptation&lt;/i&gt; is somethingboth the web client and the web server can and should participate in. There’slittle point in serving up content that won’t be used, so intelligent servingbased on device characteristics is highly preferable to a top-heavy client-sideapproach where unneeded elements are merely hidden from view which is wasteful.Those who develop in .NET should look at the upcoming .NET 4.5 / MVC4 wherethere is a lot of support for device-adaptive serving, mobile views, and jQuerymobile.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;Efficiency&lt;/i&gt; is amajor back end concern so that the entire user population is served well. Inaddition to serving up appropriately sized media for a user’s device, cloudcomputing really shines here. First, there is the elastic scale of the cloudthat allows it to be cost-efficient whether you run at small, medium, or globalscale. Your application can adjust its deployment size based on anticipated ormeasured changes in load. Cloud platforms also provide services for caching andlocalized delivery of content. In Windows Azure we have the Cache Service, adistributed memory cache, and the Content Delivery Network (CDN), a worldwidenetwork of 24+ edge servers that cache and distribute static and dynamiccontent efficiently.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;For &lt;i style="mso-bidi-font-style: normal;"&gt;location&lt;/i&gt;,cloud computing allows you to support a regionally broad or worldwide audience.First, the aforementioned use of Content Delivery Networks senses a user’slocation and delivers content efficiently through the use of edge servers andcontent caching. Second, traffic management can direct a user to the nearestdata center. In Windows Azure this service is provided by the Windows AzureTraffic Manager, which can route users to hosted cloud applications based onlocation or other criteria. A user in Nebraska visiting www.myapp.com might berouted to a North American data center while a user in the UK entering the sameURL might be routed to a European data center.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;The cloud plays a crucial role in providing access and &lt;i style="mso-bidi-font-style: normal;"&gt;availability&lt;/i&gt;. There’s no greater way to provideuniversal access than to use the cloud. The redundancy of application serversand storage units combined with intelligent infrastructure and disasterrecovery procedures keeps your web application back end highly available. You’lltypically see an SLA of 3 to 3 ½ 9’s in cloud computing platforms. When yourapplication is deployed to multiple data centers, there are failover behaviorsyou can take advantage of. For example, Windows Azure auto-replicates storageacross pairs of data centers, and the Traffic Manager service can performfailover routing to an alternative data center if an application becomesnon-responsive.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;To support &lt;i style="mso-bidi-font-style: normal;"&gt;sync&lt;/i&gt;,cloud computing is useful in providing backing storage (both relational andnon-relational) for web applications. Well-designed web services and the strategicuse of identity, sessions, and cookies can allow you to manage state and dataeven though your user may change devices on you or go offline at times. Cloudidentity services such as the Windows Azure Access Control Service let yousupport logon through one or more web identities easily. When there are multipledeployments in multiple geographies, you may wish to keep some datasynchronized across data centers. In Windows Azure, a SQL Azure database can besynchronized with other cloud or on-premise databases using the SQL Azure Data Syncservice. Cloud middleware such as the Windows Azure Service Bus can help route notificationsand processing tasks. Syncing with social networks also applies here--there are many "clouds" to consider, not just the one you're using to host your application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;The Combination&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;RWD and RCD together are a force to be reckoned with. Theylet you create web applications that can be run anywhere and everywhere: fromsmall devices to large, from small-scale to global scale. I consider the modern web to be driven by 4 pillars: HTML5, mobility, cloud, and social. RWD covers the first two and RCD the latter two.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;By now, you’dprobably like to see an example of web and cloud working togetherresponsively. Here's one, called Responsive Tours (&lt;a href="http://davidpallmann.blogspot.com/2011/12/mobile-global-in-7-steps-with-html5-mvc.html"&gt;8-part tutorial&lt;/a&gt;, &lt;a href="http://responsivetours.codeplex.com/"&gt;source code&lt;/a&gt;, &lt;a href="http://responsive-tours.com/"&gt;online demo&lt;/a&gt;).&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9132148272745668459-350544265154249384?l=davidpallmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidpallmann.blogspot.com/feeds/350544265154249384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9132148272745668459&amp;postID=350544265154249384' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/350544265154249384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/350544265154249384'/><link rel='alternate' type='text/html' href='http://davidpallmann.blogspot.com/2011/12/responsive-cloud-design.html' title='Responsive Cloud Design'/><author><name>David Pallmann</name><uri>http://www.blogger.com/profile/14482909040736697277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-mPcW-mu5fnI/TWGWz8308CI/AAAAAAAABZc/G7etTBFyHm0/s220/david.pallmann.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-VEkeqlnWMYA/Tuti-yhi8jI/AAAAAAAAB7A/8LdfxOH6eP8/s72-c/rcd1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9132148272745668459.post-5678672053554890579</id><published>2011-11-08T12:42:00.000-08:00</published><updated>2011-11-08T13:31:34.783-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Video'/><category scheme='http://www.blogger.com/atom/ns#' term='Dashboard'/><category scheme='http://www.blogger.com/atom/ns#' term='Cloud'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML5'/><category scheme='http://www.blogger.com/atom/ns#' term='Ice'/><category scheme='http://www.blogger.com/atom/ns#' term='Azure'/><category scheme='http://www.blogger.com/atom/ns#' term='Fire'/><title type='text'>An HTML5-Windows Azure Dashboard, Part 2: HTML5 Video</title><content type='html'>As I continue to experiment with &lt;a href="http://davidpallmann.blogspot.com/2011/11/html5-windows-azure-dashboard-part-1.html"&gt;HTML5-cloud dashboards&lt;/a&gt;, I wanted to move beyond charts and also include media content, especially HTML5 video. More and more, modern interfaces need movement and video is one source of movement. Of course, it should only be there if it’s providing some value and you definitely don’t want to overdo it. In particular you need to think about the impact of video on tablets and phones where download speed and device power may be constrained.&lt;br /&gt;&lt;br /&gt;In my &lt;a href="http://neudesic.blob.core.windows.net/dash/contoso.html" target="_blank"&gt;second dashboard prototype&lt;/a&gt;, I created another fictional company, Contoso Health. In this medical scenario there are plenty of places for video: patient monitoring, MRIs, endoscopy, even reference materials. It is in need of &lt;span style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;"&gt;someoptimization for tablets and especially phones but it’s off to a good start.&amp;nbsp;&lt;/span&gt;It demos well on computers and tablets and works in the latest editions of Chrome, FireFox, IE, and Safari. While there is plenty of work still to be done to make this a real functional dashboard—the content is somewhat canned in this first incarnation-- it does convey a compelling vision for where this can go. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-4tEzqOQP2ls/TrmMKoG7r1I/AAAAAAAAB6w/GT1oCx2j8B4/s1600/dash_contoso.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="264" src="http://3.bp.blogspot.com/-4tEzqOQP2ls/TrmMKoG7r1I/AAAAAAAAB6w/GT1oCx2j8B4/s320/dash_contoso.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;HTML5 Video&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;This was my first opportunity to play with HTML5 video. &lt;br /&gt;&lt;br /&gt;The good news about HTML5 video is we can do video and audio in modern browsers without plug-ins, and thanks to hardware acceleration we have more horsepower on the web client side than ever before. Even the media controls are built into the browsers. &lt;span style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;"&gt;Belowyou can see the browser controls for IE9, Chrome, and FireFox (which onlyappear when you hover over or touch the video). In addition, Safari Mobile onthe iPad will let you take a video full-screen.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-GurjiDxHGlA/TrmQsv7VR9I/AAAAAAAAB64/G3FNQQhkuXg/s1600/browservideo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="102" src="http://2.bp.blogspot.com/-GurjiDxHGlA/TrmQsv7VR9I/AAAAAAAAB64/G3FNQQhkuXg/s320/browservideo.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The bad news is, video can be complicated at times and there is no single best format: the browser makers have not been able to come to agreement on a common video format they will support. That means you’ll be encoding your video to several formats if you want broad browser coverage. &lt;br /&gt;&lt;br /&gt;A good place to see what HTML5 video looks like is at the&amp;nbsp;&lt;a href="http://w3schools.com/html5/html5_video.asp" target="_blank"&gt;HTML5 video online tutorial&lt;/a&gt; at w3schools.com. &lt;span style="font-family: Calibri;"&gt;Within a &amp;lt;video&amp;gt; tag, you specify one or more video sources. If the browser doesn’t support any of your choices, the content within the&amp;lt;video&amp;gt; tag is displayed, most commonly an apologetic message or fallback content such as an image.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: js"&gt;&amp;lt;video width="320" height="240" controls="controls"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;source src="movie.mp4" type="video/mp4" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;source src="movie.ogg" type="video/ogg" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;Your browser does not support the video tag.&lt;br /&gt;&amp;lt;/video&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;span style="font-family: Calibri;"&gt;Now about video formats. Microsoft is championing &lt;/span&gt;&lt;a href="http://blogs.msdn.com/b/ie/archive/2010/04/29/html5-video.aspx" target="_blank"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;H.264&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;,which several other browsers also support, and FireFox prefers &lt;/span&gt;&lt;a href="http://shaver.off.net/diary/2009/01/26/advancing-open-video/" target="_blank"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;OGG-Theora&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;.From my experimentation, if you provide your video content in these two formatsyou’ll be largely in good shape across popular browsers and devices. If youfind you need more coverage and want to add a third format, you might look into&lt;/span&gt;&lt;a href="http://mashable.com/2010/05/19/google-webm-html5/" target="_blank"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;WebM&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;My starting point was stock footage MPEGs, and I needed tocreate H.264 and OGG video content from that. My first thought was to useExpression Encoder but it turns out the version available to me &lt;/span&gt;&lt;a href="http://www.microsoft.com/expression/products/encoderpro_overview.aspx" target="_blank"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;doesn’thave the codecs needed&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;. I ended up using &lt;/span&gt;&lt;a href="http://www.avs4you.com/AVS-Video-Converter.aspx" target="_blank"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;AVS Video Converter&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;for conversion to H.264 video and &lt;/span&gt;&lt;a href="http://apps.foxtab.com/videoconverter/" target="_blank"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;FoxTab Video Converter&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt; for conversionto OGG, both low-priced tools.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;My video tags ended up looking like this:&lt;br /&gt;&lt;pre class="brush: js"&gt;&amp;lt;video id="video1" controls="controls" loop autoplay&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;source src="heartscan.mpg" type="video/mp4" /&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;source src="heartscan.ogg" type="video/ogg" /&amp;gt;&lt;br /&gt;&amp;nbsp; Your browser does not support the video tag.&lt;br /&gt;&amp;lt;/video&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: Calibri;"&gt;In addition to having good format coverage, the correct MIMEtype (Content-Type header) needs to be served up for each video. Since we’reaccessing the video blobs from Windows Azure blob storage, we put them in acontainer that allows web access and set each blob’s ContentType metadatafield. I received the best results with “video/mp4” for H.264 and “video/ogg”for OGG. I didn’t use WebM, but if you’re planning to I believe “video/webm”is the right content type to specify.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;Now that I’ve made some progress envisioning the dashboarduser experience it’s time to start making it functional. Stay tuned!&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9132148272745668459-5678672053554890579?l=davidpallmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidpallmann.blogspot.com/feeds/5678672053554890579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9132148272745668459&amp;postID=5678672053554890579' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/5678672053554890579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/5678672053554890579'/><link rel='alternate' type='text/html' href='http://davidpallmann.blogspot.com/2011/11/html5-windows-azure-dashboard-part-2.html' title='An HTML5-Windows Azure Dashboard, Part 2: HTML5 Video'/><author><name>David Pallmann</name><uri>http://www.blogger.com/profile/14482909040736697277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-mPcW-mu5fnI/TWGWz8308CI/AAAAAAAABZc/G7etTBFyHm0/s220/david.pallmann.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-4tEzqOQP2ls/TrmMKoG7r1I/AAAAAAAAB6w/GT1oCx2j8B4/s72-c/dash_contoso.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9132148272745668459.post-409903547291709459</id><published>2011-11-06T23:35:00.000-08:00</published><updated>2011-11-08T14:30:54.772-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dashboard'/><category scheme='http://www.blogger.com/atom/ns#' term='Cloud'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML5'/><category scheme='http://www.blogger.com/atom/ns#' term='Ice'/><category scheme='http://www.blogger.com/atom/ns#' term='Azure'/><category scheme='http://www.blogger.com/atom/ns#' term='Fire'/><title type='text'>An HTML5-Windows Azure Dashboard, Part 1: Design Decisions</title><content type='html'>&lt;span style="font-family: Calibri;"&gt;Business dashboards are big, and my aim is to create astunning one that combines my twin passions for HTML5 and Windows Azure. Inthis series I’ll be sharing my progress on iterative development of an HTML5dashboard hosted in Microsoft’s &lt;/span&gt;&lt;a href="http://azure.com/" target="_blank"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;Windows Azure&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;cloud that works on computers, tablets, and phones. Here in Part 1 I’ll shareinitial thoughts on design and a glimpse of our &lt;/span&gt;&lt;a href="http://neudesic.blob.core.windows.net/dash/fabrikam.html" target="_blank"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;first prototype&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;,themed for a fictional company named Fabrikam Imports. In subsequent posts I’llhave additional companies set up with a variety of themes and content.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-a7QNMqCOQLw/TreEyfdfKbI/AAAAAAAAB6Q/Qul7aK6WInQ/s1600/fabrikam_ipad.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="307" src="http://1.bp.blogspot.com/-a7QNMqCOQLw/TreEyfdfKbI/AAAAAAAAB6Q/Qul7aK6WInQ/s400/fabrikam_ipad.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="mso-no-proof: yes;"&gt;&lt;v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f"&gt;&lt;span style="font-family: Calibri;"&gt; &lt;v:stroke joinstyle="miter"&gt; &lt;v:formulas&gt;  &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;  &lt;v:f eqn="sum @0 1 0"&gt;  &lt;v:f eqn="sum 0 0 @1"&gt;  &lt;v:f eqn="prod @2 1 2"&gt;  &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;  &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;  &lt;v:f eqn="sum @0 0 1"&gt;  &lt;v:f eqn="prod @6 1 2"&gt;  &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;  &lt;v:f eqn="sum @8 21600 0"&gt;  &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;  &lt;v:f eqn="sum @10 21600 0"&gt; &lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:formulas&gt; &lt;v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f"&gt; &lt;o:lock aspectratio="t" v:ext="edit"&gt;&lt;/o:lock&gt;&lt;/v:path&gt;&lt;/v:stroke&gt;&lt;/span&gt;&lt;/v:shapetype&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-size: large;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="line-height: 115%; mso-bidi-font-size: 11.0pt;"&gt;Goals&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 12pt; line-height: 115%; mso-bidi-font-size: 11.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;Here are my goals for the dashboard, which will be realizedin steps:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;Compelling&lt;/i&gt;. I wantto provide a compelling user experience with animation and transitions. It willtake some refinement to find the balance between an interesting level ofmovement and being overly flashy or distracting.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;Branded&lt;b style="mso-bidi-font-weight: normal;"&gt;. &lt;/b&gt;&lt;/i&gt;Since the dashboard will mostoften be used by businesses, it will need to carry their branding. This can bedone overtly with a corporate logo and reinforced with a background , suchas the bamboo image we’re using for Fabrikam Imports. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;Broad Reach&lt;/i&gt;. The dashboardneeds to be accessible across computers, tablets, and phones and work wellwhether accessed by mouse or touch. This means fluid layout that accommodatesdifferent form factors and orientations, and interactive elements large enoughto support touch.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;Useful&lt;/i&gt;. Thedashboard is more than eye candy: it also needs to be a valuable source ofaggregated business information. Which means it had better be able to integrateto many kinds of data sources.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;Content Versatility&lt;/i&gt;.Charts aren’t the only content to be shown. I’d ultimately like to also supporttables, maps, media, and other content. In some cases we’ll provide more thanone view of the same content.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;Data Source Versatility&lt;/i&gt;.Supporting the most popular formats and access methods should make it easyto integrate dashboards to many kinds of data sources without a lot of rocketscience. I initially plan to support data in XML and JSON format data that canbe retrieved from cloud blob storage, web services, or feeds. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;Explorable&lt;/i&gt;. WhileI’m not trying to compete with BI offerings, I would like to havemore than one dimension to the data. When viewing a chart of data, you shouldbe able to select a value of interest and drill down a level if the data allowsthat.&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;Lightweight and DeluxeEdition&lt;/i&gt;s. For my dashboard, I’m envisioning a lightweight edition and a deluxeedition. I’ll explain the differences later in this post.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;Fast Setup&lt;/i&gt;. Thelightweight version should allow you to set up a decent dashboard in justan hour or two if you have your data available in XML or JSON format. Setuptime for the deluxe implementation will depend on how ambitious you are and will typically involve some custom integration work.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-size: 12pt; line-height: 115%; mso-bidi-font-size: 11.0pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-size: large;"&gt;The FrontEnd&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;If you’ve been following this blog, you’ve noticed that manyof my recent experiments in HTML5 have been around controls such as a &lt;/span&gt;&lt;a href="http://davidpallmann.blogspot.com/2011/10/adventures-in-html5-javascript-doomsday.html"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;counter&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;,&lt;/span&gt;&lt;a href="http://davidpallmann.blogspot.com/2011/10/adventures-in-html5-bouncy-bar-chart.html"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;barchart&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;, and &lt;/span&gt;&lt;a href="http://davidpallmann.blogspot.com/2011/10/adventures-in-html5-html5-canvas-ticker.html"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;ticker&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;.That’s all been driving toward creation of a dashboard. But creating all thecontrols I need on my own (and taking them to commercial grade) would take along time, so the best approach will be a flexible dashboard that can adapt toinclude controls from a variety of sources. With this approach, I can combinebest of breed controls with my own. For charting, I’m currently trying out &lt;/span&gt;&lt;a href="http://www.jscharts.com/" target="_blank"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;JSCharts&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;. So far I’ve found JSCharts to beeasy to use and it displays very efficiently. I am encountering some displayissues however after resizing so the jury is still out on whether I’ll be usingit in the long term. Either way, I eventually want to support multiple chart packages.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;The current layout has a corporate logo and a ticker at top (whichcan be paused/resumed with a click or touch). Below this I have three views inmind: list, tiles, and zoom. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-Eg8Qp8BzTCQ/TreFWrWo1RI/AAAAAAAAB6Y/ky9Z5_XXx1E/s1600/dashlayout.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://1.bp.blogspot.com/-Eg8Qp8BzTCQ/TreFWrWo1RI/AAAAAAAAB6Y/ky9Z5_XXx1E/s400/dashlayout.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt; text-align: center;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;em&gt;List, Tiles, and Zoom Views&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;List View&lt;/i&gt;. In listview, you’ll see a list of content that’s available. You can check an item tocontrol whether it is shown or hidden in other views, and you can select anitem to go directly to it in zoom view.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;Tiles View&lt;/i&gt;. Intiles view, you’ll see all of the content (except items you’re chosen to hide)shown in fluid layout to fit your device. Content buttons allow you to takeactions on the data, such as zooming in for a detail view.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;Zoom View&lt;/i&gt;. In zoomview you’re focused on one item of content and it fills the full window. Hereyou might be able to see the content in more than one way, such as a table andchart side-by-side. It’s also from here you may be able to explore some datasets by drilling down.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;Implementation technologies for the front end are HTML5,CSS3, JavaScript, and JQuery. Content controls will be a mix of my HTML5 controlsand public/commercial controls.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-size: large;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="line-height: 115%; mso-bidi-font-size: 11.0pt;"&gt;The BackEnd&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 12pt; line-height: 115%; mso-bidi-font-size: 11.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;The back end runs in the Windows Azure cloud. I mentionedearlier I have two editions in mind, a lightweight edition and a deluxeedition. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Lightweight Edition&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;The lightweight edition is meant to be fast and simple toset up and incredibly cheap to operate. It runs completely out of Windows Azureblob storage and that’s also where the data is kept. This will generally costjust a few bucks a month to operate. Accessing the dashboard URL in a browsertransfers the front end code down to run in the web client. Ajax calls issuedby the web client pick up data files from blob storage (which are in XML orJSON format) and the dashboard content is populated. To update the data in thedashboard, you push out new data in the form of XML or JSON files to blobstorage. This can be done with small ‘update agent’ programs that integrate toyour internal systems or manually. This model does have some limitations, namelyauthentication. The best you can do to secure this is to generate shared accesssignatures (secretive URLs) for the blob container. On the plus side, this model is fast and cheap, and&amp;nbsp;it's fantastic for throwing together great looking demos at a moment's notice.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-dxZ13vgZqQw/TreF1yiKStI/AAAAAAAAB6g/f7BI_IXsIKA/s1600/dash-lightweight.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="140" src="http://2.bp.blogspot.com/-dxZ13vgZqQw/TreF1yiKStI/AAAAAAAAB6g/f7BI_IXsIKA/s400/dash-lightweight.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt; text-align: center;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Lightweight Dashboard Model&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;Here’s how access works in the lightweight model:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoListParagraphCxSpFirst" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;1.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;User visits their dashboard URL, an HTML file hostedin Windows Azure Blob storage.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;2.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;The dashboard client HTML5/CSS/JavaScript startsrunning in the user’s browser, which could be on a PC, tablet, or phone.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoListParagraphCxSpLast" style="margin: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;3.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;The web client issues asynchronous Ajax queries tothe dashboard web services to retrieve content. The content is in the form ofXML or JSON data files stored in blob storage. As the data is returned back tothe web client it is rendered as content panels in the dashboard.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Deluxe Edition&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;For deluxe implementations, you will want domain identity orweb identity authentication of your users and deeper integration to yoursystems. For that we will run on Windows Azure Compute and integrate moreformally with internal, partner, or online data sources which might includeyour CRM, data warehouse, and other sources of business intelligence accessed viafeeds or web services. The data can be pulled on-demand from its source systemsin real time, or the data can be periodically pushed up to blob storage as in thelightweight model. For this level of dashboard you will want to combine thedashboard core with a consulting engagement to set up the authentication and integration.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-AMSsKF5qvzs/TreGO4iMN_I/AAAAAAAAB6o/y0WF3HW006Q/s1600/dash-deluxe.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="221" src="http://4.bp.blogspot.com/-AMSsKF5qvzs/TreGO4iMN_I/AAAAAAAAB6o/y0WF3HW006Q/s400/dash-deluxe.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt; text-align: center;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Deluxe Dashboard Model&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;Here’s how access works in the deluxe model:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoListParagraphCxSpFirst" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;1.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;User visits their dashboard URL, an ASP.NET MVC3web server hosted in Windows Azure Compute.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;2.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;User is sent to the designated identity providerto sign in. This could be ADFS, a web identity, or the Windows Azure AccessControl Service.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;3.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Upon successful sign-on, the user’s browser isredirected back to the dashboard web server and the dashboard clientHTMl5/CSS/JavaScript starts running in the user’s browser, which might be on aPC, tablet, or phone.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoListParagraphCxSpLast" style="margin: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;4.&lt;/span&gt;&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;The web client issues asynchronous Ajax queries tothe dashboard web services to retrieve content. That content can come fromquerying enterprise systems, feeds, or web services directly or by returningrecent data snapshots out of blob storage. With either approach, XML or JSONdata is returned back to the web client and rendered as content panels in thedashboard.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;The &lt;/span&gt;&lt;a href="http://neudesic.blob.core.windows.net/dash/fabrikam.html" target="_blank"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;first prototype&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;implements some of the above design goals in the lightweight model, all hostedout of Windows Azure blob storage. More to come!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;Next &lt;a href="http://davidpallmann.blogspot.com/2011/11/html5-windows-azure-dashboard-part-2.html"&gt;Part 2: HTML5 Video&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9132148272745668459-409903547291709459?l=davidpallmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidpallmann.blogspot.com/feeds/409903547291709459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9132148272745668459&amp;postID=409903547291709459' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/409903547291709459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/409903547291709459'/><link rel='alternate' type='text/html' href='http://davidpallmann.blogspot.com/2011/11/html5-windows-azure-dashboard-part-1.html' title='An HTML5-Windows Azure Dashboard, Part 1: Design Decisions'/><author><name>David Pallmann</name><uri>http://www.blogger.com/profile/14482909040736697277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-mPcW-mu5fnI/TWGWz8308CI/AAAAAAAABZc/G7etTBFyHm0/s220/david.pallmann.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-a7QNMqCOQLw/TreEyfdfKbI/AAAAAAAAB6Q/Qul7aK6WInQ/s72-c/fabrikam_ipad.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9132148272745668459.post-5455384653054052298</id><published>2011-10-31T18:30:00.000-07:00</published><updated>2011-11-06T16:51:06.228-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML5'/><category scheme='http://www.blogger.com/atom/ns#' term='Fire'/><title type='text'>Adventures in HTML5: An HTML5 Canvas Ticker</title><content type='html'>For my third experiment in JavaScript, I created a ticker that you could use to scroll stock information, news, or pretty much any textual content that has a label and a value. It looks like this and animates by scrolling to the left in a loop,. You can see a running version &lt;a href="http://dpallmann.blob.core.windows.net/ticker/ticker.htm" target="_blank"&gt; here&lt;/a&gt;. All the source is right there in the page, and there's a full listing at the end of this post as well.&lt;div class="separator" style="clear: both; text-align: center; "&gt;&lt;a href="http://4.bp.blogspot.com/-efmY90fknMI/Tq9Aqkcc9OI/AAAAAAAAB6I/CV-_efxOTw8/s1600/ticker.png" imageanchor="1" style=""&gt;&lt;img border="0" height="22" width="400" src="http://4.bp.blogspot.com/-efmY90fknMI/Tq9Aqkcc9OI/AAAAAAAAB6I/CV-_efxOTw8/s400/ticker.png" /&gt;&lt;/a&gt;&lt;/div&gt;I considered using CSS animation for this, but as it is not supported sufficiently in the widestream browsers yet I decided to go with HTML5 canvas and JavaScript.Let's start by looking at the HTML. In the body, we define a canvas named "tape" within a div container named "ticker". The canvas should be set to twice the width it needs to be for the widest size you expect to run it in--that's because we do some repetition of content in order to smoothly scroll it continuously.&lt;pre class="brush: xml"&gt;&lt;br /&gt;&amp;lt;div id=&amp;quot;ticker&amp;quot; style=&amp;quot;width:1920px&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;canvas id=&amp;quot;tape&amp;quot; width=&amp;quot;4096&amp;quot; height=&amp;quot;40&amp;quot;&amp;gt;Your browser doesn&amp;#39;t support canvas&amp;lt;/canvas&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;/pre&gt;A small amount of JavaScript in the onload event starts the ticker running with data--an array of objects each with a Symbol and Value property.&lt;pre class="brush: xml"&gt;&lt;br /&gt;&amp;lt;body onload=&amp;quot;OnLoad();&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div id=&amp;quot;ticker&amp;quot; style=&amp;quot;width:1920px&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;canvas id=&amp;quot;tape&amp;quot; width=&amp;quot;4096&amp;quot; height=&amp;quot;40&amp;quot;&amp;gt;Your browser doesn&amp;#39;t support canvas&amp;lt;/canvas&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;    function OnLoad() {&lt;br /&gt;        var items = [];&lt;br /&gt;        items.push({ Symbol: &amp;#39;AAA&amp;#39;, Value: &amp;#39;1&amp;#39; });&lt;br /&gt;        items.push({ Symbol: &amp;#39;BBB&amp;#39;, Value: &amp;#39;22&amp;#39; });&lt;br /&gt;        items.push({ Symbol: &amp;#39;CCC&amp;#39;, Value: &amp;#39;3.3&amp;#39; });&lt;br /&gt;        items.push({ Symbol: &amp;#39;DDD&amp;#39;, Value: &amp;#39;44 1/4&amp;#39; });&lt;br /&gt;        items.push({ Symbol: &amp;#39;EEE&amp;#39;, Value: &amp;#39;5,000&amp;#39; });&lt;br /&gt;        items.push({ Symbol: &amp;#39;FFF&amp;#39;, Value: &amp;#39;-66&amp;#39; });&lt;br /&gt;        items.push({ Symbol: &amp;#39;GGG&amp;#39;, Value: &amp;#39;700&amp;#39; });&lt;br /&gt;        items.push({ Symbol: &amp;#39;HHH&amp;#39;, Value: &amp;#39;88&amp;#39; });&lt;br /&gt;        items.push({ Symbol: &amp;#39;III&amp;#39;, Value: &amp;#39;9999&amp;#39; });&lt;br /&gt;        items.push({ Symbol: &amp;#39;JJJ&amp;#39;, Value: &amp;#39;10&amp;#39; });&lt;br /&gt;        Ticker(&amp;quot;ticker&amp;quot;, &amp;quot;tape&amp;quot;, items);&lt;br /&gt;    }&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;/pre&gt;In the JavaScript, there is a Ticker function that starts off the ticker, a MoveTicker function that continues the animation based on a timer, and a TickerState object that maintains housekeeping information for the animation between calls to MoveTicker. &lt;br/&gt;&amp;nbsp;&lt;br/&gt;In Ticker, the first order of business is to write out the symbols and values in the data array that was passed in. This is done, as many times as needed, to fill the canvas for the target width. That allows scrolling that looks smooth, even if the data doesn't fully fit the ticker width, and the animation can be reset back to its starting point without any visual roughage. Ticker's final act is to start a timer to call MoveTicker. The interval affects the scolling speed: 10 is fast, 50 is medium, 100 is slow.&lt;br/&gt;&amp;nbsp;&lt;br/&gt;In MoveTicker, we use CSS to move the ticker left--specifically by decrementing the canvas left margin(which is negative throughout) and counter-adjusting the ticker tape rectangle with CSS clip. This creates the illusion of a ticker rectangle that does not appear to move but has content that does. Once a full set of the data has been slid off the left of the screen, it is reset back to the starting offset. MoveTicker then sets a timer again so it will be called over and over. The result is a gliding ticker tape.&lt;pre class="brush: js"&gt;&lt;br /&gt;    var TickerState = {&lt;br /&gt;        canvas: undefined,&lt;br /&gt;        ctx: undefined,&lt;br /&gt;        tickerX: 0,&lt;br /&gt;        dataWidth: 0,&lt;br /&gt;        interval: 10 /* Fast: 10 Medium: 50 Slow: 100 */&lt;br /&gt;    };&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    function Ticker(divId, canvasId, items) {&lt;br /&gt;&lt;br /&gt;        ticker = document.getElementById(divId);&lt;br /&gt;        maxWidth = parseInt(ticker.style.width);&lt;br /&gt;&lt;br /&gt;        TickerState.canvas = document.getElementById(canvasId);&lt;br /&gt;        TickerState.ctx = TickerState.canvas.getContext(&amp;#39;2d&amp;#39;);&lt;br /&gt;&lt;br /&gt;        TickerState.ctx.font = &amp;quot;20px sans-serif&amp;quot;;&lt;br /&gt;        TickerState.ctx.font = &amp;quot;20px Nova Flat, 20px sans-serif&amp;quot;;&lt;br /&gt;        TickerState.ctx.textAlign = &amp;quot;left&amp;quot;;&lt;br /&gt;&lt;br /&gt;        var x = 10;&lt;br /&gt;        var y = 20;&lt;br /&gt;&lt;br /&gt;        var firstTime = true;&lt;br /&gt;        while (x &amp;lt; maxWidth * 4) {&lt;br /&gt;&lt;br /&gt;            for (var i = 0; i &amp;lt; items.length; i++) {&lt;br /&gt;&lt;br /&gt;                TickerState.ctx.fillStyle = &amp;quot;Blue&amp;quot;;&lt;br /&gt;                TickerState.ctx.fillText(items[i].Symbol, x, y);&lt;br /&gt;                x += TickerState.ctx.measureText(items[i].Symbol).width;&lt;br /&gt;&lt;br /&gt;                TickerState.ctx.fillStyle = &amp;quot;Green&amp;quot;;&lt;br /&gt;                TickerState.ctx.fillText(items[i].Value, x, y + 10);&lt;br /&gt;                x += TickerState.ctx.measureText(items[i].Value).width;&lt;br /&gt;                x += 10 + 6;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            if (firstTime) {&lt;br /&gt;                TickerState.dataWidth = x;&lt;br /&gt;                firstTime = false;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;        setTimeout(MoveTicker, TickerState.interval);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    function MoveTicker() {&lt;br /&gt;&lt;br /&gt;        TickerState.tickerX += 1;&lt;br /&gt;&lt;br /&gt;        if (TickerState.tickerX &amp;gt;= TickerState.dataWidth) {&lt;br /&gt;            TickerState.tickerX = 10;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        TickerState.canvas.style.marginLeft = &amp;quot;-&amp;quot; + TickerState.tickerX.toString() + &amp;quot;px&amp;quot;;&lt;br /&gt;        TickerState.canvas.style.clip = &amp;quot;rect(0px &amp;quot; + (maxWidth + TickerState.tickerX).toString() + &amp;quot;px 40px -&amp;quot; + TickerState.tickerX.toString() + &amp;quot;px)&amp;quot;;&lt;br /&gt;&lt;br /&gt;        setTimeout(MoveTicker, TickerState.interval);&lt;br /&gt;    }&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;/pre&gt;Here's the HTML page in its entirety:&lt;br /&gt;&lt;pre class="brush: xml"&gt;&lt;br /&gt;&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot; &amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;    &amp;lt;title&amp;gt;Ticker&amp;lt;/title&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;http://fonts.googleapis.com/css?family=Nova+Flat&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;style&amp;gt;&lt;br /&gt;&lt;br /&gt;    #ticker {&lt;br /&gt;        font-family: &amp;#39;Nova Flat&amp;#39;, cursive;&lt;br /&gt;        font-size: 20px;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    #tape {&lt;br /&gt;        font-family: &amp;#39;Nova Flat&amp;#39;, cursive;&lt;br /&gt;        font-size: 20px;&lt;br /&gt;        position: absolute; &lt;br /&gt;        clip: rect(0px 2048px 40px 0px); &lt;br /&gt;        vertical-align: top; &lt;br /&gt;        margin-left: 0px; &lt;br /&gt;        background-color: LightYellow;&lt;br /&gt;    }&lt;br /&gt;    &amp;lt;/style&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;&lt;br /&gt;    var TickerState = {&lt;br /&gt;        canvas: undefined,&lt;br /&gt;        ctx: undefined,&lt;br /&gt;        tickerX: 0,&lt;br /&gt;        dataWidth: 0,&lt;br /&gt;        interval: 10 /* Fast: 10 Medium: 50 Slow: 100 */&lt;br /&gt;    };&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    function Ticker(divId, canvasId, items) {&lt;br /&gt;&lt;br /&gt;        ticker = document.getElementById(divId);&lt;br /&gt;        maxWidth = parseInt(ticker.style.width);&lt;br /&gt;&lt;br /&gt;        TickerState.canvas = document.getElementById(canvasId);&lt;br /&gt;        TickerState.ctx = TickerState.canvas.getContext(&amp;#39;2d&amp;#39;);&lt;br /&gt;&lt;br /&gt;        TickerState.ctx.font = &amp;quot;20px sans-serif&amp;quot;;&lt;br /&gt;        TickerState.ctx.font = &amp;quot;20px Nova Flat, 20px sans-serif&amp;quot;;&lt;br /&gt;        TickerState.ctx.textAlign = &amp;quot;left&amp;quot;;&lt;br /&gt;&lt;br /&gt;        var x = 10;&lt;br /&gt;        var y = 20;&lt;br /&gt;&lt;br /&gt;        var firstTime = true;&lt;br /&gt;        while (x &amp;lt; maxWidth * 4) {&lt;br /&gt;&lt;br /&gt;            for (var i = 0; i &amp;lt; items.length; i++) {&lt;br /&gt;&lt;br /&gt;                TickerState.ctx.fillStyle = &amp;quot;Blue&amp;quot;;&lt;br /&gt;                TickerState.ctx.fillText(items[i].Symbol, x, y);&lt;br /&gt;                x += TickerState.ctx.measureText(items[i].Symbol).width;&lt;br /&gt;&lt;br /&gt;                TickerState.ctx.fillStyle = &amp;quot;Green&amp;quot;;&lt;br /&gt;                TickerState.ctx.fillText(items[i].Value, x, y + 10);&lt;br /&gt;                x += TickerState.ctx.measureText(items[i].Value).width;&lt;br /&gt;                x += 10 + 6;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            if (firstTime) {&lt;br /&gt;                TickerState.dataWidth = x;&lt;br /&gt;                firstTime = false;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;        setTimeout(MoveTicker, TickerState.interval);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    function MoveTicker() {&lt;br /&gt;&lt;br /&gt;        TickerState.tickerX += 1;&lt;br /&gt;&lt;br /&gt;        if (TickerState.tickerX &amp;gt;= TickerState.dataWidth) {&lt;br /&gt;            TickerState.tickerX = 10;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        TickerState.canvas.style.marginLeft = &amp;quot;-&amp;quot; + TickerState.tickerX.toString() + &amp;quot;px&amp;quot;;&lt;br /&gt;        TickerState.canvas.style.clip = &amp;quot;rect(0px &amp;quot; + (maxWidth + TickerState.tickerX).toString() + &amp;quot;px 40px -&amp;quot; + TickerState.tickerX.toString() + &amp;quot;px)&amp;quot;;&lt;br /&gt;&lt;br /&gt;        setTimeout(MoveTicker, TickerState.interval);&lt;br /&gt;    }&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body onload=&amp;quot;OnLoad();&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div id=&amp;quot;ticker&amp;quot; style=&amp;quot;width:1920px&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;canvas id=&amp;quot;tape&amp;quot; width=&amp;quot;4096&amp;quot; height=&amp;quot;40&amp;quot;&amp;gt;Your browser doesn&amp;#39;t support canvas&amp;lt;/canvas&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;amp;nbsp;&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;amp;nbsp;&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;amp;nbsp;&amp;lt;br /&amp;gt;&lt;br /&gt;Hello&lt;br /&gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;&lt;br /&gt;    var loaded = false;&lt;br /&gt;&lt;br /&gt;    function OnLoad() {&lt;br /&gt;        loaded = true;&lt;br /&gt;        var items = [];&lt;br /&gt;        items.push({ Symbol: &amp;#39;AAA&amp;#39;, Value: &amp;#39;1&amp;#39; });&lt;br /&gt;        items.push({ Symbol: &amp;#39;BBB&amp;#39;, Value: &amp;#39;22&amp;#39; });&lt;br /&gt;        items.push({ Symbol: &amp;#39;CCC&amp;#39;, Value: &amp;#39;3.3&amp;#39; });&lt;br /&gt;        items.push({ Symbol: &amp;#39;DDD&amp;#39;, Value: &amp;#39;44 1/4&amp;#39; });&lt;br /&gt;        items.push({ Symbol: &amp;#39;EEE&amp;#39;, Value: &amp;#39;5,000&amp;#39; });&lt;br /&gt;        items.push({ Symbol: &amp;#39;FFF&amp;#39;, Value: &amp;#39;-66&amp;#39; });&lt;br /&gt;        items.push({ Symbol: &amp;#39;GGG&amp;#39;, Value: &amp;#39;700&amp;#39; });&lt;br /&gt;        items.push({ Symbol: &amp;#39;HHH&amp;#39;, Value: &amp;#39;88&amp;#39; });&lt;br /&gt;        items.push({ Symbol: &amp;#39;III&amp;#39;, Value: &amp;#39;9999&amp;#39; });&lt;br /&gt;        items.push({ Symbol: &amp;#39;JJJ&amp;#39;, Value: &amp;#39;10&amp;#39; });&lt;br /&gt;        Ticker(&amp;quot;ticker&amp;quot;, &amp;quot;tape&amp;quot;, items);&lt;br /&gt;    }&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9132148272745668459-5455384653054052298?l=davidpallmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidpallmann.blogspot.com/feeds/5455384653054052298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9132148272745668459&amp;postID=5455384653054052298' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/5455384653054052298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/5455384653054052298'/><link rel='alternate' type='text/html' href='http://davidpallmann.blogspot.com/2011/10/adventures-in-html5-html5-canvas-ticker.html' title='Adventures in HTML5: An HTML5 Canvas Ticker'/><author><name>David Pallmann</name><uri>http://www.blogger.com/profile/14482909040736697277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-mPcW-mu5fnI/TWGWz8308CI/AAAAAAAABZc/G7etTBFyHm0/s220/david.pallmann.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-efmY90fknMI/Tq9Aqkcc9OI/AAAAAAAAB6I/CV-_efxOTw8/s72-c/ticker.png' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9132148272745668459.post-8703745495950378820</id><published>2011-10-24T06:50:00.000-07:00</published><updated>2011-10-24T07:02:40.708-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML5'/><category scheme='http://www.blogger.com/atom/ns#' term='Canvas'/><category scheme='http://www.blogger.com/atom/ns#' term='Fire'/><title type='text'>Adventures in HTML5: Bouncy Bar Chart</title><content type='html'>Today I'm sharing a bar chart I&amp;nbsp;recently built in JavaScript using HTML5 canvas. You can see a demo here (&lt;a href="http://preview.tinyurl.com/html5barchart" target="_blank"&gt;simple bar chart&lt;/a&gt;, &lt;a href="http://tinyurl.com/html5barchart2" target="_blank"&gt;multiple bar charts&lt;/a&gt;) and download the code &lt;a href="http://dpallmann.blob.core.windows.net/barchart/barchart.zip" target="_blank"&gt;here&lt;/a&gt;. Below I walk through the steps I went through to create this.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-FkxbuczPH-s/TqVUmNEStdI/AAAAAAAABzg/lNpxxhxP0pk/s1600/html5barchart1.png" imageanchor="1"&gt;&lt;img border="0" height="258" src="http://2.bp.blogspot.com/-FkxbuczPH-s/TqVUmNEStdI/AAAAAAAABzg/lNpxxhxP0pk/s400/html5barchart1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I'm learning JavaScript right now, and I recently shared my first JavaScript program of any consequence, a &lt;a href="http://davidpallmann.blogspot.com/2011/10/adventures-in-html5-javascript-doomsday.html"&gt;doomsday counter&lt;/a&gt;.&amp;nbsp;This is my&amp;nbsp;second JavaScript program. I time-boxed this experiment to one day (and spent a few additional hours afterward making the code pretty for this post).I was pleasantly surprised to see how much I was able to accomplish in one day. As I get more comfortable with JavaScript, I'm starting to look past the rough edge in the language and appreciate its good points. I'm sure my code technique still reflects a beginner, but as I learn more from &lt;a href="http://www.pluralsight-training.net/microsoft/"&gt;Pluralsight courses&lt;/a&gt; and books like &lt;a href="http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742"&gt;JavaScript: The Good Parts&lt;/a&gt; and use tools like &lt;a href="http://www.jslint.com/"&gt;jslint&lt;/a&gt; I'm getting there.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Inspiration: Jelly Charts&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;My inspiration for this bar chart control is a very cool online chart demo done in Silverlight&amp;nbsp;I found a few years back called &lt;a href="http://joestegman.members.winisp.net/jelly/bar.htm"&gt;RichardZ's Jelly Charts&lt;/a&gt;. They are remarkable--highly animated and responsive, they&amp;nbsp;render on the screen with a bouncy, cascading effect that is mesmerizing and addictive. Unfortunately as far as I cacn determine no source or binaries or available, but now that I'm going deep on HTML5 this provided an opportunity to create something similar. So that was my mission, to essentially match Jelly Bar in HTML5 canvas and JavaScript.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-YyWb4SfGj7Q/TqVQpLfceyI/AAAAAAAABzQ/lVL4VOlyHeQ/s1600/jellybar.png" imageanchor="1"&gt;&lt;img border="0" height="367" src="http://4.bp.blogspot.com/-YyWb4SfGj7Q/TqVQpLfceyI/AAAAAAAABzQ/lVL4VOlyHeQ/s400/jellybar.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Step 1: Basic Canvas Drawing&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The first thing I needed to do was get acquainted with HTML5 canvas and basic operations like drawing a line or a rectangle. The HTML5 canvas feature allows you to declare one or more elements in your HTML page, which JavaScript can then render graphics to using methods like fillRect to draw a rectangle. A good introduction to the basics of canvas and other HTML5 features can be found on &lt;a href="http://www.w3schools.com/html5/html5_canvas.asp"&gt;w3schools.com&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-_B-OlPRxiMc/TqVb42HbxqI/AAAAAAAABzo/iEsqJDpCIOE/s1600/barchart_1canvas.png" imageanchor="1"&gt;&lt;img border="0" height="26" src="http://2.bp.blogspot.com/-_B-OlPRxiMc/TqVb42HbxqI/AAAAAAAABzo/iEsqJDpCIOE/s400/barchart_1canvas.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-OvFud2t7CoM/TqVb9WBTgCI/AAAAAAAABz0/lO03-8DItFg/s1600/barchart_1canvas_b.png" imageanchor="1"&gt;&lt;img border="0" height="96" src="http://4.bp.blogspot.com/-OvFud2t7CoM/TqVb9WBTgCI/AAAAAAAABz0/lO03-8DItFg/s400/barchart_1canvas_b.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Step 2: Calculations and Drawing&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;With some basic canvas skills it was time to write the code to do the math and draw it. Plotting axis lines, tick marks, and bars. Straightforward, but a lot of work to allow the caller flexibility of canvas size and range of values.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-j6BtRvKan04/TqVcc_jMHzI/AAAAAAAAB0A/0uQ2V6bYZTM/s1600/barchart_2tickmarkcode.png" imageanchor="1"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-j6BtRvKan04/TqVcc_jMHzI/AAAAAAAAB0A/0uQ2V6bYZTM/s400/barchart_2tickmarkcode.png" width="369" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Step 3: Gradients &amp;amp; Text on Canvas&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;As I got the basic elements drawn it was time to master more subtleties including gradient colors and text on canvas and font control. It was easy enough to find online examples of what I needed, though in the back of my head I was wondering if I shouldn't be leveraging CSS for some of this--I need to learn more about whether&amp;nbsp;there is a way to apply CSS to canvas elements. For now, it's done in the JavaScript--but the ultimate result does allow the caller to control things like colors and fonts. I also added ability to specify a chart title, column titles for the X-axis, and value labels for the bars.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-cqCL8LXUbT0/TqVdftJEZHI/AAAAAAAAB0M/Veqf0O-81cY/s1600/html5barchart1.png" imageanchor="1"&gt;&lt;img border="0" height="258" src="http://2.bp.blogspot.com/-cqCL8LXUbT0/TqVdftJEZHI/AAAAAAAAB0M/Veqf0O-81cY/s400/html5barchart1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Step 4: Dynamic Resizing&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;A chart control isn't much use unless the caller can control its size as well as the web user being able to resize their browser window. Although my work so far had not made any assumptions about canvas size or value ranges, more code would be needed to dynamically redraw the chart if the browser window was resized. I found I could use code like this in my HTML page to resize the canvas in response to a browser resize. Although this sort of worked, the browser would sometimes add scroll bars; to counter this I ended up reloading the page on resize and then dynamically sizing the canvas and drawing the chart. Not ideal, but it does work.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-xK7p3PEaAI8/TqVnvt7vT4I/AAAAAAAAB2E/EGTc13cIg4s/s1600/barchart_4resizea.png" imageanchor="1" style=""&gt;&lt;img border="0" height="228" width="400" src="http://1.bp.blogspot.com/-xK7p3PEaAI8/TqVnvt7vT4I/AAAAAAAAB2E/EGTc13cIg4s/s400/barchart_4resizea.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-4It3ZBy9AS0/TqVnZxsvl9I/AAAAAAAAB14/TTss89IyNRg/s1600/barchart_4resizeb.png" imageanchor="1" style=""&gt;&lt;img border="0" height="125" width="400" src="http://2.bp.blogspot.com/-4It3ZBy9AS0/TqVnZxsvl9I/AAAAAAAAB14/TTss89IyNRg/s400/barchart_4resizeb.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-brdrE8DqqFo/TqVmm0A91fI/AAAAAAAAB1g/QSvs8NCV6Q4/s1600/barchart_4resize.png" imageanchor="1" style=""&gt;&lt;img border="0" height="222" width="400" src="http://4.bp.blogspot.com/-brdrE8DqqFo/TqVmm0A91fI/AAAAAAAAB1g/QSvs8NCV6Q4/s400/barchart_4resize.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Step 5: Fluid Bar Animation&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;One of the most attractive things about the Jelly Charts are their animation. The Jelly Bar has a vertical bounce effect where the bar is drawn up, higher than its resting height, and then bounces down into position. It also draws the bars left to right with a slight delay so that there is a cascading effect horizontally. While I didn't quite equal this effect in my one-day experiment, I was able to approximate it. I used a timer to draw the bar up to an&amp;nbsp;exagerrated height, and then to lower it to its correct height.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-hxOOeuD46OQ/TqVozEoyJbI/AAAAAAAAB2Q/pEOnlM1tcnQ/s1600/barchart_5fluid_a.png" imageanchor="1" style=""&gt;&lt;img border="0" height="400" width="238" src="http://2.bp.blogspot.com/-hxOOeuD46OQ/TqVozEoyJbI/AAAAAAAAB2Q/pEOnlM1tcnQ/s400/barchart_5fluid_a.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-0JNEXc08OcQ/TqVo3jL1TVI/AAAAAAAAB2c/xWeIe0GOy1M/s1600/barchart_5fluid_b.png" imageanchor="1" style=""&gt;&lt;img border="0" height="309" width="400" src="http://3.bp.blogspot.com/-0JNEXc08OcQ/TqVo3jL1TVI/AAAAAAAAB2c/xWeIe0GOy1M/s400/barchart_5fluid_b.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-5Sp0s3mfaaU/TqVo7wPLjKI/AAAAAAAAB2o/I9VIxZ5RXiE/s1600/barchart_5fluid_c.png" imageanchor="1" style=""&gt;&lt;img border="0" height="400" width="310" src="http://2.bp.blogspot.com/-5Sp0s3mfaaU/TqVo7wPLjKI/AAAAAAAAB2o/I9VIxZ5RXiE/s400/barchart_5fluid_c.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Step 6: Object Parameters &amp;amp; Multiple Charts&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;In my initial prototyping I just had a sea of global and local variables; to make the chart something useful it would need to be tidied up so that it could be easily called, controlled by the caller, and allow for multiple charts. Using JavaScript objects took care of that problem. The caller registers a chart by calling BarChart(chart) in the JavaScript library, where chart is a Chart object that includes the canvas Id to render the chart to. Charts tend to have a lot of parameters, so intelligent defaulting of chart values was an important part of this work.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-A6XS1jcE4dg/TqVpqNqbFZI/AAAAAAAAB20/Uvm-Rr3dht0/s1600/barchart_6multiple.png" imageanchor="1" style=""&gt;&lt;img border="0" height="270" width="400" src="http://3.bp.blogspot.com/-A6XS1jcE4dg/TqVpqNqbFZI/AAAAAAAAB20/Uvm-Rr3dht0/s400/barchart_6multiple.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Step 7: Multiple Series and Customization&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;If we're supporting mutliple charts, we might as well support multiple series within a bar chart too. Now Chart.bars is an array of series, where each series is an array of bar objects. I also added customization of colors, and the ability to have a transparent background in case you wanted an iamge or some other background controlled by the HTML/CSS (&lt;a href="http://tinyurl.com/html5barchart2" target="_blank"&gt;2-chart demo&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-x5sgus7KVxg/TqVq_FhUx1I/AAAAAAAAB3A/YHOtMyPGw6g/s1600/barchart_7multipleseries.png" imageanchor="1" style=""&gt;&lt;img border="0" height="269" width="400" src="http://4.bp.blogspot.com/-x5sgus7KVxg/TqVq_FhUx1I/AAAAAAAAB3A/YHOtMyPGw6g/s400/barchart_7multipleseries.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Step 8: Hover &amp;amp; Highlighting&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The Jelly Bar allows you to hover over a bar and highlight it in a different color, and I also wanted to create this behavior in my edition. This gave me an opportunity to learn about mouse events. I added a mousemove event listener for the canvas of each registered chart, and also maintain a "hit list" of rendered bars. In response to a mouse move, I scan the mouse coordinates against the hit list to see if the mouse is over a bar. If we have moved over a bar (or off a bar we were previously over), the bar is either highlighted in a different color or restored respectively.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-T63UYl3HdH8/TqVsBEvuMHI/AAAAAAAAB3M/HUWDvPk4kl8/s1600/barchart_8hover.png" imageanchor="1" style=""&gt;&lt;img border="0" height="269" width="400" src="http://2.bp.blogspot.com/-T63UYl3HdH8/TqVsBEvuMHI/AAAAAAAAB3M/HUWDvPk4kl8/s400/barchart_8hover.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Well, there we are--not bad for a day's work. It seems to work well across mainstream browsers as well as tablets and phones though I can see I need to do some thinking about adjusting the rendering animation speed for various devices and display sizes. I had fun doing this and am finding a promising increase in velocity as I continue to work on my mastery of JavaScript and all things HTML5. Links to the code and demos are at top.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9132148272745668459-8703745495950378820?l=davidpallmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidpallmann.blogspot.com/feeds/8703745495950378820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9132148272745668459&amp;postID=8703745495950378820' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/8703745495950378820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/8703745495950378820'/><link rel='alternate' type='text/html' href='http://davidpallmann.blogspot.com/2011/10/adventures-in-html5-bouncy-bar-chart.html' title='Adventures in HTML5: Bouncy Bar Chart'/><author><name>David Pallmann</name><uri>http://www.blogger.com/profile/14482909040736697277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-mPcW-mu5fnI/TWGWz8308CI/AAAAAAAABZc/G7etTBFyHm0/s220/david.pallmann.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-FkxbuczPH-s/TqVUmNEStdI/AAAAAAAABzg/lNpxxhxP0pk/s72-c/html5barchart1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9132148272745668459.post-2255345210191133369</id><published>2011-10-16T20:34:00.000-07:00</published><updated>2011-10-17T00:59:06.917-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cloud Gourmet'/><category scheme='http://www.blogger.com/atom/ns#' term='Ice'/><category scheme='http://www.blogger.com/atom/ns#' term='Azure'/><category scheme='http://www.blogger.com/atom/ns#' term='30 Minute Cloud'/><title type='text'>The Cloud Gourmet 30-Minute Meal: Simple Database Migration to SQL Azure</title><content type='html'>&lt;div class="separator" style="clear: both; float: left; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-qfoS-09b3X8/Tpt-eZdU14I/AAAAAAAABuQ/BfyGIRkHfHc/s1600/cloudgourmetwhite30min.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-qfoS-09b3X8/Tpt-eZdU14I/AAAAAAAABuQ/BfyGIRkHfHc/s320/cloudgourmetwhite30min.png" width="250" /&gt;&lt;/a&gt;&lt;/div&gt;Bonjour and welcome again to &lt;a href="http://davidpallmann.blogspot.com/2011/10/cloud-gourmet-cooking-with-windows.html "&gt;The Cloud Gourmet&lt;/a&gt; with &lt;i&gt;Chef Az-ure-D&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;Today we have another “30 minute meal” recipe for Windows Azure. This time we will move a simple database into the cloud. For databases that meet our criteria, this is a “piece of cake”.&lt;br /&gt;&lt;br /&gt;I must emphasize we are talking about &lt;i&gt;simple&lt;/i&gt; databases: large or complex databases will certainly take more than 30 minutes; some take weeks! Below we are specific about the criteria for an easy migration.&lt;br /&gt;&lt;br /&gt;Of course we often think of a database as just one tier of a complete solution, but this is not always the case. Sometimes a database on its own is a valued asset, such as reference data that many consume for different reasons. Even if you do need to migrate a complete solution, this recipe can be of use, because it is often the best approach to migrate the data first and then the application code.&lt;br /&gt;&lt;br /&gt;To illustrate the steps of the migration, we will use the AdventureWorksLT database from Microsoft. If you wish to practice using the same data, you can obtain it &lt;a href="http://msftdbprodsamples.codeplex.com/wikipage?title=AWLTDocs" target="_blank"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/-CikQkY18riA/TpuVOWzbqPI/AAAAAAAABzE/zRl7lDtNGZM/s1600/cg3_5e2.png" imageanchor="1" style=""&gt;&lt;img border="0" height="320" width="400" src="http://2.bp.blogspot.com/-CikQkY18riA/TpuVOWzbqPI/AAAAAAAABzE/zRl7lDtNGZM/s400/cg3_5e2.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: x-large;"&gt;Recipe: Migrating a Simple SQL Server Database to SQL Azure in 30 Minutes&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Databases on the Windows Azure platform are hosted by the SQL Azure Database service, available in sizes from 1-50GB at a cost of $9.99/GB/month plus bandwidth charges. SQL Azure is very similar to SQL Server and uses the same protocol (TDS) and programming model. You can work with SQL Azure databases using both the familiar SQL Server Management Studio tool (2008 R2 edition) and the SQL Azure section of the &lt;a href="http://windows.azure.com/" target="_blank"&gt;Windows Azure Management Portal&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Plan&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;An excellent tool for migrating SQL Server databases to SQL Azure is the &lt;a href="http://sqlazuremw.codeplex.com/" target="_blank"&gt;SQL Azure Migration Wizard&lt;/a&gt;. We will use this tool to analyze, revise, and migrate the schema and data from an on-premise database to a cloud database. Nothing we will do will modify the source database in any way.&lt;br /&gt;&lt;br /&gt;There are 5 steps we will perform:&lt;br /&gt;&lt;br /&gt;1. Create a SQL Azure Database Server&lt;br /&gt;2. Create a SQL Azure Database&lt;br /&gt;3. Migrate the Database &lt;br /&gt;4. Review SQL Azure Database in SSMS&lt;br /&gt;5. Review SQL Azure Database in Portal&lt;br /&gt;&lt;br /&gt;Databases come in all sizes and complexities. The majority of the world’s databases are small in size and simple in nature. Database products come in all sizes and complexities too. Check that you meet the criteria below before using this recipe. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Criteria&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Migrations to SQL Azure are smoothest and fastest when the following are true:&lt;br /&gt;&lt;br /&gt;• &lt;strong&gt;SQL Server Database&lt;/strong&gt;. Your starting point database should be in SQL Server or SQL Server Express, preferably a recent version like 2008 or 2008 R2. If this is not the case, you can expect a longer migration time and you may have to work through feature differences. If you are migrating from a different database product or a very old version of SQL Server, it is recommended you “stage” your migration by moving your database over to SQL Server 2008 R2 first, and then up into the cloud on SQL Azure. &lt;br /&gt;• &lt;strong&gt;Small Database&lt;/strong&gt;. Database size matters in migrations for several reasons. First of all, there is an upper size limit for a SQL Azure Database (currently 50GB); if your database is larger, then you will need to partition into multiple databases. Second, large data takes a long time to transmit (days perhaps) and you are more likely to be encountering occasional communication failures during upload. If you measure your database size in megabytes, this 30-minute recipe is for you. If you are dealing with gigabytes of data, you can still use this recipe but expect to spend one or more days migrating and you may want to employ the services of an expert.&lt;br /&gt;• &lt;strong&gt;Simple Database&lt;/strong&gt;. A simple database is one that is mostly about the data. Complex databases are those that depend on database server features which may extend the migration time or pose barriers to migration. Use of features like constraints, granular security, or stored procedures are often fine but can sometimes pose complications. Features like Windows authentication, SQL Agent jobs, replication, full text search, XML indexing, distributed transactions, and transparent data encryption are not available yet in SQL Azure.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Ingredients:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1&amp;nbsp;&amp;nbsp;SQL Server database meeting the above criteria&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;You Will Need:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;• A Windows Azure subscription&lt;br /&gt;• The &lt;a href="http://sqlazuremw.codeplex.com/" target="_blank"&gt;SQL Azure Migration Wizard&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Directions&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 1: Create a SQL Azure Database Server&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In this step you will create a SQL Azure &lt;i&gt;database server&lt;/i&gt; using the Windows Azure management portal.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Note: if you have already created a SQL Azure database server, proceed to Step 2.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;1A. In a large bowl.. .er, I mean In a web browser, go to the &lt;a href="http://windows.azure.com" target="_blank"&gt;Windows Azure portal&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;1B. Navigate to the Database category on the lower left.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-0xVmiThn4Hk/Tpt7IOzYg4I/AAAAAAAABtQ/bX44D-Mq7JA/s1600/cg3_1b.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-0xVmiThn4Hk/Tpt7IOzYg4I/AAAAAAAABtQ/bX44D-Mq7JA/s1600/cg3_1b.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://4.bp.blogspot.com/-0xVmiThn4Hk/Tpt7IOzYg4I/AAAAAAAABtQ/bX44D-Mq7JA/s1600/cg3_1b.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/-0xVmiThn4Hk/Tpt7IOzYg4I/AAAAAAAABtQ/bX44D-Mq7JA/s1600/cg3_1b.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/-0xVmiThn4Hk/Tpt7IOzYg4I/AAAAAAAABtQ/bX44D-Mq7JA/s1600/cg3_1b.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/-0xVmiThn4Hk/Tpt7IOzYg4I/AAAAAAAABtQ/bX44D-Mq7JA/s1600/cg3_1b.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;div style="text-align: left;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/a&gt;&lt;div style="text-align: left;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-tQyyr-Dhvc4/Tpt7khThHKI/AAAAAAAABtY/Pt54l7MVIms/s1600/cg3_1c.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;1C. Select a subscription on the upper left.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-tQyyr-Dhvc4/Tpt7khThHKI/AAAAAAAABtY/Pt54l7MVIms/s1600/cg3_1c.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-tQyyr-Dhvc4/Tpt7khThHKI/AAAAAAAABtY/Pt54l7MVIms/s1600/cg3_1c.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://1.bp.blogspot.com/-tQyyr-Dhvc4/Tpt7khThHKI/AAAAAAAABtY/Pt54l7MVIms/s1600/cg3_1c.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/-tQyyr-Dhvc4/Tpt7khThHKI/AAAAAAAABtY/Pt54l7MVIms/s1600/cg3_1c.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/-tQyyr-Dhvc4/Tpt7khThHKI/AAAAAAAABtY/Pt54l7MVIms/s1600/cg3_1c.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;div style="text-align: left;"&gt;&lt;/div&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;1D. Click the Create button in the Server toolbar. A dialog appears.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/-ZLTHEea3V1A/Tpt7r0riYHI/AAAAAAAABtg/PnK99oW5IaI/s1600/cg3_1d.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="69" src="http://2.bp.blogspot.com/-ZLTHEea3V1A/Tpt7r0riYHI/AAAAAAAABtg/PnK99oW5IaI/s320/cg3_1d.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;1E. Specify the data center locale where you want to create your database server and click Next.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-x6qVUUPNHuU/Tpt735mFgGI/AAAAAAAABto/8j92L1IYFrI/s1600/cg3_1e1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="269" src="http://1.bp.blogspot.com/-x6qVUUPNHuU/Tpt735mFgGI/AAAAAAAABto/8j92L1IYFrI/s320/cg3_1e1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;br /&gt;1F. Now specify a name you would like to use for an Administrator, along with a strong password. Record the administrator name and password for safekeeping. Again click Next.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Note: it’s possible to change the password in the future, but not the admin name.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-OM0q_nvnZF0/TpuCs9KasdI/AAAAAAAABuY/clcavtN8T7s/s1600/cg3_1f.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="272" src="http://3.bp.blogspot.com/-OM0q_nvnZF0/TpuCs9KasdI/AAAAAAAABuY/clcavtN8T7s/s320/cg3_1f.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;1G. Finally, you will be prompted to set firewall rules. In order to access the database we will need to add a firewall rule.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;A. Check the &lt;i&gt;Allow other Windows Azure services to access this server&lt;/i&gt; checkbox.&lt;br /&gt;&amp;nbsp;&amp;nbsp;B.Click Add.&lt;br /&gt;&amp;nbsp;&amp;nbsp;C. Enter a rule name.&lt;br /&gt;&amp;nbsp;&amp;nbsp;D. Enter a starting and ending IP address. You can either specify your own IP (shown in the dialog), or some other range. If you want to allow access for all, you can specify 0.0.0.0 through 255.255.255.255.&lt;br /&gt;&amp;nbsp;&amp;nbsp;E. Click OK and Finish to close the dialogs.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-IPmVK4gD_bY/Tpt9CoVg7AI/AAAAAAAABt4/MiSnMPq28JM/s1600/cg3_1g1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="271" src="http://4.bp.blogspot.com/-IPmVK4gD_bY/Tpt9CoVg7AI/AAAAAAAABt4/MiSnMPq28JM/s320/cg3_1g1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-zoZXP_gWXjg/Tpt9Hh0y1CI/AAAAAAAABuA/1GpySHODnCg/s1600/cg3_1g2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="270" src="http://3.bp.blogspot.com/-zoZXP_gWXjg/Tpt9Hh0y1CI/AAAAAAAABuA/1GpySHODnCg/s320/cg3_1g2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;1H. A database server will soon appear in the main area of the Windows Azure portal. You will need to capture the server name, which is auto-generated and cryptic. In our example, it is &lt;b&gt;b7e77waic7&lt;/b&gt;. Your name will be different.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-WMJB7-fdx4I/TpuGWc9hBiI/AAAAAAAABuk/2BnYcnioGzE/s1600/cg3_1h.png" imageanchor="1"&gt;&lt;img border="0" height="190" src="http://4.bp.blogspot.com/-WMJB7-fdx4I/TpuGWc9hBiI/AAAAAAAABuk/2BnYcnioGzE/s400/cg3_1h.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;So far we have created a database server (It is actually multiple servers, but this single virtual server name fits the SQL Server connection string model). The next step will be to create a database on that server.&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;b&gt;Step 2: Create a SQL Azure Database&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In this step you will create a database on the database server you created in Step 1.&lt;br /&gt;&lt;br /&gt;2A. In the Windows Azure portal, select your database server.&lt;br /&gt;&lt;br /&gt;2B. Click the Create button in the Database toolbar. A dialog appears.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/-b0F3HABXvr4/TpuGvm_OfMI/AAAAAAAABuw/p7jVJBRqviE/s1600/cg3_2b.png" imageanchor="1" style="clear: left; float: none text-align: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="84" src="http://2.bp.blogspot.com/-b0F3HABXvr4/TpuGvm_OfMI/AAAAAAAABuw/p7jVJBRqviE/s400/cg3_2b.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;2C. Specify (and record) a name for your database, and select an edition/size sufficient for your database. The Web edition offers 1/5GB sizes and the Business edition 10/20/30/40/50GB. Then click OK.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/-H_Nv7CexKKg/TpuG9iP-4vI/AAAAAAAABu8/5CZOYcq-HyM/s1600/cg3_2c.png" imageanchor="1" style="clear: left; float: none; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="216" src="http://2.bp.blogspot.com/-H_Nv7CexKKg/TpuG9iP-4vI/AAAAAAAABu8/5CZOYcq-HyM/s400/cg3_2c.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;2D. Verify the database was created by finding it and selecting it in the outline at upper left. Notice that in addition to your database the database server also contains a master database.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/-13LwbALmKRg/TpuHLBWwDFI/AAAAAAAABvI/sjvkDJhhNi4/s1600/cg3_2d.png" imageanchor="1" style="clear: left; float: none; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="112" src="http://2.bp.blogspot.com/-13LwbALmKRg/TpuHLBWwDFI/AAAAAAAABvI/sjvkDJhhNi4/s400/cg3_2d.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now that we have created our cloud database, we can begin the migration.&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;b&gt;Step 3: Migrate the Database&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In this step you will use the SQL Azure Migration Wizard to migrate your SQL Server database to the SQL Azure database created in Step 2. &lt;br /&gt;&lt;br /&gt;3A. Launch the SQL Azure Migration Wizard and select the &lt;i&gt;Analyze and Migrate / SQL Database&lt;/i&gt; option. Then click Next.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-SCfIZ5uogDY/TpuHZXu8WzI/AAAAAAAABvU/tR0JyuxipmI/s1600/cg3_3a.png" imageanchor="1" style="clear: left; float: none; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="308" src="http://3.bp.blogspot.com/-SCfIZ5uogDY/TpuHZXu8WzI/AAAAAAAABvU/tR0JyuxipmI/s400/cg3_3a.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;3B. In the Connect to Server dialog that appears, specify your source database server and authentication credentials as described below. Then click Connect.&lt;br /&gt;&lt;br /&gt;• &lt;b&gt;Server name&lt;/b&gt;: Here you must specify server-name or server-name\instance-name. If you are running full SQL Server on your local machine and using the default SQL Server instance, just  leave the setting to its default of &lt;b&gt;localhost&lt;/b&gt;. If you are running SQL Server Express on your local machine, you are most likely using the &lt;b&gt;.\SQLEXPRESS&lt;/b&gt; instance.&lt;br /&gt;• &lt;b&gt;Authentication&lt;/b&gt;: Your source database may be set up for Windows authentication or SQL authentication. Select the appropriate option. For SQL authentication, also enter your username and password credentials.&lt;br /&gt;• &lt;b&gt;Database&lt;/b&gt;. Leave this at its default value of &lt;i&gt;Master DB&lt;/i&gt;. This will cause the databases to be listed for you on the next screen.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-iOCtQQtzxvU/TpuHotpbjUI/AAAAAAAABvg/wnWyfuSHSPU/s1600/cg3_3b.png" imageanchor="1" style="clear: left; float: none; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-iOCtQQtzxvU/TpuHotpbjUI/AAAAAAAABvg/wnWyfuSHSPU/s400/cg3_3b.png" width="341" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;3C. On the next screen (Select Source), select your database and click Next.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-M1YGTaiKppk/TpuHyVXhJUI/AAAAAAAABvs/UQx_U9JYgrk/s1600/cg3_3c.png" imageanchor="1" style="clear: left; float: none; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="115" src="http://4.bp.blogspot.com/-M1YGTaiKppk/TpuHyVXhJUI/AAAAAAAABvs/UQx_U9JYgrk/s400/cg3_3c.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;3D. On the Choose Objects dialog, leave the default of &lt;i&gt;Script all database objects&lt;/i&gt; and click Next.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-qHs9HhKgEVw/TpuH88OsiEI/AAAAAAAABv4/HS8ad_fLvDk/s1600/cg3_3d.png" imageanchor="1" style="clear: left; float: none; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="217" src="http://1.bp.blogspot.com/-qHs9HhKgEVw/TpuH88OsiEI/AAAAAAAABv4/HS8ad_fLvDk/s400/cg3_3d.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;3E. On the &lt;i&gt;Script Wizard Summary&lt;/i&gt; dialog, make no changes and click Next. When prompted &lt;i&gt;Ready to generate SQL script?&lt;/i&gt;, click Yes.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; float: none; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-cOpnW9HQ5Vs/TpuIGhgYC4I/AAAAAAAABwE/2zXvs0rMmLI/s1600/cg3_3e.png" imageanchor="1" style="clear: left; float: none; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="171" src="http://4.bp.blogspot.com/-cOpnW9HQ5Vs/TpuIGhgYC4I/AAAAAAAABwE/2zXvs0rMmLI/s400/cg3_3e.png" width="275" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;3F. When the Results Summary dialog appears, review the report content fully to see if there are any problems. You may also use the Save button to save a copy of the report.&lt;br /&gt;&lt;br /&gt;In the case of the AdventureworksLT sample database we are using to illustrate this recipe, there is a problem noted in the report for the ProductionDescriptionsSchemaCollection table: &lt;i&gt;XML Schema Collections are currently not supported in SQL Azure&lt;/i&gt;. This means our source database is using an unsupported feature in this one table. In our case we are unconcerned and decide to proceed without that one table. If you encounter errors, you will need to evaluate how serious they are and what action you should take about them. Note that it is possible in Step 3D earlier to specify which database objects are and are not included in the migration.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-cYcbX1ams_8/TpuISnwwhoI/AAAAAAAABwQ/wHDC2AYy3X8/s1600/cg3_3f.png" imageanchor="1" style="clear: left; float: none; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-cYcbX1ams_8/TpuISnwwhoI/AAAAAAAABwQ/wHDC2AYy3X8/s400/cg3_3f.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;3G. If you have chosen after reading the report to proceed with the migration, click Next. A Connect to Server dialog appears. Otherwise click Exit and you will need to work on resolving your issues.&lt;br /&gt;&lt;br /&gt;3H. Specify the information below to connect to the SQL Azure database you created earlier in Steps 1 and 2. Then click Next.&lt;br /&gt;&lt;br /&gt;• &lt;b&gt;Server name&lt;/b&gt;: Specify the server name in the form SERVER.database.windows.net where SERVER is the generated database server name from Step 1H (&lt;b&gt;b7e77waic7&lt;/b&gt; in our example).&lt;br /&gt;• &lt;b&gt;Authentication&lt;/b&gt;: Specify Use a specific user ID and password&lt;br /&gt;• &lt;b&gt;User name&lt;/b&gt;: Specify an administrator username in the form USERNAME@SERVER where the administrator user name is the administration name you made up in Step 1F and the server name is the generated database server name from Step 1H (&lt;b&gt;chefazured@b7e77waic7&lt;/b&gt; in our example).&lt;br /&gt;• &lt;b&gt;Password&lt;/b&gt;: Specify the administrator password from Step 1F.&lt;br /&gt;• &lt;b&gt;Database&lt;/b&gt;: Select the &lt;i&gt;Specify Database&lt;/i&gt; option and specify the name of the database you created in Step 2C (&lt;b&gt;adventureworks&lt;/b&gt; in our example).&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-nky3JFwcJmE/TpuIeutdhEI/AAAAAAAABwc/OAKO6Eq0Ycc/s1600/cg3_3h.png" imageanchor="1" style="clear: left; float: none; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/-nky3JFwcJmE/TpuIeutdhEI/AAAAAAAABwc/OAKO6Eq0Ycc/s400/cg3_3h.png" width="341" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;3I. On the Setup Target Server Connection dialog, confirm the database name is correct and click Next. When prompted to &lt;i&gt;Execute script against destination server?&lt;/i&gt;, click Yes.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-DzPcz9VdOb4/TpuIoXW-a7I/AAAAAAAABwo/VhfLN76o2xw/s1600/cg3_3i.png" imageanchor="1" style="clear: left; float: none; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="103" src="http://1.bp.blogspot.com/-DzPcz9VdOb4/TpuIoXW-a7I/AAAAAAAABwo/VhfLN76o2xw/s400/cg3_3i.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-74zjU4bh-O4/TpuI1ME2wTI/AAAAAAAABw0/Cm5K2Kml6Tk/s1600/cg3_3i2.png" imageanchor="1" style="clear: left; float: none; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="171" src="http://4.bp.blogspot.com/-74zjU4bh-O4/TpuI1ME2wTI/AAAAAAAABw0/Cm5K2Kml6Tk/s400/cg3_3i2.png" width="333" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;3J. Now sit back as the database is migrated. The running report will show you what is happening, including errors and remedial actions. Just how long this takes depends on the size of your database and the quality of your Internet connection.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/-ZXSVRG_HuNs/TpuJFJm4KJI/AAAAAAAABxA/Uirz2d3C6dM/s1600/cg3_3j.png" imageanchor="1" style="clear: left; float: none; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-ZXSVRG_HuNs/TpuJFJm4KJI/AAAAAAAABxA/Uirz2d3C6dM/s400/cg3_3j.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;3K. When the processing completed, you’ll see &lt;i&gt;Processing finished&lt;/i&gt; on the bottom of the report. Review the report and decide if you think the migration was successful. You can save this report with the Save button if you wish. Then click Exit.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-kDCpbaNzyi0/TpuJY3j-17I/AAAAAAAABxM/3S-_RdLgYVk/s1600/cg3_3k.png" imageanchor="1" style="clear: left; none: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-kDCpbaNzyi0/TpuJY3j-17I/AAAAAAAABxM/3S-_RdLgYVk/s400/cg3_3k.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The last thing to do is confirm the database migration was successful. You can do this with SQL Server Management Studio (Step 4) or the Windows Azure Portal (Step 5).&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;b&gt;Step 4: Review SQL Azure Database in SSMS (Optional)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In this step you will confirm your database was successful migrated to the cloud by accessing it with SQL Server Management Studio. You need the 2008 R2 edition of SSMS for this.&lt;br /&gt;&lt;br /&gt;4A. Launch SQL Server Management Studio. The Connect to Server dialog appears.&lt;br /&gt;&lt;br /&gt;4B. In the Connect to Server dialog, specify the connection information below:&lt;br /&gt;&lt;br /&gt;• &lt;b&gt;Server name&lt;/b&gt;: the generated server name from Step 1H.&lt;br /&gt;• &lt;b&gt;Authentication&lt;/b&gt;: SQL Server Authentication.&lt;br /&gt;• &lt;b&gt;Login&lt;/b&gt;: The login name from Step 1F.&lt;br /&gt;• &lt;b&gt;Password&lt;/b&gt;: the password from Step 1F. &lt;br /&gt;• &lt;b&gt;Remember password&lt;/b&gt;: check if you don’t want to have to re-enter this info.&lt;br /&gt;• &lt;b&gt;Options / Connect to Database&lt;/b&gt;: click the Options button and enter the database name from Step 2C under &lt;i&gt;Connect to Database&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-Md-rLkO8V5M/TpuTjC-FZ6I/AAAAAAAABxY/pHLLAJOa6c0/s1600/cg3_4b.png" imageanchor="1" style=""&gt;&lt;img border="0" height="400" width="341" src="http://3.bp.blogspot.com/-Md-rLkO8V5M/TpuTjC-FZ6I/AAAAAAAABxY/pHLLAJOa6c0/s400/cg3_4b.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-mRsqmylR7JM/TpuTuBc3DtI/AAAAAAAABxk/yGEvdTKD8Go/s1600/cg3_4b2.png" imageanchor="1" style=""&gt;&lt;img border="0" height="400" width="341" src="http://1.bp.blogspot.com/-mRsqmylR7JM/TpuTuBc3DtI/AAAAAAAABxk/yGEvdTKD8Go/s400/cg3_4b2.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;4C.Click Connect to connect to the database. If it fails, check the following:&lt;br /&gt;&lt;br /&gt;• Did you create your database server?&lt;br /&gt;• Did you create your database?&lt;br /&gt;• Are you specifying the correct database server name in the right format?&lt;br /&gt;• Are you specifying the correct admin username and password?&lt;br /&gt;• Did you specify the database name on the Connection Properties tab?&lt;br /&gt;• Are there any extraneous leading or trailing spaces in what you entered?&lt;br /&gt;• Does your firewall prevent port 4133 (which SSMS required).&lt;br /&gt;&lt;br /&gt;4D. Now inspect your database, start by expanding the SSMS outline at left and ensuring the tables you expect to be present are there.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-S1h1IgW1DFA/TpuT__Bj0hI/AAAAAAAABxw/wejIM5ah6Ug/s1600/cg3_4c.png" imageanchor="1" style=""&gt;&lt;img border="0" height="284" width="400" src="http://4.bp.blogspot.com/-S1h1IgW1DFA/TpuT__Bj0hI/AAAAAAAABxw/wejIM5ah6Ug/s400/cg3_4c.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;4E. Perform some SELECT queries to ensure the data looks right. Do tables contain the number of rows you expect? Does table data look like you expect?&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/-uX9WteOHxl8/TpuULjtSMvI/AAAAAAAABx8/l6tFLkVXM1c/s1600/cg3_4e.png" imageanchor="1" style=""&gt;&lt;img border="0" height="284" width="400" src="http://2.bp.blogspot.com/-uX9WteOHxl8/TpuULjtSMvI/AAAAAAAABx8/l6tFLkVXM1c/s400/cg3_4e.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;hr/&gt;&lt;b&gt;Step 5: Review SQL Azure Database in Portal (Optional)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This step is optional. If you would also like to see your data in the SQL Azure Portal, or if you were unable to use SSMS in Step 4, follow these steps:&lt;br /&gt;&lt;br /&gt;5A. In the Windows Azure Management Portal, return to the Database area where you were working in Steps 1 and 2. &lt;br /&gt;&lt;br /&gt;5B. Select your database on the outline and left and click the Manage button in the Database toolbar.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/-EGg2dw9YrKI/TpuUaKrcmeI/AAAAAAAAByI/mXd5xGHyCE0/s1600/cg3_5b.png" imageanchor="1" style=""&gt;&lt;img border="0" height="85" width="400" src="http://2.bp.blogspot.com/-EGg2dw9YrKI/TpuUaKrcmeI/AAAAAAAAByI/mXd5xGHyCE0/s400/cg3_5b.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;5C. In the sign-in dialog, specify the administrator username and password from Step 1F. Then click Log on.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/-T_CwaddUfVk/TpuUfWTbbTI/AAAAAAAAByU/NdkJz2xtPsI/s1600/cg3_5c.png" imageanchor="1" style=""&gt;&lt;img border="0" height="280" width="400" src="http://2.bp.blogspot.com/-T_CwaddUfVk/TpuUfWTbbTI/AAAAAAAAByU/NdkJz2xtPsI/s400/cg3_5c.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-acXRtmuWqrM/TpuUsXfGu7I/AAAAAAAAByg/HEdVhi0eHzE/s1600/cg3_5c2.png" imageanchor="1" style=""&gt;&lt;img border="0" height="320" width="400" src="http://1.bp.blogspot.com/-acXRtmuWqrM/TpuUsXfGu7I/AAAAAAAAByg/HEdVhi0eHzE/s400/cg3_5c2.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;5D. Click Tables at left and the database tables will be listed. Confirm the tables you expect are all there.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-b0TIOf1TJM4/TpuU3SN027I/AAAAAAAABys/oZCqwIvV0pQ/s1600/cg3_5d.png" imageanchor="1" style=""&gt;&lt;img border="0" height="320" width="400" src="http://3.bp.blogspot.com/-b0TIOf1TJM4/TpuU3SN027I/AAAAAAAABys/oZCqwIvV0pQ/s400/cg3_5d.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;5E. Select a table you want to view. Click the Data icon to view its data, or the Design icon to view its design.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-5d7Uf8pzVBI/TpuVJn2d4jI/AAAAAAAABy4/jOZGCDsUAUA/s1600/cg3_5e1.png" imageanchor="1" style=""&gt;&lt;img border="0" height="210" width="400" src="http://1.bp.blogspot.com/-5d7Uf8pzVBI/TpuVJn2d4jI/AAAAAAAABy4/jOZGCDsUAUA/s400/cg3_5e1.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/-CikQkY18riA/TpuVOWzbqPI/AAAAAAAABzE/zRl7lDtNGZM/s1600/cg3_5e2.png" imageanchor="1" style=""&gt;&lt;img border="0" height="320" width="400" src="http://2.bp.blogspot.com/-CikQkY18riA/TpuVOWzbqPI/AAAAAAAABzE/zRl7lDtNGZM/s400/cg3_5e2.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;hr/&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Concluding Remarks&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Congratulations, you were magnificent! Vous avez été magnifiques! I am very proud of you.&lt;br /&gt;&lt;br /&gt;I very much hope that your migration went well. If you ran into complications, if the souffle did not rise, do not depair. You must appreciate that not all database migrations are simple affairs. For help you can make avail of the excellent online guidance, support forums, community blogging, and perhaps consider obtaining help from an experienced consultant.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9132148272745668459-2255345210191133369?l=davidpallmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidpallmann.blogspot.com/feeds/2255345210191133369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9132148272745668459&amp;postID=2255345210191133369' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/2255345210191133369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/2255345210191133369'/><link rel='alternate' type='text/html' href='http://davidpallmann.blogspot.com/2011/10/cloud-gourmet-30-minute-meal-simple.html' title='The Cloud Gourmet 30-Minute Meal: Simple Database Migration to SQL Azure'/><author><name>David Pallmann</name><uri>http://www.blogger.com/profile/14482909040736697277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-mPcW-mu5fnI/TWGWz8308CI/AAAAAAAABZc/G7etTBFyHm0/s220/david.pallmann.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-qfoS-09b3X8/Tpt-eZdU14I/AAAAAAAABuQ/BfyGIRkHfHc/s72-c/cloudgourmetwhite30min.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9132148272745668459.post-4736020801084278854</id><published>2011-10-11T00:39:00.000-07:00</published><updated>2011-10-11T00:39:41.250-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='Ice'/><title type='text'>Adventures in HTML5: A JavaScript Doomsday Counter</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-PTqbOvOAlWk/TpPmA0-3D7I/AAAAAAAABsg/GxtxEkjeU0o/s1600/Doomsday01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="58" src="http://3.bp.blogspot.com/-PTqbOvOAlWk/TpPmA0-3D7I/AAAAAAAABsg/GxtxEkjeU0o/s400/Doomsday01.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;Part of mastering HTML5 is mastering JavaScript, a big focus for me and 120 colleagues this month. The best way to go deep on anything in the software world is to be constantly building stuff with it, so here’s something I developed over the last few days: an animated odometer-style counter control suitable for counting down to a deadline.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-XCASA3ZHZzc/TpPm6TBD-RI/AAAAAAAABso/HpSSG77MqlY/s1600/Doomsday02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="47" src="http://1.bp.blogspot.com/-XCASA3ZHZzc/TpPm6TBD-RI/AAAAAAAABso/HpSSG77MqlY/s320/Doomsday02.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;DEVELOPING THE CONTROL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;I didn’t start out intending to write a counter control at all, I was trying to find one to use in a dashboard. I want to be building some cool HTML5 business dashboards in the months to come, and a counter is one of the many widgets I’ll need. I started out looking for one, and sure enough there are a number of free JavaScript counters with source to be found online. Unfortunately, after some evaluation I found issues with each of the ones I tried and I wasn’t able to control appearance or behavior to my satisfaction. Ultimately, I decided to take a shot at creating my own counter control. I wasn’t sure how far I’d get but if nothing else it would be a good learning experience. Rather than writing a simple counter that shows a single value, I chose to create a days-hours-minutes-seconds counter that would count down to a deadline.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;The first step was to obtain graphics for the odometer images, then think through how the digit display should work. If we were merely displaying and updating digit images this would be no big deal, but for this control I wanted the seconds digits to be moving as well as the minutes, hours, and days digits when they get decremented. I created a filmstrip-like image (below) with the digits 0-9 arranged vertically beneath each other. Using this image as the background for each digit, showing any particular value is just a matter of clipping the image and changing its top offset. Moving the image only requires use of a timer to increment or decrement the clip area and top offset until the new digit has rolled into place. As you can imagine there’s quite a bit of logic needed to do this well and bump seconds to minutes to hours to days.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-TnngivQU1sE/TpPoSCJ_y3I/AAAAAAAABtA/dOGIPgiPw6E/s1600/Doomsday03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-TnngivQU1sE/TpPoSCJ_y3I/AAAAAAAABtA/dOGIPgiPw6E/s320/Doomsday03.png" width="309" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;em&gt;Using top margin and CSS clipping to show and roll digits&lt;/em&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;To show one digit from the image,&amp;nbsp;I used the CSS clipping feature. I created CSS classes for each digit that set the image’s top margin and clipping area. One complication of CSS clipping is that it requires absolute positioning, something I didn’t want. It turns out you can have it both ways, by using absolute positioning inside a DIV tag container that uses relative positioning.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="color: darkgreen; font-family: Consolas; font-size: 9.5pt;"&gt;/* Digit classes */&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.d0&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;:&lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;clip&lt;/span&gt;:&lt;span style="color: blue;"&gt;rect(39px 37px 78px 0px)&lt;/span&gt;; &lt;span style="color: red;"&gt;vertical-align&lt;/span&gt;: &lt;span style="color: blue;"&gt;middle&lt;/span&gt;; &lt;span style="color: red;"&gt;margin-top&lt;/span&gt;:&lt;span style="color: blue;"&gt;-39px&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.d1&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;:&lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;clip&lt;/span&gt;:&lt;span style="color: blue;"&gt;rect(78px 37px 117px 0px)&lt;/span&gt;; &lt;span style="color: red;"&gt;vertical-align&lt;/span&gt;: &lt;span style="color: blue;"&gt;middle&lt;/span&gt;; &lt;span style="color: red;"&gt;margin-top&lt;/span&gt;:&lt;span style="color: blue;"&gt;-78px&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.d2&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;:&lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;clip&lt;/span&gt;:&lt;span style="color: blue;"&gt;rect(117px 37px 156px 0px)&lt;/span&gt;; &lt;span style="color: red;"&gt;vertical-align&lt;/span&gt;: &lt;span style="color: blue;"&gt;middle&lt;/span&gt;; &lt;span style="color: red;"&gt;margin-top&lt;/span&gt;:&lt;span style="color: blue;"&gt;-117px&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.d3&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;:&lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;clip&lt;/span&gt;:&lt;span style="color: blue;"&gt;rect(156px 37px 195px 0px)&lt;/span&gt;; &lt;span style="color: red;"&gt;vertical-align&lt;/span&gt;: &lt;span style="color: blue;"&gt;middle&lt;/span&gt;; &lt;span style="color: red;"&gt;margin-top&lt;/span&gt;:&lt;span style="color: blue;"&gt;-156px&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.d4&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;:&lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;clip&lt;/span&gt;:&lt;span style="color: blue;"&gt;rect(195px 37px 234px 0px)&lt;/span&gt;; &lt;span style="color: red;"&gt;vertical-align&lt;/span&gt;: &lt;span style="color: blue;"&gt;middle&lt;/span&gt;; &lt;span style="color: red;"&gt;margin-top&lt;/span&gt;:&lt;span style="color: blue;"&gt;-195px&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.d5&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;:&lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;clip&lt;/span&gt;:&lt;span style="color: blue;"&gt;rect(234px 37px 273px 0px)&lt;/span&gt;; &lt;span style="color: red;"&gt;vertical-align&lt;/span&gt;: &lt;span style="color: blue;"&gt;middle&lt;/span&gt;; &lt;span style="color: red;"&gt;margin-top&lt;/span&gt;:&lt;span style="color: blue;"&gt;-234px&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.d6&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;:&lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;clip&lt;/span&gt;:&lt;span style="color: blue;"&gt;rect(273px 37px 312px 0px)&lt;/span&gt;; &lt;span style="color: red;"&gt;vertical-align&lt;/span&gt;: &lt;span style="color: blue;"&gt;middle&lt;/span&gt;; &lt;span style="color: red;"&gt;margin-top&lt;/span&gt;:&lt;span style="color: blue;"&gt;-273px&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.d7&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;:&lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;clip&lt;/span&gt;:&lt;span style="color: blue;"&gt;rect(312px 37px 351px 0px)&lt;/span&gt;; &lt;span style="color: red;"&gt;vertical-align&lt;/span&gt;: &lt;span style="color: blue;"&gt;middle&lt;/span&gt;; &lt;span style="color: red;"&gt;margin-top&lt;/span&gt;:&lt;span style="color: blue;"&gt;-312px&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.d8&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;:&lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;clip&lt;/span&gt;:&lt;span style="color: blue;"&gt;rect(351px 37px 390px 0px)&lt;/span&gt;; &lt;span style="color: red;"&gt;vertical-align&lt;/span&gt;: &lt;span style="color: blue;"&gt;middle&lt;/span&gt;; &lt;span style="color: red;"&gt;margin-top&lt;/span&gt;:&lt;span style="color: blue;"&gt;-351px&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;.d9&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; { &lt;span style="color: red;"&gt;position&lt;/span&gt;:&lt;span style="color: blue;"&gt;absolute&lt;/span&gt;; &lt;span style="color: red;"&gt;clip&lt;/span&gt;:&lt;span style="color: blue;"&gt;rect(390px 37px 429px 0px)&lt;/span&gt;; &lt;span style="color: red;"&gt;vertical-align&lt;/span&gt;: &lt;span style="color: blue;"&gt;middle&lt;/span&gt;; &lt;span style="color: red;"&gt;margin-top&lt;/span&gt;:&lt;span style="color: blue;"&gt;-390px&lt;/span&gt;; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;Lots of JavaScript code later, I had a decent working prototype control. This afforded me an opportunity to learn more about JavaScript as I tackled events, timers, dynamic DOM alteration, and date calculation. Although I’ve only implemented decrementing deadline counters so far, the code is written in anticipation of other counter types in the future. While my code is in need of completion and refactoring, I’m still proud of it for a first effort.&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;CREATING THE DOOMSDAY COUNTDOWN DEMO&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;Next it was time to incorporate the countdown control into a demo application, and it would need to involve one or more deadlines. With all the end-of the-world date setting going on these days, it seemed a natural to create a tongue-in-cheek “Doomsday Countdown” web site that shows the running countdown to the various end-of-the-world dates. Check it out &lt;/span&gt;&lt;a href="http://tinyurl.com/doomsdaycounter"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;. Unfortunately there are some positioning problems in Firefox I have yet to figure out with the days counter, but it renders &lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;just as it should on Chrome and IE.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-5IkoRQhCJrk/TpPnpH_SUMI/AAAAAAAABs4/ikiWnLyEeAc/s1600/Doomsday04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="337" src="http://4.bp.blogspot.com/-5IkoRQhCJrk/TpPnpH_SUMI/AAAAAAAABs4/ikiWnLyEeAc/s400/Doomsday04.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;In my HTML page, the application references JQuery, the counter.js library for the control, and the counter.css CSS for the control.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;script&lt;/span&gt; &lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;="text/javascript"&lt;/span&gt; &lt;span style="color: red;"&gt;src&lt;/span&gt;&lt;span style="color: blue;"&gt;="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"&amp;gt;&lt;span style="color: maroon;"&gt;script&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;link&lt;/span&gt; &lt;span style="color: red;"&gt;rel&lt;/span&gt;&lt;span style="color: blue;"&gt;="stylesheet"&lt;/span&gt; &lt;span style="color: red;"&gt;href&lt;/span&gt;&lt;span style="color: blue;"&gt;="counter.css"&lt;/span&gt; &lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;="text/css"/&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;script&lt;/span&gt; &lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;="text/javascript"&lt;/span&gt; &lt;span style="color: red;"&gt;src&lt;/span&gt;&lt;span style="color: blue;"&gt;="counter.js"&amp;gt;&lt;span style="color: maroon;"&gt;script&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;The HTML page also contains some initialization JavaScript that creates an array of counter objects. Each object specifies an Id prefix, a counter type (“Date”), an increment/decrement direction, a target date, and an optional hour of the day adjustment.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;script&lt;/span&gt; &lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;="text/javascript"&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: darkgreen;"&gt;// Create an array of counter objects.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;var&lt;/span&gt; counters;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;var&lt;/span&gt; counterCamping = {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Prefix: &lt;span style="color: maroon;"&gt;"Camping"&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;CounterType: &lt;span style="color: maroon;"&gt;"Date"&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Direction: -1,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;EndDate: &lt;span style="color: maroon;"&gt;"10/21/2011"&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Hours: 8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;var&lt;/span&gt; counterBibleCode = {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Prefix: &lt;span style="color: maroon;"&gt;"BibleCode"&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;CounterType: &lt;span style="color: maroon;"&gt;"Date"&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Direction: -1,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;EndDate: &lt;span style="color: maroon;"&gt;"01/01/2012"&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Hour: -16&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;var&lt;/span&gt; counterMayan = {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Prefix: &lt;span style="color: maroon;"&gt;"Mayan"&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;CounterType: &lt;span style="color: maroon;"&gt;"Date"&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Direction: -1,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;EndDate: &lt;span style="color: maroon;"&gt;"12/21/2012"&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Hour: 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;var&lt;/span&gt; counterRasha = {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Prefix: &lt;span style="color: maroon;"&gt;"Rasha"&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;CounterType: &lt;span style="color: maroon;"&gt;"Date"&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Direction: -1,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;EndDate: &lt;span style="color: maroon;"&gt;"01/01/2280"&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Hour: -16&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;var&lt;/span&gt; counterNostradamus = {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Prefix: &lt;span style="color: maroon;"&gt;"Nostradamus"&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;CounterType: &lt;span style="color: maroon;"&gt;"Date"&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Direction: -1,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;EndDate: &lt;span style="color: maroon;"&gt;"01/01/3739"&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Hour: -8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;var&lt;/span&gt; counterSun = {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Prefix: &lt;span style="color: maroon;"&gt;"Sun"&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;CounterType: &lt;span style="color: maroon;"&gt;"Date"&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Direction: -1,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;EndDate: &lt;span style="color: maroon;"&gt;"01/01/99999"&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Hour: 42&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;counters = [6];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;counters[0] = counterCamping;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;counters[1] = counterBibleCode;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;counters[2] = counterMayan;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;counters[3] = counterRasha;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;counters[4] = counterNostradamus;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;counters[5] = counterSun;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: darkgreen;"&gt;// Load event handler - add counters to the DOM and start update timer.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;function&lt;/span&gt; load() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;SetCounters(counterCamping);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;SetCounters(counterBibleCode);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;SetCounters(counterMayan);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;SetCounters(counterRasha);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;SetCounters(counterNostradamus);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;SetCounters(counterSun);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;StartCounters();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;script&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;The onload event handler calls the counter.js library to insert counters into the DOM and start a countdown timer running. From there the counters count down all by themselves.&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;The body of the document is a header, a table that holds the counters and labels, and a footer. Yes, I’m well aware that tables aren’t cool these days—but I had to timebox this experiment and was focused on the JavaScript. As you can see, the Ids used in the table entries match the JavaScript object prefixes seen above. The counter.js library assumes for a counter object with name X that there are elements named XDays, XMinutes, XMinutes, and XSeconds.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;tr&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;th&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;="Label SideLabel"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;Mayan&lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;Calendar&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;th&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;td&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;td&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;td&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;="Label DateLabel"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;2012-DEC-21&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;td&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;td&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;td&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;td&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;div&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;id&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;="MayanDays"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;="BigCounter"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;td&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;td&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;="sep"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&amp;nbsp;&amp;amp;#8226&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;td&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;td&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;div&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;id&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;="MayanHours"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;="Counter"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;td&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;td&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;="sep"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&amp;nbsp;&amp;amp;#8226&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;td&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;td&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;div&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;id&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;="MayanMinutes"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;="Counter"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;td&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;td&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;="sep"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&amp;nbsp;&amp;amp;#8226&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;td&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;td&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;div&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;id&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;="MayanSeconds"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: red; font-family: Consolas; font-size: x-small;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;="Counter"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt;&lt;span style="font-family: Consolas; font-size: x-small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;td&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt; &amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: x-small;"&gt;tr&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;span style="color: blue; font-family: Consolas; font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="color: black; font-family: Calibri;"&gt;Was this the valuable learning experience I expected it to be? It was. I&amp;nbsp;wouldn't have gotten very far without the many&amp;nbsp;useful&amp;nbsp;tips and code snippets about JavaScript online. For the application heading I found a nice fire text effect on &lt;/span&gt;&lt;a href="http://uihacker.blogspot.com/2010/09/javascript-css-animated-text-fire.html"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;UI Hacker&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: black;"&gt;.&amp;nbsp; The application also uses a function or two from the JQuery library.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: black;"&gt;With the understanding this is only prototype code and there is a display issue on Firefox, the Doomsday Countdown application and countdown control may be downloaded from&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="http://doomsday.blob.core.windows.net/web/doomsday.zip"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="color: black; font-family: Calibri;"&gt;(we're counting on you, but if you don't use it, it's not the end of the world)&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9132148272745668459-4736020801084278854?l=davidpallmann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://davidpallmann.blogspot.com/feeds/4736020801084278854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9132148272745668459&amp;postID=4736020801084278854' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/4736020801084278854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9132148272745668459/posts/default/4736020801084278854'/><link rel='alternate' type='text/html' href='http://davidpallmann.blogspot.com/2011/10/adventures-in-html5-javascript-doomsday.html' title='Adventures in HTML5: A JavaScript Doomsday Counter'/><author><name>David Pallmann</name><uri>http://www.blogger.com/profile/14482909040736697277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://3.bp.blogspot.com/-mPcW-mu5fnI/TWGWz8308CI/AAAAAAAABZc/G7etTBFyHm0/s220/david.pallmann.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-PTqbOvOAlWk/TpPmA0-3D7I/AAAAAAAABsg/GxtxEkjeU0o/s72-c/Doomsday01.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9132148272745668459.post-2531039469173239714</id><published>2011-10-08T16:31:00.000-07:00</published><updated>2011-10-16T20:38:07.129-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cloud Gourmet'/><category scheme='http://www.blogger.com/atom/ns#' term='Ice'/><category scheme='http://www.blogger.com/atom/ns#' term='Azure'/><category scheme='http://www.blogger.com/atom/ns#' term='30 Minute Cloud'/><title type='text'>The Cloud Gourmet 30-Minute Meal: Static Web Site Migration to Windows Azure</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-fLR9vctr7XU/TpDRAwf3kQI/AAAAAAAABrs/G9gZq8J1t4g/s1600/cloudgourmetwhite30min.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/-fLR9vctr7XU/TpDRAwf3kQI/AAAAAAAABrs/G9gZq8J1t4g/s400/cloudgourmetwhite30min.png" width="314" /&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-family: Times New Roman;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;Bonjour and welcome again to &lt;a href="http://davidpallmann.blogspot.com/2011/10/cloud-gourmet-cooking-with-windows.html"&gt;The Cloud Gourmet&lt;/a&gt; with your host, &lt;i style="mso-bidi-font-style: normal;"&gt;Chef&lt;/i&gt; &lt;i style="mso-bidi-font-style: normal;"&gt;Az-ure-D&lt;/i&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;My friends, today I would like to share with you the first of several “30 minute meal” recipes for Windows Azure or as you might put it, “low-hanging fruit”. In cooking, not everything must be a masterpiece that requires a great effort. So it is in the cloud: a great many useful things can be done easily and in a short period of time. We are not talking about “fast food” here, which I detest, but simple meals that are nutritious and satisfying that also happen to be quick and easy.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;Perhaps some of you reading this have been considering Windows Azure for some time but have been afraid to, shall we say, &lt;i style="mso-bidi-font-style: normal;"&gt;take the plunge&lt;/i&gt;? I have the perfect remedy. Create one of these 30 minute meals and see for yourself how satisfying Windows Azure is. Doing so will give you confidence and something to show your colleagues. In no time you will be on your way to more ambitious projects. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-size: 16pt; line-height: 115%; mso-bidi-font-size: 11.0pt;"&gt;&lt;span style="font-family: Calibri;"&gt;Recipe: Migrating Static Web Sites to Windows Azure in 30 Minutes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;Web sites come in all sizes and complexities. We have in mind here &lt;i style="mso-bidi-font-style: normal;"&gt;static&lt;/i&gt; web sites, in which we are serving up content but there is no server-side authentication, logic, database, web services, or dynamic page creation. If this is indeed the case, then your needs are simple: you need something to serve up HTML/CSS/JavaScript files along with media content (images, video, audio) or downloadable content such as documents or zip files. Here’s a step-by-step recipe for migrating your static web site to Windows Azure in 30 minutes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;I just happen to have one of these made already that I can pull out of the oven and show you: &lt;/span&gt;&lt;a href="http://azuredesignpatterns.com/"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;http://azuredesignpatterns.com&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;. Note that even though the site is static that doesn’t mean it has to be limited in terms of visuals or interactivity. You can use everything at your disposal on the client side including HTML5, CSS, and JavaScript. This site in fact, static though it is, works on PC browsers as well as touch devices like tablets and phones.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/-Bve98_h_lZY/TpDWC9NcCqI/AAAAAAAABrw/nRUbngnLds4/s1600/AzureDesignPatterns.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="314" src="http://2.bp.blogspot.com/-Bve98_h_lZY/TpDWC9NcCqI/AAAAAAAABrw/nRUbngnLds4/s320/AzureDesignPatterns.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-size: 14pt; line-height: 115%; mso-bidi-font-size: 11.0pt;"&gt;&lt;span style="font-family: Calibri;"&gt;Plan&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;The standard&amp;nbsp;way to host a web site in Windows Azure is to use the Compute service and a web role. However, that’s overkill and an unnecessary expense for a static web site. An alternative is to use blob storage. This works because blob storage is similar to file storage, and blobs can be served up publicly over the Internet if you arrange for the proper permissions. In essence, the Windows Azure Blob Service becomes your web server. &lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;I personally use this approach quite often and it works well.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-size: 14pt; line-height: 115%; mso-bidi-font-size: 11.0pt;"&gt;&lt;span style="font-family: Calibri;"&gt;Ingredients:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;1&amp;nbsp; web site consisting of n files to be served up (may be flat or in a folder hierarchy).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-size: 14pt; line-height: 115%; mso-bidi-font-size: 11.0pt;"&gt;You Will Need:&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 14pt; line-height: 115%; mso-bidi-font-size: 11.0pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;A Windows Azure subscription&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;A cloud storage tool to work with Windows Azure blob storage such as &lt;/span&gt;&lt;a href="http://www.cerebrata.com/Products/CloudStorageStudio/"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;Cloud Storage Studio&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt; or &lt;/span&gt;&lt;a href="http://azurestorageexplorer.codeplex.com/"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;Azure Storage Explorer&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri;"&gt;. We’ll use Azure Storage Explorer in our screen captures.&amp;nbsp;&lt;br style="mso-special-character: line-break;" /&gt; &lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-size: 14pt; line-height: 115%; mso-bidi-font-size: 11.0pt;"&gt;&lt;span style="font-family: Calibri;"&gt;Directions&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-size: 12pt; line-height: 115%; mso-bidi-font-size: 11.0pt;"&gt;&lt;span style="font-family: Calibri;"&gt;Step 1: Create a Windows Azure Storage Account&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;In this step you will create a Windows Azure Storage account (you can also use an existing storage account if you prefer).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;1A. In a web browser, go to the &lt;/span&gt;&lt;a href="http://windows.azure.com/"&gt;&lt;span style="color: blue; font-family: Calibri;"&gt;Windows Azure portal&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;1B. Navigate to the Hosted Service, Storage Accounts &amp;amp; CDN category on the lower left.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-q2JbvFS5wX4/TpDXBDZjQ0I/AAAAAAAABr0/qeP4oD-G-_c/s1600/cloudgourmet2_selbottom.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-q2JbvFS5wX4/TpDXBDZjQ0I/AAAAAAAABr0/qeP4oD-G-_c/s1600/cloudgourmet2_selbottom.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://4.bp.blogspot.com/-q2JbvFS5wX4/TpDXBDZjQ0I/AAAAAAAABr0/qeP4oD-G-_c/s1600/cloudgourmet2_selbottom.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: Calibri;"&gt;1C. Navigate to the Storage Accounts area on the upper left.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-9JE2Wbent24/TpDXGN3smXI/AAAAAAAABr4/g6HruYdRzIg/s1600/cloudgourmet2_seltop.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-9JE2Wbent24/TpDXGN3smXI/AAAAAAAABr4/g6HruYdRzIg/s1600/cloudgourmet2_seltop.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;1D. Click the New Storage Account toolbar button. A dialog appears.&lt;br /&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;Note: if you want to use an existing storage account instead of creating a new one, advance to Step 1G.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;1E. Specify a unique name for the storage account, select a region, and click OK. We’re using the name &lt;b style="mso-bidi-font-weight: normal;"&gt;mystaticwebsite1&lt;/b&gt; here, you will need to use a different name.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-NqjlYGyAuF0/TpDXtNU9lFI/AAAAAAAABr8/4SOatJjObcI/s1600/cloudgourmet2_createaccount.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="180" src="http://1.bp.blogspot.com/-NqjlYGyAuF0/TpDXtNU9lFI/AAAAAAAABr8/4SOatJjObcI/s320/cloudgourmet2_createaccount.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;1F. The storage account will soon appears in the portal. Wait for it to show a status of &lt;i style="mso-bidi-font-style: normal;"&gt;Created&lt;/i&gt;, which sometimes takes a few minutes.&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; margin: 0in 0in 10pt; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/-LKD_WYc-rfg/TpDXzh3CqvI/AAAAAAAABsA/RQG9cF7iG74/s1600/cloudgourmet2_accountcreated.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="84" src="http://2.bp.blogspot.com/-LKD_WYc-rfg/TpDXzh3CqvI/AAAAAAAABsA/RQG9cF7iG74/s320/cloudgourmet2_accountcreated.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;1G. Ensure the storage account is selected in the portal, then click the View Access Keys toolbar button. Record one of the keys (which you will need later) and then click Close.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-ifdOz0WouqE/TpDX5Ocq34I/AAAAAAAABsE/iM6HbkXYhYA/s1600/cloudgourmet2_storagekeys.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="115" src="http://4.bp.blogspot.com/-ifdOz0WouqE/TpDX5Ocq34I/AAAAAAAABsE/iM6HbkXYhYA/s320/cloudgourmet2_storagekeys.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-size: 12pt; line-height: 115%; mso-bidi-font-size: 11.0pt;"&gt;&lt;span style="font-family: Calibri;"&gt;Step 2: Create a Container&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;In this step you will create a &lt;i style="mso-bidi-font-style: normal;"&gt;container&lt;/i&gt; in blob storage to hold your files. A container is similar to a file folder. We use will use a cloud storage tool for this step.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;2A. Launch your preferred cloud storage tool.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;2B. Open the storage account in your tool. You will need to supply the storage account name (Step 1E) and a storage key (Step 1G).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-vlmFT2M3ifE/TpDZ8RBsYrI/AAAAAAAABsU/yPrtXFTIibY/s1600/cloudgourmet2_openaccount.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="191" src="http://4.bp.blogspot.com/-vlmFT2M3ifE/TpDZ8RBsYrI/AAAAAAAABsU/yPrtXFTIibY/s400/cloudgourmet2_openaccount.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;2C. Use your cloud storage tool to create a new container. &lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;Be sure to specify both &lt;i style="mso-bidi-font-style: normal;"&gt;name&lt;/i&gt; and &lt;i style="mso-bidi-font-style: normal;"&gt;container access level&lt;/i&gt; in the dialog.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;&amp;nbsp; ·&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;Name&lt;/i&gt;: Give the container any name you like, such as &lt;b style="mso-bidi-font-weight: normal;"&gt;web&lt;/b&gt;. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;&amp;nbsp; ·&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;i style="mso-bidi-font-style: normal;"&gt;Access Control&lt;/i&gt;: Specify &lt;b style="mso-bidi-font-weight: normal;"&gt;public blob&lt;/b&gt; access.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt;&lt;a href="http://3.bp.blogspot.com/-7J9WywBlLvc/TpDbPutYpVI/AAAAAAAABsY/du81UXduY-g/s1600/cloudgourmet2_createcontainer.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="133" src="http://3.bp.blogspot.com/-7J9WywBlLvc/TpDbPutYpVI/AAAAAAAABsY/du81UXduY-g/s320/cloudgourmet2_createcontainer.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;Step 3: Upload Files&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Calibri;"&gt;In this step you will upload your static web files to the container you created in Step 2 using your cloud storage tool. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;3A. In your cloud storage tool, select the container and click the toolbar button to upload blobs. A file open dialog will appear.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;3B. Navigate to the folder where your static web files reside, select the files to upload and click Open.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;3C. Wait for your files to upload and appear in the cloud storage tool.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;"&gt;3D. Check the Name (Uri) and ContentType property of each file you uploaded and revise them if necessary:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;Name&lt;/b&gt;: If you uploaded from your root web folder, no changes are needed. If you uploaded from a subfolder (such as /Images), you must rename blobs to have the “folder/” prefix in their name. For example, if you uploaded logo.jpg from an &lt;i style="mso-bidi-font-style: normal;"&gt;images&lt;/i&gt; subfolder, rename the blob from “logo.jpg” to “images/logo.jpg”.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;ContentTyp&lt;/b&gt;e: The content type must be set or a web browser will be unsure what to do with the file. The content type may have automatically been set properly based on the file you uploaded and the tool you are using. If not, manually set it. The table below shows some common web file types and the proper ContentType value that should be specified.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: currentColor; margin: auto auto auto 41.4pt; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;"&gt;&lt;tbody&gt;&lt;tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0;"&gt;   &lt;td style="background-color: transparent; border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 85.5pt;" valign="top" width="114"&gt;&lt;div align="center" class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; text-align: center;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;File   Type&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="background-color: transparent; border-color: windowtext windowtext windowtext rgb(0, 0, 0); border-style: solid solid solid none; border-width: 1pt 1pt 1pt 0px; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 117pt;" valign="top" width="156"&gt;&lt;div align="center" class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; text-align: center;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;Content   Type&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="mso-yfti-irow: 1;"&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 85.5pt;" valign="top" width="114"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;.htm, .html&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;text/html&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="mso-yfti-irow: 2;"&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 85.5pt;" valign="top" width="114"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;.css&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;text/css&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="mso-yfti-irow: 3;"&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 85.5pt;" valign="top" width="114"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;.js&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;application/javascript&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="mso-yfti-irow: 4;"&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 85.5pt;" valign="top" width="114"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;.bmp&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;Image/bmp&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="mso-yfti-irow: 5;"&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 85.5pt;" valign="top" width="114"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;.gif&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;image/gif&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="mso-yfti-irow: 6;"&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 85.5pt;" valign="top" width="114"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;.jpg, .jpeg&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;image/jpg&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="mso-yfti-irow: 7;"&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 85.5pt;" valign="top" width="114"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;.png&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;image/png&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="mso-yfti-irow: 8;"&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 85.5pt;" valign="top" width="114"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;.mp3&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;audio/mp3&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="mso-yfti-irow: 9;"&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 85.5pt;" valign="top" width="114"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;.wav&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;audio/wave&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="mso-yfti-irow: 10;"&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 85.5pt;" valign="top" width="114"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;.ogg&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;audio/x-ogg&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="mso-yfti-irow: 11;"&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 85.5pt;" valign="top" width="114"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;.mpeg&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;video/mpeg&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="mso-yfti-irow: 12;"&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 85.5pt;" valign="top" width="114"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;pdf&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 117pt;" valign="top" width="156"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;application/pdf&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr style="mso-yfti-irow: 13; mso-yfti-lastrow: yes;"&gt;   &lt;td style="background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 85.5pt;" valign="top" width="114"&gt;&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"&gt;.zi
