<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>UK StudentZine Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/ukstudentzine/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/ukstudentzine/feed.xml</link>
    <description>Microsoft&amp;#039;s Leading UK based student technology blog. Pictures, geek, codingand of course other things! 
Find more cool blog posts and videos on our  Facebook page</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:28:51 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Comparing Content Management Systems</title>
      <link>https://docs.microsoft.com/archive/blogs/ukstudentzine/comparing-content-management-systems</link>
      <pubDate>Mon, 29 Mar 2010 07:57:00 GMT</pubDate>
      <dc:creator><![CDATA[edunhill]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ukstudentzine/2010/03/29/comparing-content-management-systems/</guid>
      <description><![CDATA[There are a lot of good open source Content Management Systems out there and I’m sure we all know...]]></description>
      <content:encoded><![CDATA[<P>There are a lot of good open source Content Management Systems out there and I’m sure we all know some of the big ones in the market. There is a slight problem with so many good alternatives out there and that is which one to choose? Let’s take a look at the two biggest open source Content Management Systems for .NET developers; DotNetNuke and Umbraco.</P>
<P>Both of these systems are constantly updated and improved by a core team of developers. They both have plugins that are constantly updated and bugs are routinely squashed. So what are the fundamental differences?</P>
<P><B>DotNetNuke</B></P>
<P>DotNetNuke is currently the most popular .NET CMS with a user base in the hundreds of thousands and millions of downloads. Some key points around DotNetNuke are:</P>
<P>- Written in VB.Net which is an easy-to-learn programming language.<BR>- Easy installation process – using the Web Platform Installer makes this process even easier. It’s also easy to install on shared hosting providers.<BR>- User friendly – this really is a very easy to use system with tooltips and help options.<BR>- Largest .NET CMS user base (700,000+) and a dedicated group of developers developing modules, fixing bugs etc. With a community that develops plugins, shares knowledge and is willing to help, DotNetNuke has an unrivaled user base.<BR>- Multiple website support – you can have one installation of DotNetNuke and have multiple portals with separate user lists, content and skins.</P>
<P>Extensible and skinnable.</P>
<P><B>Umbraco</B></P>
<P>Umbraco is becoming increasingly popular and has a community that is growing day by day. It’s written in C# and is currently being rewritten for .NET MVC2. Some key points around Umbraco are:</P>
<P>- Written in C# which is a powerful and flexible programming language.<BR>- Total freedom and flexibility – Umbraco gives the developer the chance to customize and tweak everything about the installation.<BR>- Interface and design – Umbraco effectively gives you a blank page in which to create your website. As such, you can make the website look however you want.<BR>- Seperation of code and presentation.<BR>- Growing user base – umbraco is rapidly gaining a dedicated user base.</P>
<P><B>So which one?</B></P>
<P>Ultimately, there’s no silver bullet for a CMS. You have to take everything in to consideration. What are the business needs? Who is going to use the system? Do you have technical ability to develop things on your own? Where are you hosting this?</P>
<P>Umbraco provides a very flexible and powerful framework, but requires some considerable technical ability to successfully implement. It also has very high hosting requirements which rules out a lot of shared hosting providers. </P>
<P>DotNetNuke provides a fairly solid framework and requires no technical ability once it’s installed. It has a simple module and skin installation system. It is also easier to install on shared hosting. You lose a bit of flexibility, but gain more ease of use for the end user.</P>
<P>There are many more platforms out there and either way you go, you’ll still have a fully functional CMS and a great looking website!</P>]]></content:encoded>
    </item>
    <item>
      <title>Cel Shading in XNA</title>
      <link>https://docs.microsoft.com/archive/blogs/ukstudentzine/cel-shading-in-xna</link>
      <pubDate>Fri, 05 Mar 2010 10:17:28 GMT</pubDate>
      <dc:creator><![CDATA[edunhill]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ukstudentzine/2010/03/05/cel-shading-in-xna/</guid>
      <description><![CDATA[Ever wondered how games achieve that really cool cartoony looking effect? With the bold, blocky...]]></description>
      <content:encoded><![CDATA[<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image008_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image008_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image008" border="0" alt="clip_image008" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image008_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image008_thumb.jpg" width="244" height="192" /></a></p>  <p>Ever wondered how games achieve that really cool cartoony looking effect? With the bold, blocky lighting and the big black borders? It’s quite a neat look and helps make games look really eye-catching! It’s easier and more effective to make a game look stylized, than to make a game look extremely realistic! This article will introduce you to the High Level Shader Language (HLSL) and show you how to implement a fully working Cel Shader in XNA.</p>  <p><b>Getting Started</b></p>  <p>So in order to get started, you’ll need to have XNA Game Studio installed. It also helps if you have a model to test this on – you can find some models in the starter kits over at <a href="http://creators.xna.com">http://creators.xna.com</a></p>  <p>Go ahead and open up Visual Studio and start a new XNA project.</p>  <p><b>Introduction to the HLSL</b></p>  <p>The High Level Shader Language (HLSL) is a shading language for use with the Direct3D API. This means it’s not just used in XNA Game Studio but for Direct3D shaders in general. It has 3 main areas: vertex shader, geometry shader and pixel shader. </p>  <p>So let’s add our Cel Shading code. Right-click Content in the Solution Explorer and then add two new folders. One called Effects, one called Models. Right-click the Effects folder and select Add -&gt; New Item…. Select the Effect File option and name it CelShader.fx</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image002_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image002_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image002_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image002_thumb.jpg" width="244" height="149" /></a></p>  <p><b>Editing the Effect File</b></p>  <p>Now we have our shader file, if you open it, you’ll notice lots of code already there. This has a basic technique called Technique1. We don’t need that right now, so just delete it all. We need to add some basic variables that our shader will make use of, such as the camera variables (world, view and projection matrices), light direction (vector3). So add the following to your new effect file:</p>  <p><font color="#c0c0c0" size="2" face="Courier New">float4x4 world;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float4x4 view;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float4x4 projection;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float3 lightDirection = normalize(float3(1, 1, 1));</font></p>  <p>Now we have our basic variables, we need to add some variables specific to our cel shader. These help manage the banded lighting on the models.</p>  <p><font color="#c0c0c0" size="2" face="Courier New">float toonThresholds[2] = { 0.8, 0.4 };</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float toonBrightnessLevels[3] = { 1.3, 0.9, 0.5 };</font></p>  <p>We also need a variable to store whether or not texturing is enabled, along with the texture being applied and a Sampler. So lets add that now.</p>  <p><font color="#c0c0c0" size="2" face="Courier New">bool textureEnabled;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">texture Texture;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">sampler Sampler = sampler_state</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">Texture = (Texture);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">MinFilter = Linear;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">MagFilter = Linear;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">MipFilter = Linear;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">AddressU = Wrap;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">AddressV = Wrap;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">};</font></p>  <p>The sampler helps us read the texture that is being stored in our texture variable.</p>  <p>Now that we have our initial variables set up, we need to construct some structs to hold some data for our inputs / outputs. These will hold the position, texture co-ordinates, the normal of the texture and the amount of light.</p>  <p><font color="#c0c0c0" size="2" face="Courier New">struct VertexShaderInput</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float4 Position : POSITION0;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float3 Normal : NORMAL0;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float2 TextureCoordinate : TEXCOORD0;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">};</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">struct LightingPixelShaderInput</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float2 TextureCoordinate : TEXCOORD0;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float LightAmount : TEXCOORD1;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">};</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">struct LightingVertexShaderOutput</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float4 Position : POSITION0;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float2 TextureCoordinate : TEXCOORD0;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float LightAmount : TEXCOORD1;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">};</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">struct NormalDepthVertexShaderOutput</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float4 Position : POSITION0;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float4 Color : COLOR0;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">};</font></p>  <p>Now that we have our structures, we can start creating our functions that will enable us to create some cool effects (in our case, cel shading). So lets create a function that allows us to create the banded lighting effect on our model. </p>  <p><font color="#c0c0c0" size="2" face="Courier New">LightingVertexShaderOutput LightingVertexShader(VertexShaderInput input)</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">LightingVertexShaderOutput output;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">output.Position = mul(mul(mul(input.Position, world), view), projection);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">output.TextureCoordinate = input.TextureCoordinate;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float3 worldNormal = mul(input.Normal, world);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">output.LightAmount = dot(worldNormal, lightDirection);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">return output;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">}</font></p>  <p>As you can see, this function is using the structures we setup earlier. It uses the variables we initially setup for world, view and projection to get the idea of where the camera is so that the correct matrices are being used before we start applying light. Otherwise, the light direction would be stuck on top of the camera. We then use the dot product to find out the amount of light that is hitting that vertex by using the worldNormal and the lightDirection.</p>  <p>Now we have our vertex shader, let’s create our toon shader to give it that blocky lighting effect. The way cel shading works best, is when it only has 1 or 2 bands of shading. So there’s no gradient effect, but rather just big chunks of shading, like you see in regular cartoons. So if a light value falls within a particular range, let’s just use one value instead of the normal light value. This is specified in the variables we declared above (toonThresholds and toonBrightnessLevels).</p>  <p><font color="#c0c0c0" size="2" face="Courier New">float4 ToonPixelShader(LightingPixelShaderInput input) : COLOR0</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float4 color = TextureEnabled ? tex2D(Sampler, input.TextureCoordinate) : 0;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float light;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">if (input.LightAmount &gt; toonThresholds[0])</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">light = toonBrightnessLevels[0];</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">else if (input.LightAmount &gt; toonThresholds[1])</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">light = toonBrightnessLevels[1];</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">else</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">light = toonBrightnessLevels[2];</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">color.rgb *= light;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">return color;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">}</font></p>  <p>As you can see in the code, we’re just producing 3 light values all depending upon what value the LightAmount is. This creates that banded lighting effect. </p>  <p>Now that we have our toon shaders, we also need to add some other shaders which we’ll discuss a little more later. These are used to draw the model the first time so that we can enable edge detection (this helps us create the black border.</p>  <p><font color="#c0c0c0" size="2" face="Courier New">NormalDepthVertexShaderOutput NormalDepthVertexShader(VertexShaderInput input)</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">NormalDepthVertexShaderOutput output;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">// Apply camera matrices to the input position.</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">output.Position = mul(mul(mul(input.Position, world), view), projection);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float3 worldNormal = mul(input.Normal, world);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">// The output color holds the normal, scaled to fit into a 0 to 1 range.</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">output.Color.rgb = (worldNormal + 1) / 2;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">// The output alpha holds the depth, scaled to fit into a 0 to 1 range.</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">output.Color.a = output.Position.z / output.Position.w;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">return output;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">}</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float4 NormalDepthPixelShader(float4 color : COLOR0) : COLOR0</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">return color;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">}</font></p>  <p>Now that we have all of our shader code for the lighting effects, we can go ahead and create the techniques to use in our code!</p>  <p><font color="#c0c0c0" size="2" face="Courier New">technique Toon</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">pass P0</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">VertexShader = compile vs_1_1 LightingVertexShader();</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">PixelShader = compile ps_2_0 ToonPixelShader();</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">}</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">}</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">technique NormalDepth</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">pass P0</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">VertexShader = compile vs_1_1 NormalDepthVertexShader();</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">PixelShader = compile ps_1_1 NormalDepthPixelShader();</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">}</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">}</font></p>  <p>There we have our lighting code! That’s great, but we don’t have our black borders yet. So before we continue, let’s add our Post Process effect (the black borders).</p>  <p><b>Post Processing Effects</b></p>  <p>So let’s do the same thing we did before to create an effect file, and call this one PostProcess.fx</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image004_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image004_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image004" border="0" alt="clip_image004" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image004_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image004_thumb.jpg" width="244" height="149" /></a></p>  <p>Same as the last effect file, delete everything we have there and we’ll start from scratch! We need to add some variables for use in the file, so lets add those now. We need one to control how thick the border will be and how dark the stroke will be:</p>  <p><font color="#c0c0c0" size="2" face="Courier New">float edgeWidth = 1;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float edgeIntensity = 1;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float normalSensitivity = 1;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float depthSensitivity = 10;</font></p>  <p>We also need a variable to store how accurate the edge detection is. The higher the number, the less it will pick up. This is good for getting rid of unwanted edges on really detailed models.</p>  <p><font color="#c0c0c0" size="2" face="Courier New">float normalThreshold = 0.5;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float depthThreshold = 0.1;</font></p>  <p>We also need a variable to store the screen resolution (WxH).</p>  <p><font color="#c0c0c0" size="2" face="Courier New">float2 screenResolution;</font></p>  <p>As with the last effect file, we need to store the texture and create a Sampler – both for the scene (edge detection filter will be written over this) and the normal depth scene. </p>  <p><font color="#c0c0c0" size="2" face="Courier New">texture sceneTexture;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">sampler SceneSampler : register(s0) = sampler_state</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">Texture = (sceneTexture);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">MinFilter = Linear;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">MagFilter = Linear;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">AddressU = Clamp;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">AddressV = Clamp;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">};</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">texture normalDepthTexture;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">sampler NormalDepthSampler : register(s1) = sampler_state</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">Texture = (normalDepthTexture);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">MinFilter = Linear;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">MagFilter = Linear;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">AddressU = Clamp;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">AddressV = Clamp;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">};</font></p>  <p>Now is a good time to sit and think a bit about how cel shading works. We’re going to render a scene with edge detection, so that we can gather the edges of the models. This allows us to determine where we need to draw the lines. We then map a texture of the scene which gives us an idea about where to draw the line. If it’s an edge, we then add a line (thickness and intensity are determined by our variables above).</p>  <p><font color="#c0c0c0" size="2" face="Courier New">float4 PixelShader(float2 texCoord : TEXCOORD0) : COLOR0</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float3 scene = tex2D(SceneSampler, texCoord);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float2 edgeOffset = edgeWidth / screenResolution;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float4 n1 = tex2D(NormalDepthSampler, texCoord + float2(-1, -1) * edgeOffset);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float4 n2 = tex2D(NormalDepthSampler, texCoord + float2( 1, 1) * edgeOffset);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float4 n3 = tex2D(NormalDepthSampler, texCoord + float2(-1, 1) * edgeOffset);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float4 n4 = tex2D(NormalDepthSampler, texCoord + float2( 1, -1) * edgeOffset);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float4 diagonalDelta = abs(n1 - n2) + abs(n3 - n4);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float normalDelta = dot(diagonalDelta.xyz, 1);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float depthDelta = diagonalDelta.w;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">normalDelta = saturate((normalDelta - normalThreshold) * normalSensitivity);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">depthDelta = saturate((depthDelta - depthThreshold) * depthSensitivity);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float edgeAmount = saturate(normalDelta + depthDelta) * edgeIntensity;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">scene *= (1 - edgeAmount);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">return float4(scene, 1);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">}</font></p>  <p>Now we just need to map this function to a technique and we can start implementing these in our XNA game code!</p>  <p><font color="#c0c0c0" size="2" face="Courier New">technique EdgeDetect</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">pass P0</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">PixelShader = compile ps_2_0 PixelShader();</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">}</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">}</font></p>  <p><b>Implementing the Effects in XNA</b></p>  <p>We’re not done yet! We still need to add these to our code. So let’s do some initialisation and add our content. So add these variables at the top:</p>  <p><font color="#c0c0c0" size="2" face="Courier New">Effect celShader;      <br />Effect postProcessEffect;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">Model myModel;      <br />RenderTarget2D sceneRenderTarget;       <br />RenderTarget2D normalRenderTarget;</font></p>  <p>Here, we’re simply declaring our two effect files we’ve already created, our model that we’ll be using and 2 render targets (used for our post process effect – check above).</p>  <p>In the initialization function, add the following code:</p>  <p><font color="#c0c0c0" size="2" face="Courier New">celShader = Content.Load&lt;Effect&gt;(@&quot;Effects\CelShader&quot;);      <br />postProcessEffect = Content.Load&lt;Effect&gt;(@&quot;Effects\PostProcess&quot;);</font></p>  <p>We also need to initialise our render targets, so add the following code just below the above:</p>  <p><font color="#c0c0c0" size="2" face="Courier New">PresentationParameters pp = graphics.GraphicsDevice.PresentationParameters;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">normalRenderTarget = new RenderTarget2D(graphics.GraphicsDevice,</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">pp.BackBufferWidth, pp.BackBufferHeight, 1,</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">pp.BackBufferFormat, pp.MultiSampleType, pp.MultiSampleQuality);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">sceneRenderTarget = new RenderTarget2D(graphics.GraphicsDevice,</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">pp.BackBufferWidth, pp.BackBufferHeight, 1,</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">pp.BackBufferFormat, pp.MultiSampleType, pp.MultiSampleQuality);</font></p>  <p>Now that we’ve initialised out effects and render targets, we need to load in our model. Go to the LoadContent function and add the following line (change the name depending upon your model name):</p>  <p><font color="#c0c0c0" size="2" face="Courier New">myModel = Content.Load&lt;Model&gt;(@&quot;Models\Human&quot;);</font></p>  <p>Now we’ve initialised and loaded our content we can start doing stuff with it. However, we need to do some logic on our model before we start rendering. This is so that we can store the textures for our models whilst manipulating effects on it. Add the following function call <b>after</b> you have loaded your model:</p>  <p><font color="#c0c0c0" size="2" face="Courier New">ChangeEffectUsedByModel(myModel, celShader);</font></p>  <p>Now for the actual function – declare this function as follows:</p>  <p><font color="#c0c0c0" size="2" face="Courier New">static void ChangeEffectUsedByModel(Model model, Effect replacementEffect)</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">Dictionary&lt;Effect, Effect&gt; effectMapping = new Dictionary&lt;Effect, Effect&gt;();</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">foreach (ModelMesh mesh in model.Meshes)</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">foreach (BasicEffect oldEffect in mesh.Effects)</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">if (!effectMapping.ContainsKey(oldEffect))</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">Effect newEffect = replacementEffect.Clone( replacementEffect.GraphicsDevice);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">newEffect.Parameters[&quot;Texture&quot;].SetValue(oldEffect.Texture);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">newEffect.Parameters[&quot;TextureEnabled&quot;].SetValue( oldEffect.TextureEnabled);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">effectMapping.Add(oldEffect, newEffect);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">}</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">}</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">foreach (ModelMeshPart meshPart in mesh.MeshParts)</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">meshPart.Effect = effectMapping[meshPart.Effect];</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">}</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">}</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">}</font></p>  <p>Now we can draw the models and apply the post processing effects. As we’re going to be drawing the model more than once, it’s cleaner to create our own DrawModel function. Declare a new DrawModel function:</p>  <p><font color="#c0c0c0" size="2" face="Courier New">void DrawModel(Matrix world, Matrix view, Matrix projection,</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">string effectTechniqueName, Model model)</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">RenderState renderState = graphics.GraphicsDevice.RenderState;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">renderState.AlphaBlendEnable = false;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">renderState.AlphaTestEnable = false;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">renderState.DepthBufferEnable = true;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">Matrix[] transforms = new Matrix[model.Bones.Count];</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">model.CopyAbsoluteBoneTransformsTo(transforms);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">foreach (ModelMesh mesh in model.Meshes)</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">foreach (Effect effect in mesh.Effects)</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">effect.CurrentTechnique = effect.Techniques[effectTechniqueName];</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">Matrix localWorld = transforms[mesh.ParentBone.Index] * world * Matrix.CreateScale(40.0f);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">effect.Parameters[&quot;world&quot;].SetValue(localWorld);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">effect.Parameters[&quot;view&quot;].SetValue(view);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">effect.Parameters[&quot;projection&quot;].SetValue(projection);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">}</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">mesh.Draw();</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">}</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">}</font></p>  <p>Here, we’re drawing the model with the effect technique that we’re passing in. If you remember, we created two techniques in our CelShader, Toon and NormalDepth. Toon does the toon shading, NormalDepth handles the edge detection. We’re also passing in the model, view, world and projection matrices.</p>  <p>Now we have a draw function, we need to add a post process function to handle our post processing. To do this, we pass in our effect technique name (in this case, EdgeDetect) and it then renders the scene texture. So lets declare our post processing function and implement our post processing effect:</p>  <p><font color="#c0c0c0" size="2" face="Courier New">void ApplyPostProcess(string effectTechniqueName)</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">{</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">EffectParameterCollection parameters = postProcessEffect.Parameters;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">Vector2 resolution = new Vector2(sceneRenderTarget.Width,</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">sceneRenderTarget.Height);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">Texture2D normalDepthTexture = normalRenderTarget.GetTexture();</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">parameters[&quot;edgeWidth&quot;].SetValue(1);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">parameters[&quot;edgeIntensity&quot;].SetValue(1);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">parameters[&quot;screenResolution&quot;].SetValue(resolution);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">parameters[&quot;normalDepthTexture&quot;].SetValue(normalDepthTexture);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">postProcessEffect.CurrentTechnique = postProcessEffect.Techniques[effectTechniqueName];</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">spriteBatch.Begin(SpriteBlendMode.None,</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">SpriteSortMode.Immediate,</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">SaveStateMode.None);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">postProcessEffect.Begin();</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">postProcessEffect.CurrentTechnique.Passes[0].Begin();</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">spriteBatch.Draw(sceneRenderTarget.GetTexture(), Vector2.Zero, Color.White);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">spriteBatch.End();</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">postProcessEffect.CurrentTechnique.Passes[0].End();</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">postProcessEffect.End();</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">}</font></p>  <p>As you can see, it’s fairly simple. We’re passing in some parameters for our post processing effect (in this case, edge width, intensity, resolution and the depth texture) and then drawing that effect to the screen.</p>  <p>We’re almost done! Now we have these functions, but they aren’t currently being called. So let’s go to our Draw function and use the functions! First, we need to add some variables and logic around the view, world and projection matrices. These would usually be done by a camera class of some sort, but we’re just going to put some static values that all us to see our model. In the Draw function, add the following code:</p>  <p><font color="#c0c0c0" size="2" face="Courier New">Viewport viewport = graphics.GraphicsDevice.Viewport;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">float aspectRatio = (float)viewport.Width / (float)viewport.Height;</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">Matrix rotation = Matrix.CreateRotationY(1.0f);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">Matrix view = Matrix.CreateLookAt(new Vector3(3000, 3000, 0),</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">new Vector3(0, 1500, 0),</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">Vector3.Up);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">Matrix projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, aspectRatio, 1000, 10000);</font></p>  <p>Now we have our camera set up, we can go ahead and start drawing stuff (finally!) – first, we need to do the normal depth drawing. Add the following code just below the above:</p>  <p><font color="#c0c0c0" size="2" face="Courier New">graphics.GraphicsDevice.SetRenderTarget(0, normalRenderTarget);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">graphics.GraphicsDevice.Clear(Color.Black);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">DrawModel(rotation, view, projection, &quot;NormalDepth&quot;, myModel);</font></p>  <p>Now we need to draw with the toon effect. This is on a different render target, so use the following code:</p>  <p><font color="#c0c0c0" size="2" face="Courier New">graphics.GraphicsDevice.SetRenderTarget(0, sceneRenderTarget);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">graphics.GraphicsDevice.Clear(Color.CornflowerBlue);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">DrawModel(rotation, view, projection, &quot;Toon&quot;, myModel);</font></p>  <p>Now we just need to call our post processing effect – if we don’t call our post processing effect, we’ll get this screen:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image006_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image006_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image006" border="0" alt="clip_image006" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image006_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image006_thumb.jpg" width="244" height="192" /></a></p>  <p>Which we clearly don’t want! So let’s call that now – underneath the code we just added in our Draw function, add the following:</p>  <p><font color="#c0c0c0" size="2" face="Courier New">graphics.GraphicsDevice.SetRenderTarget(0, null);</font></p>  <p><font color="#c0c0c0" size="2" face="Courier New">ApplyPostProcess(&quot;EdgeDetect&quot;);</font></p>  <p>If you compile and run the application now, you should see your model in all it’s cartoony glory!</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image008_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image008_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image008" border="0" alt="clip_image008" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image008_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image008_thumb.jpg" width="244" height="192" /></a></p>  <p>Of course, if you don’t want the lines you can just take out the call DrawModel where we use NormalDepth – that will give you the toon shading like this:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image010_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image010_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image010" border="0" alt="clip_image010" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image010_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image010_thumb.jpg" width="244" height="192" /></a></p>  <p>Or – if you just want the lines, you can comment out the call to the Toon effect draw and get this:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image012_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image012_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image012" border="0" alt="clip_image012" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image012_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/CelShadinginXNA_10125/clip_image012_thumb.jpg" width="244" height="192" /></a></p>  <p>Hope this provided decent insight to the HLSL and some cool things that can be done with it! Let us know what cool effects you can come up with!</p>  <p><strong>More information</strong></p>  <p>If you’re looking for more resources, information or help, there’s a great community built up around XNA that you can find over at <a href="http://creators.xna.com">http://creators.xna.com</a> There’ll you’ll find a whole bunch of starter kits, demos and tutorials to help you out!</p>]]></content:encoded>
    </item>
    <item>
      <title>Student Project Express: Completing your student project with Microsoft technologies</title>
      <link>https://docs.microsoft.com/archive/blogs/ukstudentzine/student-project-express-completing-your-student-project-with-microsoft-technologies</link>
      <pubDate>Thu, 14 Jan 2010 07:31:29 GMT</pubDate>
      <dc:creator><![CDATA[edunhill]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ukstudentzine/2010/01/14/student-project-express-completing-your-student-project-with-microsoft-technologies/</guid>
      <description><![CDATA[Learning to use the Microsoft Developer tools and technologies (.NET Framework, C#, Visual Studio,...]]></description>
      <content:encoded><![CDATA[<p>Learning to use the Microsoft Developer tools and technologies (.NET Framework, C#, Visual Studio, SQL Server, etc) is something that can prove extremely important for graduates looking for a job once they complete their studies.</p>  <p>Using these for the final student project is a great way to learn in a productive way and is potentially a great way to show how proficient one is when having interviews especially if this is with one of the many <a href="https://partner.microsoft.com/global/partner?countrycode=worldwide">Microsoft partners</a> who build and sell products built on top of the Microsoft stack.</p>  <p>And for those of you who are new to our tools and products, I decided to start this small series of blog posts that will take you through a complete project and show you how to use Microsoft technologies end-to-end the “Student Project Express” which will guide you through all the steps needed to complete the project, allowing you to focus on delivering a great solution and write-up!”</p>  <p>During the duration of the series I will cover a few different aspects:</p>  <ol>   <li>Reading the project brief and defining the solution architecture </li>    <li>Getting hold of the software, install and configure it so you have a fully functional development environment </li>    <li>Designing the database schema </li>    <li>Creating your system back end using Web Services </li>    <li>Creating a user interface for multiple devices (both end user and admin interface) </li>    <li>Integrating 3rd party services and/or connecting with social networks </li>    <li>Debug and deploy the solution in a production environment </li> </ol>  <p>The brief for this coursework has been taken almost entirely from one used in a the real MSc in Internet Applications Development by the London Metropolitan University.</p>  <p>So… let’s start by taking a quick look at the project brief.</p>  <p>The full project brief is <a href="http://blogs.msdn.com/pblog/attachment/9936642.ashx">available here as a Word document.</a> Make sure as a first thing you download and read it carefully as understanding the brief fully is a key part of then being able to develop the solution!</p>  <p>While the next post in the series will go into details into reading the brief and translating it into a solution architecture, I want to just spend a few words about it now.</p>  <p>The objective of the application we will need to design and the develop is…</p>  <blockquote>   <p><font color="#ffffff">You must develop an application to provide the students with information regarding the modules in the courses that are currently offered at your University. The web pages must integrate some web services and allow users to view information via a desktop and a mobile browser.</font></p> </blockquote>  <p>So, we can see right away that we will need to create a set of web services that will be “consumed” by a web interface either on our computer desktop and on a mobile device.</p>  <p>While this is not an extremely complex brief, it will require the use of a number of different technologies and the integration of these which I think makes it the perfect candidate for this type of blog series.</p>  <p>One thing which is worth noticing is that I am not aiming to teach you to program! In order to follow this blog posts you need to understand the basics of database design, object oriented programming, web services, HTML and CSS.</p>  <p>I will provide links to reference material that you can use to learn more about the individual technologies I will be using but having a sound understanding of the fundamental concepts is definitely going to be needed.</p>  <p>This is it for now… feel free to download the brief and try thinking how you would go about creating your solution. And let me know if there are any aspects you would like to see me cover in addition to the ones I mentioned above!</p>  <p>See you in January for a detailed analysis of the brief!</p>]]></content:encoded>
    </item>
    <item>
      <title>Silverlight - Gadgets, Web Slices and More! (Part 2)</title>
      <link>https://docs.microsoft.com/archive/blogs/ukstudentzine/silverlight-gadgets-web-slices-and-more-part-2</link>
      <pubDate>Tue, 15 Dec 2009 04:34:12 GMT</pubDate>
      <dc:creator><![CDATA[edunhill]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ukstudentzine/2009/12/15/silverlight-gadgets-web-slices-and-more-part-2/</guid>
      <description><![CDATA[In this part of the Silverlight article, we’ll be going through IE8 Web Slices – what they are, how...]]></description>
      <content:encoded><![CDATA[<p>In this part of the Silverlight article, we’ll be going through IE8 Web Slices – what they are, how they work and how we can put our Silverlight application in them.</p>  <p><b>What are Web Slices?</b></p>  <p>A Web Slice is a new feature within IE8 that allows a user to subscribe (favourite) just a portion of that web page. It behaves just like RSS, but for just that portion of the web page. This means, you can put images, text and Rich Internet Applications like Silverlight in them. </p>  <p><b>How do they work?</b></p>  <p>A Web Slice is some really simple HTML that can easily be added to any existing code on your web pages. There are two versions you can have – a piece from an entire page, or a special display page that can constantly be updated (sort of like an RSS page). This looks like:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandMorePart2_B0AA/clip_image001_2.gif" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandMorePart2_B0AA/clip_image001_2.gif"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image001" border="0" alt="clip_image001" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandMorePart2_B0AA/clip_image001_thumb.gif" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandMorePart2_B0AA/clip_image001_thumb.gif" width="244" height="127" /></a></p>  <p>Here, the Basic.html is where the Web Slice is embedded. You “discover” the Web Slice at that location. It then refers to the Update.html file, which is where it updates and provides notification. This is then stored and displayed in your Web Slice.</p>  <p><b>Implementing Web Slices</b></p>  <p>Now we get to the good part – implementing our Silverlight application in to a Web Slice. First, we need to create our two files, Basic.html and Update.html.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandMorePart2_B0AA/clip_image003_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandMorePart2_B0AA/clip_image003_2.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image003" border="0" alt="clip_image003" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandMorePart2_B0AA/clip_image003_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandMorePart2_B0AA/clip_image003_thumb.jpg" width="244" height="149" /></a></p>  <p><b>Basic.html Code</b></p>  <p>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt; </p>  <p>&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt; </p>  <p>&lt;head&gt; </p>  <p>&lt;title&gt;Silverlight Application&lt;/title&gt; </p>  <p>&lt;/head&gt; </p>  <p>&lt;body&gt; </p>  <p>&lt;div class=&quot;hslice&quot; id=&quot;SilverlightApplication&quot;&gt; </p>  <p>&lt;span class=&quot;entry-title&quot;&gt;Silverlight Application&lt;/span&gt; </p>  <p>&lt;a rel=”entry-content” href=&quot;Update.html&quot;/&gt; </p>  <p>&lt;/div&gt; </p>  <p>&lt;/body&gt; </p>  <p>&lt;/html&gt;</p>  <p><b>Explanation</b></p>  <p><b></b></p>  <p>As you can see, we have some “special” class tags. The class tag “hslice” is the class used by Internet Explorer to register a Web Slice. It uses the hAtom micro format. To ensure the Web Slice works correctly, we need to assign it a unique ID. Inside this &lt;div&gt; element, we have the title of the Web Slice – “entry-title”. We also have our Update page, Update.html, which will display our Silverlight application and other display logic for our Web Slice.</p>  <p>Now let’s add our Update.html page.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandMorePart2_B0AA/clip_image005_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandMorePart2_B0AA/clip_image005_2.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image005" border="0" alt="clip_image005" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandMorePart2_B0AA/clip_image005_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandMorePart2_B0AA/clip_image005_thumb.jpg" width="244" height="149" /></a></p>  <p><b>Update.html Code</b></p>  <p><b></b></p>  <p>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</p>  <p>&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &gt;</p>  <p>&lt;head&gt;</p>  <p>&lt;title&gt;StudentZine&lt;/title&gt;</p>  <p>&lt;style type=&quot;text/css&quot;&gt;</p>  <p>html, body {</p>  <p>height: 100%;</p>  <p>overflow: auto;</p>  <p>}</p>  <p>body {</p>  <p>padding: 0;</p>  <p>margin: 0;</p>  <p>}</p>  <p>#silverlightControlHost {</p>  <p>height: 100%;</p>  <p>text-align:center;</p>  <p>}</p>  <p>&lt;/style&gt;</p>  <p>&lt;script type=&quot;text/javascript&quot; src=&quot;Silverlight.js&quot;&gt;&lt;/script&gt;</p>  <p>&lt;script type=&quot;text/javascript&quot;&gt;</p>  <p>function onSilverlightError(sender, args) {</p>  <p>var appSource = &quot;&quot;;</p>  <p>if (sender != null &amp;&amp; sender != 0) {</p>  <p>appSource = sender.getHost().Source;</p>  <p>}</p>  <p>var errorType = args.ErrorType;</p>  <p>var iErrorCode = args.ErrorCode;</p>  <p>if (errorType == &quot;ImageError&quot; || errorType == &quot;MediaError&quot;) {</p>  <p>return;</p>  <p>}</p>  <p>var errMsg = &quot;Unhandled Error in Silverlight Application &quot; + appSource + &quot;\n&quot; ;</p>  <p>errMsg += &quot;Code: &quot;+ iErrorCode + &quot; \n&quot;;</p>  <p>errMsg += &quot;Category: &quot; + errorType + &quot; \n&quot;;</p>  <p>errMsg += &quot;Message: &quot; + args.ErrorMessage + &quot; \n&quot;;</p>  <p>if (errorType == &quot;ParserError&quot;) {</p>  <p>errMsg += &quot;File: &quot; + args.xamlFile + &quot; \n&quot;;</p>  <p>errMsg += &quot;Line: &quot; + args.lineNumber + &quot; \n&quot;;</p>  <p>errMsg += &quot;Position: &quot; + args.charPosition + &quot; \n&quot;;</p>  <p>}</p>  <p>else if (errorType == &quot;RuntimeError&quot;) {</p>  <p>if (args.lineNumber != 0) {</p>  <p>errMsg += &quot;Line: &quot; + args.lineNumber + &quot; \n&quot;;</p>  <p>errMsg += &quot;Position: &quot; + args.charPosition + &quot; \n&quot;;</p>  <p>}</p>  <p>errMsg += &quot;MethodName: &quot; + args.methodName + &quot; \n&quot;;</p>  <p>}</p>  <p>throw new Error(errMsg);</p>  <p>}</p>  <p>&lt;/script&gt;</p>  <p>&lt;/head&gt;</p>  <p>&lt;body&gt;</p>  <p>&lt;form id=&quot;form1&quot; runat=&quot;server&quot; style=&quot;height:100%&quot;&gt;</p>  <p>&lt;div id=&quot;silverlightControlHost&quot;&gt;</p>  <p>&lt;object data=&quot;data:application/x-silverlight-2,&quot; type=&quot;application/x-silverlight-2&quot; width=&quot;100&quot; height=&quot;100&quot;&gt;</p>  <p>&lt;param name=&quot;initParams&quot; value=&quot;environment=WebSlice&quot; /&gt;</p>  <p>&lt;param name=&quot;source&quot; value=&quot;ClientBin/StudentZine.xap&quot;/&gt;</p>  <p>&lt;param name=&quot;onError&quot; value=&quot;onSilverlightError&quot; /&gt;</p>  <p>&lt;param name=&quot;background&quot; value=&quot;white&quot; /&gt;</p>  <p>&lt;param name=&quot;minRuntimeVersion&quot; value=&quot;3.0.40624.0&quot; /&gt;</p>  <p>&lt;param name=&quot;autoUpgrade&quot; value=&quot;true&quot; /&gt;</p>  <p>&lt;a href=&quot;http://go.microsoft.com/fwlink/?LinkID=149156&amp;v=3.0.40624.0&quot; style=&quot;text-decoration:none&quot;&gt;</p>  <p>&lt;img src=&quot;http://go.microsoft.com/fwlink/?LinkId=108181&quot; alt=&quot;Get Microsoft Silverlight&quot; style=&quot;border-style:none&quot;/&gt;</p>  <p>&lt;/a&gt;</p>  <p>&lt;/object&gt;&lt;iframe id=&quot;_sl_historyFrame&quot; style=&quot;visibility:hidden;height:0px;width:0px;border:0px&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;</p>  <p>&lt;/form&gt;</p>  <p>&lt;/body&gt;</p>  <p>&lt;/html&gt;</p>  <p><b>Explanation</b></p>  <p><b></b></p>  <p>As you can see, this is a huge chunk of code, but really… it’s only displaying some HTML data. It is pretty much the same HTML page as any default pages that have been put in when generating the project file by Visual Studio. The key to this would be the following line: </p>  <p>&lt;param name=&quot;initParams&quot; value=&quot;environment=WebSlice&quot; /&gt;</p>  <p>If you remember from the Parameters article last month, this lets our Silverlight application know it’s in the Web Slice. As such, we can ensure that it displays correctly within a Web Slice with the same Silverlight application code. </p>  <p><b>Important Note</b></p>  <p><b></b></p>  <p>There are some very slight limitations with Web Slices. The size of the Web Slice is something to take in to consideration. You can resize them, but they initially drop down with a size of 320x240 – which is certainly a design element to take in to consideration. No-one wants to have to resize the Web Slice just to see some content, when the whole idea is to have that information displayed presentably and quickly.</p>  <p><b>Result</b></p>  <p><b></b></p>  <p>The end result is that you should now have an application that looks a little bit like this:</p>  <p><b>Basic.html</b></p>  <p><b></b></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandMorePart2_B0AA/clip_image007_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandMorePart2_B0AA/clip_image007_2.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image007" border="0" alt="clip_image007" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandMorePart2_B0AA/clip_image007_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandMorePart2_B0AA/clip_image007_thumb.jpg" width="244" height="70" /></a><b></b></p>  <p><b></b></p>  <p><b>Web Slice (Update.html)</b></p>  <p><b></b></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandMorePart2_B0AA/clip_image009_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandMorePart2_B0AA/clip_image009_2.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image009" border="0" alt="clip_image009" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandMorePart2_B0AA/clip_image009_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandMorePart2_B0AA/clip_image009_thumb.jpg" width="244" height="74" /></a><b></b></p>  <p><b></b></p>  <p>As you can see, we now have a green outline around our web slice code. I added the Silverlight application to the Basic.html inside the &lt;div class=”hslice” id=”SilverlightApplication”&gt; tags, underneath the &lt;a rel=””&gt; tag. You can add anything you like within the tag.</p>  <p>We now also have a fully working Web Slice, which adds a link to your Favourites bar. If you click on it, you’ll have the drop down box with our Web Slice Silverlight button! It also provides a link to the page it’s on.</p>  <p>Next time, we’ll be looking at the Windows Gadget framework and how to put a Silverlight application in there!</p>]]></content:encoded>
    </item>
    <item>
      <title>PDC 2009</title>
      <link>https://docs.microsoft.com/archive/blogs/ukstudentzine/pdc-2009</link>
      <pubDate>Mon, 14 Dec 2009 01:56:52 GMT</pubDate>
      <dc:creator><![CDATA[edunhill]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ukstudentzine/2009/12/14/pdc-2009/</guid>
      <description><![CDATA[Intro  Microsoft’s Professional Developers Conference (PDC) is often mentioned in revered tones...]]></description>
      <content:encoded><![CDATA[<h4>Intro</h4>  <p>Microsoft’s Professional Developers Conference (PDC) is often mentioned in revered tones around the water-cooler. Not just because it’s notoriously difficult to get a ticket (usually the conference is a sell-out), or hard to get to (Los Angeles is not, by any stretch of the imagination, near the UK), but because this is the place where Microsoft’s best speakers make the biggest announcements, and lift the lid on the company’s technical strategy and evolution.</p>  <p>Actually, the real buzz is around the “goods”: delegates receive <a href="http://thomasfreudenberg.com/blog/archive/2005/09/13/PDC_3A00_-The-_2800_missing_2900_-Goods.aspx">stacks of DVDs</a> loaded with pre-beta code and early releases. In fact in 2008, there was so much code distributed, that delegates received a <a href="http://news.cnet.com/8301-10805_3-10077484-75.htm">whole hard-drive</a> full of fun. </p>  <p>So, on with the sunglasses, and off to the Los Angeles Convention Centre. Who said what, and what does it mean?</p>  <h4>Keynotes and Sessions </h4>  <p>As is usual with this kind of giant conference, the days are split into keynotes, and technical sessions. This year, keynotes were delivered on two days (with queues snaking around the convention centre by 8am). </p>  <p>Day 1 saw Ray Ozzie announce the public launch of Windows Azure. The platform itself has been around in trial form for a little under a year, and has evolved considerably over this time. As well as a mature developer model, there was a lot of attention given to SQL Azure, and to tools for data migration or partitioning between on-premise data, and Azure-hosted data. This is an area to watch and skill up in – it’ll take a couple of years before our customers untangle the options available to them and decide on an implementation strategy, but one thing is sure, <i>no-one</i> will ignore the cloud-hosted option.</p>  <p>Also announced on Day 1 was codename “Dallas” – a project making massive datasets available to companies and developers, and a set of tools to take advantage of this data. We also got a glimpse of the latest Live Labs project: <a href="http://www.getpivot.com/">Pivot</a> – a tool for visually searching and organising data from large datasets. It’s a wonderful demonstration of Seadragon integration. </p>  <p>Day 2 keynotes saw a focus on Windows 7 – building up strongly differentiated applications is key to Microsoft’s success here – and Steven Sinofsky took to the stage with some remarkable statistics around the development of this product. Over 800,000 applications were compatibility tested, and 500,000,000 pieces of telemetry data were received from the CTP and beta releases. It’s a staggering piece of engineering involving thousands of developers – and the progress of Windows 7 can be read over at the <a href="http://blogs.msdn.com/e7/">Engineering Windows 7 blog</a>. We also got a peek at IE9, which was only a couple of weeks old. Key changes at this early stage include a massive increase in rendering performance, and some wonderful use of the DirectX platform to ensure smooth and performant display.</p>  <p>Next, enter Scott Guthrie, who wowed the audience by announcing the beta of SilverLight 4 – less than six months after SilverLight 3 went live. A full list of improvements can be seen on the <a href="http://silverlight.net/getstarted/silverlight-4-beta/#whatsnew">SilverLight team blog</a>, but highlights include:</p>  <p>· A full set of visual form controls, and Visual Studio 2010 tooling support</p>  <p>· Printing and localisation support</p>  <p>· Multi-touch support</p>  <p>· Trusted application support – allowing COM automation and full desktop integration</p>  <p>So, what of the rest of the sessions? Really, there were too many to mention, but a couple of off-the-beaten track highlights for me included </p>  <p>· DryadLINQ – scalable search for distributed datasets</p>  <p>· Convergence of Windows 7 touch and the Surface touch APIs</p>  <p>· UML tooling support in Visual Studio 2010</p>  <p>· A debate on the Future of Programming (Don Box prediction – EMACs won’t be going away soon!)</p>  <p>Oh – and what of the “goods” this year? Well, the conference exceeded last year by giving attendees a whole <i>laptop</i>! A snappy little Acer touch-enabled tablet in a very cool PDC box – how cool is that?</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/PDC2009_8BDF/clip_image002_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/PDC2009_8BDF/clip_image002_2.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image002" border="0" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/PDC2009_8BDF/clip_image002_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/PDC2009_8BDF/clip_image002_thumb.jpg" width="167" height="244" /></a></p>  <p>Where to find out more?</p>  <p>The good news is that the whole conference is available online, broken down into ppts, webcasts and streaming media (indeed <i>smooth</i> streaming media) – check out <a href="http://www.microsoftpdc.com">http://www.microsoftpdc.com</a>. However, here are some links to the tech I’ve mentioned above:</p>  <p>· <a href="http://microsoftpdc.com/Sessions/KEY01">Day 1 Keynote</a></p>  <p>· <a href="http://microsoftpdc.com/Sessions/KEY02">Day 2 Keynote</a></p>  <p>· <a href="http://microsoftpdc.com/Sessions/P09-03">A Lap around Windows Azure</a></p>  <p>· <a href="http://microsoftpdc.com/Sessions/SVC20">Bridging the Gap from on Premises to the Cloud</a></p>  <p>· <a href="http://microsoftpdc.com/Sessions/SVC52">SQL Azure</a></p>  <p>· <a href="http://microsoftpdc.com/Sessions/SVC29">Microsoft Project Codename Dallas</a></p>  <p>· <a href="http://microsoftpdc.com/Sessions/SVR17">DryadLINQ</a></p>  <p>· <a href="http://microsoftpdc.com/Sessions/FT52">The Future of Programming</a></p>  <p>· <a href="http://microsoftpdc.com/Sessions/FT20">F# Parallel and Asynchronous Programming</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Life as an Intern (Laura Blackmore)</title>
      <link>https://docs.microsoft.com/archive/blogs/ukstudentzine/life-as-an-intern-laura-blackmore</link>
      <pubDate>Fri, 11 Dec 2009 08:37:09 GMT</pubDate>
      <dc:creator><![CDATA[edunhill]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ukstudentzine/2009/12/11/life-as-an-intern-laura-blackmore/</guid>
      <description><![CDATA[My role at Microsoft revolves around many of the skills I have learnt throughout my two years at...]]></description>
      <content:encoded><![CDATA[<p>My role at Microsoft revolves around many of the skills I have learnt throughout my two years at university. I first started Liverpool John Moores University in 2007 without any courses in mind. I decided to study BSc (Hons) Business Information Systems as it looked to be quite varied. My first year involved Networking studies, Problem Resolving, Stocks &amp; Shares Management &amp; various other modules around computer hardware maintenance and also business and ICT Skills. I then went into my second year with a broad range of skills which I wanted to enhance and so had the opportunity to take two Microsoft Certified courses in Windows Server 2000 implementation and also SQL Server 2005 Management. I took these courses along with other modules including Web Design and Database Management. I then started my internship at Microsoft initially being hired for a Business Analyst job within the Sales Excellence team for the Enterprise &amp; Partner Group. This deals with the analytics of the sales data derived from some of the big contract Microsoft has with its partners such as the government and the NHS. My sector lies within EMEA (Europe, Middle East &amp; Asia) and the analysing reports can be companies from any of these countries.</p>  <p>So far in my role I have been involved with the editing of the EPG SharePoint which is the internal workspace for file sharing and news press amongst the team. It is used internally for the posting of necessary reports and relevant documentation for the whole of EPG. I have also pulled together reports to analyse how much of the sales data is derived from each product Microsoft sells. I am also involved in a Bid Management project along with the Licensing team which enables me to put together proposals to be sent to big companies in order to win their contract. I am also responsible for the EPG weekly newsletter and send this out across the team including industry news, cross company news, upcoming events, and any win stories from each sector.</p>  <p>Whilst at Microsoft I have the opportunity to complete Certified Application courses for free as part of my employment, so far I have taken up all of the Licensing Fundamentals courses which enables me to be a Licensing Specialist, I can then go on to be licensing Engineer – allowing me to move across to the Licensing Team and work customer facing. I have also completed all the necessary Office Application Specialist exams, meaning I am a certified specialist in Office applications. I am also going to upgrade my university certificates and become an engineer in SQL Server 2008 and Windows Server 2005 allowing me to go into companies and implement this software; I also have a developing background and can then use this to develop coding for these applications.</p>]]></content:encoded>
    </item>
    <item>
      <title>Bing Maps</title>
      <link>https://docs.microsoft.com/archive/blogs/ukstudentzine/bing-maps</link>
      <pubDate>Fri, 11 Dec 2009 08:34:14 GMT</pubDate>
      <dc:creator><![CDATA[edunhill]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ukstudentzine/2009/12/11/bing-maps/</guid>
      <description><![CDATA[Microsoft recently launched the new beta Silverlight version of Bing Maps. Merging a whole range of...]]></description>
      <content:encoded><![CDATA[<p>Microsoft recently launched the new beta <a href="http://silverlight.net">Silverlight</a> version of Bing Maps. Merging a whole range of technologies, there’s now some really cool stuff available in Bing Maps! From satellite view to Streetside to Photosynth, Bing Maps has it all!</p>  <h5>User Interface</h5>  <p>With the new Bing Maps, the user interface has changed quite a lot. It’s now cleaner, more responsive and much richer than the AJAX version. This is because the beta version of Bing Maps is now using Silverlight. Because of this, the experience is now much more intuitive and a lot more user friendly, offering a seamless experience and great immersion.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image002_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image002_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image002_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image002_thumb.jpg" width="244" height="157" /></a></p>  <h5>Streetside</h5>  <p>Bing Maps now offers multiple view modes. Streetside is one of these new view modes.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image004_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image004_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image004" border="0" alt="clip_image004" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image004_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image004_thumb.jpg" width="244" height="154" /></a></p>  <p>Streetside is a collection of ground level photographs that are stitched together to create an immersive experience at street level. It allows a full 360 panoramic view of the street, along with the ability to zoom in and out of locations. The mini map displays where abouts on the map you actually are, along with facing direction and street information. </p>  <h5>Enhanced Birdseye</h5>  <p>Enhanced Birdseye is the traditional Birdseye view with a twist. As we’re now using Silverlight 3, we have more tools at our disposal. As such, we now have “urban-view” and “non-urban-view”.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image006_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image006_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image006" border="0" alt="clip_image006" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image006_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image006_thumb.jpg" width="244" height="157" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image008_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image008_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image008" border="0" alt="clip_image008" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image008_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image008_thumb.jpg" width="244" height="156" /></a></p>  <h5>Photosynth</h5>  <p><a href="http://photosynth.net/about.aspx">Photosynth</a> allows you to take a bunch of photos of the same scene or object and automagically stitch them all together into one big interactive 3D viewing experience that you can share with anyone on the web. </p>  <p>Bing Maps adds functionality to add custom Photosynth’s to landmarks and places. To view a Photosynth, you just click on the green blob, click Dive In and you’ll zoom straight in to the Photosynth. Here’s one someone in the office threw together and put up on Bing Maps!</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image010_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image010_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image010" border="0" alt="clip_image010" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image010_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image010_thumb.jpg" width="244" height="157" /></a></p>  <h5>What’s Nearby</h5>  <p>With Bing Maps, you can zoom in to the location you want and check for nearby services, such as cinemas, restaurants and hotels.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image012_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image012_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image012" border="0" alt="clip_image012" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image012_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image012_thumb.jpg" width="244" height="156" /></a></p>  <h5>Integrated Controls</h5>  <p>There’s also other integrated information in the left hand side of the map, including Weather, Images, Directions and traffic information – all easy to access and at a glance!</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image014_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image014_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image014" border="0" alt="clip_image014" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image014_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image014_thumb.jpg" width="244" height="151" /></a></p>  <h5>Applications</h5>  <p>With the new Bing Maps, there is also a variety of integrated applications within Bing Maps. </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image016_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image016_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image016" border="0" alt="clip_image016" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image016_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image016_thumb.jpg" width="244" height="137" /></a></p>  <p>This includes geo-tagged tweets – you can see who’s tweeting near you and what they’re tweeting! A great feature for organizing your Tweetups and Twestivals!</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image018_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image018_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image018" border="0" alt="clip_image018" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image018_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/BingMaps_E851/clip_image018_thumb.jpg" width="244" height="156" /></a></p>  <h5>Want to try it?</h5>  <p>If you want to try it out, just point your browser to <a href="http://www.bing.com/maps/explore/">http://www.bing.com/maps/explore/</a> and check out all the new features for yourself!</p>]]></content:encoded>
    </item>
    <item>
      <title>Life as an Intern (Colin Davies)</title>
      <link>https://docs.microsoft.com/archive/blogs/ukstudentzine/life-as-an-intern-colin-davies</link>
      <pubDate>Tue, 17 Nov 2009 09:46:12 GMT</pubDate>
      <dc:creator><![CDATA[edunhill]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ukstudentzine/2009/11/17/life-as-an-intern-colin-davies/</guid>
      <description><![CDATA[My name is Colin Davies and I am currently on placement at Microsoft as a Marketing Project Manager....]]></description>
      <content:encoded><![CDATA[<p>My name is Colin Davies and I am currently on placement at Microsoft as a Marketing Project Manager. Around now a lot of you will be thinking about getting applications in for either placements or grad roles so I have been asked by the lovely editor of this newsletter to give you a little insight of what I am doing at Microsoft and what you could expect to be doing if you got a job at Microsoft.&#160; </p>  <p>I work in the Server department marketing software that allows data to come alive. My main focus is on a product called <a href="http://www.dreamspark.com">SQL Server</a>, it is a database tool that turns data into information and allows you to manage that information in order to make use of it. One of the most recent projects I finished was working with another member in my team to organise an event for the people who already use SQL to demonstrate the new features they can expect from the next release. With 600 people invited to the event the responsibility that came with helping to organise the event was no intern admin job, I was a fully-fledged member of the team!&#160;&#160;&#160; </p>  <p>My long term project for the year is to reduce the leakage and increase the return on investment of marketing spends. The first part of this is to have a set procedure of how marketing generated leads are dealt with by our sales force. However in investigating the current process and the frustrations this provides varying stakeholders it has proved not to be an easy task. Challenges are good though; with the support of the team I have around me here at Microsoft I’m sure we’ll get there in the end.</p>  <p>One great thing we get at Microsoft is to have access to a lot of new technology. Windows 7 is one of them. We’ve been using it during the Beta stage but in case you haven’t upgraded yet have a look at the following website, with your .ac.uk email address you can get it for 90% discount, that’s only £30! </p>  <p><a href="http://www.ultimatesteal.co.uk/student11">http://www.ultimatesteal.co.uk/student11</a></p>  <p>Good luck with the rest of your degree and I hope the applications go well whether they are for internships or grad roles. </p>  <p>Take it easy, Colin&#160;&#160;&#160; </p>]]></content:encoded>
    </item>
    <item>
      <title>Silverlight – Gadgets, Web Slices and more! (Part 1)</title>
      <link>https://docs.microsoft.com/archive/blogs/ukstudentzine/silverlight-gadgets-web-slices-and-more-part-1</link>
      <pubDate>Tue, 17 Nov 2009 09:45:01 GMT</pubDate>
      <dc:creator><![CDATA[edunhill]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ukstudentzine/2009/11/17/silverlight-gadgets-web-slices-and-more-part-1/</guid>
      <description><![CDATA[There’s a lot of cool things you can do with Silverlight. This new series will introduce you to some...]]></description>
      <content:encoded><![CDATA[<p>There’s a lot of cool things you can do with Silverlight. This new series will introduce you to some of them, including parameters, OutOfBrowser, Gadgets and more. In this part, we’ll be discussing passing parameters in to an application to inform the application of where it is running – be it browser, OutOfBrowser, WebSlice or Gadget! So let’s get started:</p>  <p>Create a new Silverlight application:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandmorePart1_F990/clip_image002_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandmorePart1_F990/clip_image002_2.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image002" border="0" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandmorePart1_F990/clip_image002_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandmorePart1_F990/clip_image002_thumb.jpg" width="244" height="175" /></a></p>  <p>After this screen, you will be asked if you want to host this in a new Web Site – host is in a new ASP.NET web project and click OK:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandmorePart1_F990/clip_image003_2.png" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandmorePart1_F990/clip_image003_2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image003" border="0" alt="clip_image003" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandmorePart1_F990/clip_image003_thumb.png" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandmorePart1_F990/clip_image003_thumb.png" width="244" height="147" /></a></p>  <p>Now we have a project to work with, we need to add our basic framework to allow the application to know where it’s being run from. The way we do this is with parameters that are passed from HTML to the Silverlight application. </p>  <p>Let’s start with the Silverlight code. First, we need to allow our project to get the Parameters from the HTML file. Open up your App.xaml.cs file and go to the Application_Startup function. Before the line “this.RootVisual = new MainPage();”, add the following code so that your Application_Startup function looks like this:</p>  <p><font face="Courier New">private void Application_Startup(object sender, StartupEventArgs e)</font></p>  <p><font face="Courier New">{</font></p>  <p><font face="Courier New">if (e.InitParams != null)</font></p>  <p><font face="Courier New">{</font></p>  <p><font face="Courier New">foreach (var item in e.InitParams)</font></p>  <p><font face="Courier New">{</font></p>  <p><font face="Courier New">this.Resources.Add(item.Key, item.Value);</font></p>  <p><font face="Courier New">}</font></p>  <p><font face="Courier New">}</font></p>  <p><font face="Courier New">this.RootVisual = new MainPage();</font></p>  <p><font face="Courier New">}</font></p>  <p>Now we have the code to read the parameters from the HTML page and add them to our Silverlight resources dictionary, we need to add some code to make sure the MainPage has fully loaded before trying to read the parameters. The way we do this, is to add an event handler to the MainPage, so that when it has fully loaded, it calls our loaded function. Add the following lines of code so that your MainPage() function looks like the following:</p>  <p><font face="Courier New">public MainPage()</font></p>  <p><font face="Courier New">{</font></p>  <p><font face="Courier New">InitializeComponent();</font></p>  <p><font face="Courier New">this.Loaded += new RoutedEventHandler(MainPage_Loaded);</font></p>  <p><font face="Courier New">}</font></p>  <p>Add the following function also, for the event handler:</p>  <p><font face="Courier New">void MainPage_Loaded(object sender, RoutedEventArgs e)</font></p>  <p><font face="Courier New">{</font></p>  <p><font face="Courier New">throw new NotImplementedException();</font></p>  <p><font face="Courier New">}</font></p>  <p>Now that we have the parameters being added to the global dictionary, we can start to use them in our code. So, for this project, we’re going to use an environment key that will allow us to get some information about the environment the Silverlight application is running from. </p>  <p>Let’s go to our MainPage.xaml and add a simple button:</p>  <p><font face="Courier New">&lt;UserControl x:Class=&quot;StudentZine.MainPage&quot;</font></p>  <p><font face="Courier New">xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot; </font></p>  <p><font face="Courier New">xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</font></p>  <p><font face="Courier New">xmlns:d=&quot;http://schemas.microsoft.com/expression/blend/2008&quot; xmlns:mc=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot; </font></p>  <p><font face="Courier New">mc:Ignorable=&quot;d&quot; d:DesignWidth=&quot;640&quot; d:DesignHeight=&quot;480&quot;&gt;</font></p>  <p><font face="Courier New">&lt;Grid x:Name=&quot;LayoutRoot&quot;&gt;</font></p>  <p><font face="Courier New">&lt;Button x:Name=&quot;ClickMe&quot; Content=&quot;ClickMe&quot; /&gt;</font></p>  <p><font face="Courier New">&lt;/Grid&gt;</font></p>  <p><font face="Courier New">&lt;/UserControl&gt;</font></p>  <p>For this project, we’ll just change the button to display the text of whatever environment we’re in. In the MainPage.xaml, in the MainPage_Loaded function, delete the current line of code for the not implemented exception and add the following code:</p>  <p><font face="Courier New">void MainPage_Loaded(object sender, RoutedEventArgs e)</font></p>  <p><font face="Courier New">{</font></p>  <p><font face="Courier New">string Environment = App.Current.Resources[&quot;environment&quot;].ToString();</font></p>  <p><font face="Courier New">string ButtonText = &quot;&quot;;</font></p>  <p><font face="Courier New">switch (Environment)</font></p>  <p><font face="Courier New">{</font></p>  <p><font face="Courier New">case &quot;Gadget&quot;:</font></p>  <p><font face="Courier New">ButtonText = &quot;Gadget&quot;;</font></p>  <p><font face="Courier New">break;</font></p>  <p><font face="Courier New">case &quot;WebSlice&quot;:</font></p>  <p><font face="Courier New">ButtonText = &quot;WebSlice&quot;;</font></p>  <p><font face="Courier New">break;</font></p>  <p><font face="Courier New">default:</font></p>  <p><font face="Courier New">ButtonText = &quot;Browser&quot;;</font></p>  <p><font face="Courier New">break;</font></p>  <p><font face="Courier New">}</font></p>  <p><font face="Courier New">if (App.Current.IsRunningOutOfBrowser)</font></p>  <p><font face="Courier New">ButtonText = &quot;Out Of Browser&quot;;</font></p>  <p><font face="Courier New">ClickMe.Content = ButtonText;</font></p>  <p><font face="Courier New">}</font></p>  <p>So let’s break this down – the Environment string is storing the value of the “environment” key in our global dictionary. This is the string that will be passed in through the parameters. We then have a select case, where it checks if it has a Gadget or WebSlice value. If so, it sets it to the appropriate value. Otherwise, it assumes it’s in the web browser. The last line of code checks if the application is installed and running out of browser.</p>  <p>On this note, to add OutOfBrowser functionality, right click the Silverlight project and go to properties. Check Enable Running Out Of Browser:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandmorePart1_F990/clip_image005_2.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandmorePart1_F990/clip_image005_2.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image005" border="0" alt="clip_image005" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandmorePart1_F990/clip_image005_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/SilverlightGadgetsWebSlicesandmorePart1_F990/clip_image005_thumb.jpg" width="244" height="204" /></a></p>  <p>That’s it for our Silverlight code! Now we just need to add some html pages to our web project. For this part of the series, we’ll be covering simply passing in some parameters using the HTML page we already have. So let’s have a look at that code. Open the TestPage.aspx file and add the following line to your Silverlight object code:</p>  <p><font face="Courier New">&lt;param name=”initParams” value=”environment=Gadget” /&gt;</font></p>  <p><font face="Courier New">So your code should now look like:</font></p>  <p><font face="Courier New">&lt;div id=&quot;silverlightControlHost&quot;&gt;</font></p>  <p><font face="Courier New">&lt;object data=&quot;data:application/x-silverlight-2,&quot; type=&quot;application/x-silverlight-2&quot; width=&quot;100%&quot; height=&quot;100%&quot;&gt;</font></p>  <p><font face="Courier New">&lt;param name=&quot;source&quot; value=&quot;ClientBin/StudentZine.xap&quot;/&gt;</font></p>  <p><font face="Courier New">&lt;param name=&quot;initParams&quot; value=&quot;environment=Gadget&quot; /&gt;</font></p>  <p><font face="Courier New">&lt;param name=&quot;onError&quot; value=&quot;onSilverlightError&quot; /&gt;</font></p>  <p><font face="Courier New">&lt;param name=&quot;background&quot; value=&quot;white&quot; /&gt;</font></p>  <p><font face="Courier New">&lt;param name=&quot;minRuntimeVersion&quot; value=&quot;3.0.40624.0&quot; /&gt;</font></p>  <p><font face="Courier New">&lt;param name=&quot;autoUpgrade&quot; value=&quot;true&quot; /&gt;</font></p>  <p><font face="Courier New">&lt;a href=&quot;http://go.microsoft.com/fwlink/?LinkID=149156&amp;v=3.0.40624.0&quot; style=&quot;text-decoration:none&quot;&gt;</font></p>  <p><font face="Courier New">&lt;img src=&quot;http://go.microsoft.com/fwlink/?LinkId=108181&quot; alt=&quot;Get Microsoft Silverlight&quot; style=&quot;border-style:none&quot;/&gt;</font></p>  <p><font face="Courier New">&lt;/a&gt;</font></p>  <p><font face="Courier New">&lt;/object&gt;&lt;iframe id=&quot;_sl_historyFrame&quot; style=&quot;visibility:hidden;height:0px;width:0px;border:0px&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;</font></p>  <p>And that’s all there is to passing in parameters to a Silverlight application! Next time, we’ll be looking at adding to this project to create an IE8 Web Slice using the same Silverlight code as the Browser piece, as well as fleshing out the application to be something a little more interesting!</p>]]></content:encoded>
    </item>
    <item>
      <title>Azure Applications (Explained)</title>
      <link>https://docs.microsoft.com/archive/blogs/ukstudentzine/azure-applications-explained</link>
      <pubDate>Mon, 28 Sep 2009 07:34:14 GMT</pubDate>
      <dc:creator><![CDATA[edunhill]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ukstudentzine/2009/09/28/azure-applications-explained/</guid>
      <description><![CDATA[&#160;     What is Windows Azure?          Windows Azure is a cloud computing platform. It...]]></description>
      <content:encoded><![CDATA[<p style="text-align: center" class="MsoNormal" align="center"><b style="mso-bidi-font-weight: normal">     <p>&#160;</p>   </b></p>  <p class="MsoNormal"><b style="mso-bidi-font-weight: normal">What is Windows Azure?     <p></p>   </b></p>  <p class="MsoNormal">Windows Azure is a cloud computing platform. It allows the deployment of cloud based applications that are managed at Microsoft datacenters.   <p></p> </p>  <p class="MsoNormal"><b style="mso-bidi-font-weight: normal">How do I get Azure?     <p></p>   </b></p>  <p class="MsoNormal">In order to start building Azure applications, you need to have Visual Studio 2008 or higher to install the SDK and tools.   <p></p> </p>  <p class="MsoNormal">Windows Azure SDK and tools: <a href="http://go.microsoft.com/fwlink/?LinkId=128752">http://go.microsoft.com/fwlink/?LinkId=128752</a>     <p></p> </p>  <p class="MsoNormal">In order for Azure to install correctly, you may need to enable IIS 7.0 ASP.NET application development components – you will receive an error if you have it disabled. To enable it, go to Control Panel -&gt; Programs -&gt; Programs and Features - &gt; Turn Windows Features On or Off.   <p></p> </p>  <p class="MsoNormal"><span style="mso-fareast-language: en-gb; mso-no-proof: yes"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image002_4.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image002_4.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image002" border="0" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image002_thumb_1.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image002_thumb_1.jpg" width="244" height="214" v:shapes="Picture_x0020_4" /></a></span>    <br />Enable Windows Communication Foundation HTTP Activation.    <p></p> </p>  <p class="MsoNormal"><span style="mso-fareast-language: en-gb; mso-no-proof: yes"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image004_4.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image004_4.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image004" border="0" alt="clip_image004" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image004_thumb_1.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image004_thumb_1.jpg" width="244" height="214" v:shapes="Picture_x0020_7" /></a></span>    <br />Enable IIS -&gt; WWWS -&gt; ASP.NET and CGI.    <p></p> </p>  <p class="MsoNormal"><b style="mso-bidi-font-weight: normal">Building Your First Azure Application     <p></p>   </b></p>  <p class="MsoNormal">Now you have the runtime and fabric installed, we can build our first application! To begin with, create a new Cloud Service project:   <p></p> </p>  <p class="MsoNormal"><span style="mso-fareast-language: en-gb; mso-no-proof: yes"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image006_4.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image006_4.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image006" border="0" alt="clip_image006" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image006_thumb_1.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image006_thumb_1.jpg" width="244" height="170" v:shapes="Picture_x0020_1" /></a></span>    <p></p> </p>  <p class="MsoNormal">Next, you’ll get a screen asking you about Web and Worker roles. These are the types of applications you can create with Windows Azure. Web roles act as your web user interface (ASP.NET) and the worker role is a console application that deals with intensive background processing. For our demo, go ahead and add a Web Role and a Worker Role.   <p></p> </p>  <p class="MsoNormal"><span style="mso-fareast-language: en-gb; mso-no-proof: yes"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image008_4.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image008_4.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image008" border="0" alt="clip_image008" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image008_thumb_1.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image008_thumb_1.jpg" width="244" height="154" v:shapes="_x0000_i1028" /></a></span>    <p></p> </p>  <p class="MsoNormal">Now we have our Azure solution, we can start building the application. One great thing about the Windows Azure Platform Kit is that is comes with a solution that allows you to immediately make use of Tables, Queues and Blobs. Add the StorageClient solution (found with the Platform Kit) to your project.   <p></p> </p>  <p class="MsoNormal"><span style="mso-fareast-language: en-gb; mso-no-proof: yes"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image010_4.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image010_4.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image010" border="0" alt="clip_image010" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image010_thumb_1.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image010_thumb_1.jpg" width="167" height="244" v:shapes="_x0000_i1029" /></a></span>    <p></p> </p>  <p class="MsoNormal">   <p>&#160;</p> </p>  <p class="MsoNormal">Now that we have our solution setup, we need to configure the ServiceConfiguration.cscfg and the ServiceDefinition.csdef.<span style="mso-spacerun: yes">&#160; </span>Open the ServiceConfiguration.cscfg and change it to look like the following:    <p></p> </p>  <p class="MsoNormal">&lt;?xml version=&quot;1.0&quot;?&gt;   <p></p> </p>  <p class="MsoNormal">&lt;ServiceConfiguration serviceName=&quot;StudentZineApp&quot; xmlns=&quot;http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration&quot;&gt;   <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160; </span>&lt;Role name=&quot;StudentZineWebRole&quot;&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>&lt;Instances count=&quot;1&quot; /&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>&lt;ConfigurationSettings&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160; </span>&lt;Setting name=&quot;QueueStorageEndpoint&quot; value=&quot;http://127.0.0.1:10001&quot;/&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160; </span>&lt;Setting name=&quot;AccountName&quot; value=&quot;devstoreaccount1&quot;/&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160; </span>&lt;Setting name=&quot;AccountSharedKey&quot; value=&quot;Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==&quot;/&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>&lt;/ConfigurationSettings&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160; </span>&lt;/Role&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160; </span>&lt;Role name=&quot;StudentZineWorkerRole&quot;&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>&lt;Instances count=&quot;1&quot; /&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>&lt;ConfigurationSettings&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160; </span>&lt;Setting name=&quot;QueueStorageEndpoint&quot; value=&quot;http://127.0.0.1:10001&quot;/&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160; </span>&lt;Setting name=&quot;AccountName&quot; value=&quot;devstoreaccount1&quot;/&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160; </span>&lt;Setting name=&quot;AccountSharedKey&quot; value=&quot;Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==&quot;/&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>&lt;/ConfigurationSettings&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160; </span>&lt;/Role&gt;    <p></p> </p>  <p class="MsoNormal">&lt;/ServiceConfiguration&gt;   <p></p> </p>  <p class="MsoNormal"><span style="mso-bidi-font-family: calibri">If you were accepted on to the CTP for Windows Azure and have an account, you can replace the AccountName and AccountSharedKey with your own details and deploy it to your Azure account. After you have configured the ServiceConfiguration.cscfg, you need to configure the ServiceDefinition.csdef to look like the following:     <p></p>   </span></p>  <p class="MsoNormal">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;   <p></p> </p>  <p class="MsoNormal">&lt;ServiceDefinition name=&quot;StudentZineApp&quot; xmlns=&quot;http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition&quot;&gt;   <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160; </span>&lt;WebRole name=&quot;StudentZineWebRole&quot; enableNativeCodeExecution=&quot;false&quot;&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>&lt;InputEndpoints&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160; </span>&lt;!-- Must use port 80 for http and port 443 for https when running in the cloud --&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160; </span>&lt;InputEndpoint name=&quot;HttpIn&quot; protocol=&quot;http&quot; port=&quot;80&quot; /&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>&lt;/InputEndpoints&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>&lt;ConfigurationSettings&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160; </span>&lt;Setting name=&quot;QueueStorageEndpoint&quot;/&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160; </span>&lt;Setting name=&quot;AccountName&quot;/&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160; </span>&lt;Setting name=&quot;AccountSharedKey&quot;/&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>&lt;/ConfigurationSettings&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160; </span>&lt;/WebRole&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160; </span>&lt;WorkerRole name=&quot;StudentZineWorkerRole&quot; enableNativeCodeExecution=&quot;false&quot;&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>&lt;ConfigurationSettings&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160; </span>&lt;Setting name=&quot;QueueStorageEndpoint&quot;/&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160; </span>&lt;Setting name=&quot;AccountName&quot;/&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160; </span>&lt;Setting name=&quot;AccountSharedKey&quot;/&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>&lt;/ConfigurationSettings&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160; </span>&lt;/WorkerRole&gt;    <p></p> </p>  <p class="MsoNormal">&lt;/ServiceDefinition&gt;</p>  <p class="MsoNormal"><span style="mso-bidi-font-family: calibri">     <p>&#160;</p>   </span></p>  <p class="MsoNormal"><span style="mso-bidi-font-family: calibri">Configuration is out of the way! Now what about the application? We’re going to create a simple application that allows you to enter some text on the WebRole ASP.NET page, adds that to the queue and then the worker role is going to process the information from that queue and output it to the development fabric! Sounds easy, right? So let’s begin!     <p></p>   </span></p>  <p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="mso-bidi-font-family: calibri">Creating the ASP.NET page       <p></p>     </span></b></p>  <p class="MsoNormal"><span style="mso-bidi-font-family: calibri">Open the default.aspx pagein the StudentZineWebRole solution. Add an &lt;asp:TextBox&gt; control and an &lt;asp:Button&gt; control. Label these txtMessage and btnSubmit.     <p></p>   </span></p>  <p class="MsoNormal"><span style="background: yellow; mso-highlight: yellow">&lt;%</span>@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeBehind=&quot;Default.aspx.cs&quot; Inherits=&quot;StudentZineWebRole._Default&quot; <span style="background: yellow; mso-highlight: yellow">%&gt;</span>    <p></p> </p>  <p class="MsoNormal">   <p>&#160;</p> </p>  <p class="MsoNormal">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;   <p></p> </p>  <p class="MsoNormal">&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &gt;   <p></p> </p>  <p class="MsoNormal">&lt;head runat=&quot;server&quot;&gt;   <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>&lt;title&gt;&lt;/title&gt;    <p></p> </p>  <p class="MsoNormal">&lt;/head&gt;   <p></p> </p>  <p class="MsoNormal">&lt;body&gt;   <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>&lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>&lt;div&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>&lt;asp:TextBox ID=&quot;txtMessage&quot; runat=&quot;server&quot; /&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>&lt;asp:Button ID=&quot;btnSubmit&quot; runat=&quot;server&quot; Text=&quot;Submit&quot; /&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>&lt;/div&gt;    <p></p> </p>  <p class="MsoNormal"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span>&lt;/form&gt;    <p></p> </p>  <p class="MsoNormal">&lt;/body&gt;   <p></p> </p>  <p class="MsoNormal">&lt;/html&gt;</p>  <p class="MsoNormal">   <p></p> </p>  <p class="MsoNormal"><span style="mso-bidi-font-family: calibri">Now we’ve added our controls, we need to add some logic to take the submitted data and add that to the queue. Open up the Default.aspx.cs file. First, we need to add our StorageClient using namespace. To do this, right-click References -&gt; Add<span style="mso-spacerun: yes">&#160; </span>Reference...       <p></p>   </span></p>  <p class="MsoNormal"><span style="mso-fareast-language: en-gb; mso-no-proof: yes; mso-bidi-font-family: calibri"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image012_4.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image012_4.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image012" border="0" alt="clip_image012" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image012_thumb_1.jpg" original-url="http://blogs.msdn.com/blogfiles/ukstudentzine/WindowsLiveWriter/AzureApplicationsExplained_B064/clip_image012_thumb_1.jpg" width="244" height="207" v:shapes="Picture_x0020_10" /></a></span><span style="mso-bidi-font-family: calibri">     <p></p>   </span></p>  <p class="MsoNormal"><span style="mso-bidi-font-family: calibri">Add this line of code to your using namespace directive:     <p></p>   </span></p>  <p class="MsoNormal"><span style="line-height: 115%; font-family: consolas; color: blue; font-size: 9.5pt">using</span><span style="line-height: 115%; font-family: consolas; font-size: 9.5pt"> Microsoft.Samples.ServiceHosting.StorageClient;     <p></p>   </span></p>  <p class="MsoNormal"><span style="mso-bidi-font-family: calibri">On the design page, double-click the button control. This will bring up the code behind with a function called btnSubmit_Click(). In that function, add the following line so that the function looks like the following:     <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: blue; font-size: 9.5pt">protected</span><span style="font-family: consolas; font-size: 9.5pt"> <span style="color: blue">void</span> btnSubmit_Click(<span style="color: blue">object</span> sender, <span style="color: #2b91af">EventArgs</span> e)      <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">{     <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: #2b91af; font-size: 9.5pt">StorageAccountInfo</span><span style="font-family: consolas; font-size: 9.5pt"> account = <span style="color: #2b91af">StorageAccountInfo</span>.GetDefaultQueueStorageAccountFromConfiguration();      <p></p>   </span></p>  <p class="MsoNormal"><span style="line-height: 115%; font-family: consolas; font-size: 9.5pt">}     <p></p>   </span></p>  <p class="MsoNormal"><span style="mso-bidi-font-family: calibri">This initializes the account information and uses the configuration information you provided previously. Now, you need to create the queue. This is a simple if statement to check if the queue is already there:     <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: #2b91af; font-size: 9.5pt">QueueStorage</span><span style="font-family: consolas; font-size: 9.5pt"> service = <span style="color: #2b91af">QueueStorage</span>.Create(account);      <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">     <p>&#160;</p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: #2b91af">MessageQueue</span> queue = service.GetQueue(<span style="color: #a31515">&quot;messages&quot;</span>);      <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">     <p>&#160;</p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color: blue">if</span> (!queue.DoesQueueExist())      <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160; </span>{      <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="mso-tab-count: 1">&#160;&#160;&#160;&#160;&#160;&#160; </span>queue.CreateQueue();      <p></p>   </span></p>  <p class="MsoNormal"><span style="line-height: 115%; font-family: consolas; font-size: 9.5pt"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160; </span>}      <p></p>   </span></p>  <p class="MsoNormal"><span style="mso-bidi-font-family: calibri">Now that we have a queue, we need to add things to it. To do this, add the following lines of code within the same function:     <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: #2b91af; font-size: 9.5pt">Message</span><span style="font-family: consolas; font-size: 9.5pt"> msg = <span style="color: blue">new</span> <span style="color: #2b91af">Message</span>(txtMessage.Text);      <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160; </span>queue.PutMessage(msg);      <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">     <p>&#160;</p>   </span></p>  <p class="MsoNormal"><span style="line-height: 115%; font-family: consolas; font-size: 9.5pt"><span style="mso-spacerun: yes">&#160;&#160;&#160;&#160;&#160;&#160; </span>txtMessage.Text = <span style="color: blue">string</span>.Empty;      <p></p>   </span></p>  <p class="MsoNormal"><span style="mso-bidi-font-family: calibri">This takes the information from the Textbox control and puts this on to the queue. It then empties the Textbox control text. Your completed function should now look like this:     <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: blue; font-size: 9.5pt">protected</span><span style="font-family: consolas; font-size: 9.5pt"> <span style="color: blue">void</span> btnSubmit_Click(<span style="color: blue">object</span> sender, <span style="color: #2b91af">EventArgs</span> e)      <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">{     <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: #2b91af; font-size: 9.5pt">StorageAccountInfo</span><span style="font-family: consolas; font-size: 9.5pt"> account = <span style="color: #2b91af">StorageAccountInfo</span>.GetDefaultQueueStorageAccountFromConfiguration();      <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">     <p>&#160;</p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: #2b91af; font-size: 9.5pt">QueueStorage</span><span style="font-family: consolas; font-size: 9.5pt"> service = <span style="color: #2b91af">QueueStorage</span>.Create(account);      <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">     <p>&#160;</p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: #2b91af; font-size: 9.5pt">MessageQueue</span><span style="font-family: consolas; font-size: 9.5pt"> queue = service.GetQueue(<span style="color: #a31515">&quot;messages&quot;</span>);      <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">     <p>&#160;</p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: blue; font-size: 9.5pt">if</span><span style="font-family: consolas; font-size: 9.5pt"> (!queue.DoesQueueExist())     <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">{     <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin: 0cm 0cm 0pt 36pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">queue.CreateQueue();     <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">}     <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">     <p>&#160;</p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: #2b91af; font-size: 9.5pt">Message</span><span style="font-family: consolas; font-size: 9.5pt"> msg = <span style="color: blue">new</span> <span style="color: #2b91af">Message</span>(txtMessage.Text);      <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">queue.PutMessage(msg);     <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">     <p>&#160;</p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">txtMessage.Text = <span style="color: blue">string</span>.Empty;      <p></p>   </span></p>  <p class="MsoNormal"><span style="line-height: 115%; font-family: consolas; font-size: 9.5pt">}     <p></p>   </span></p>  <p class="MsoNormal"><span style="mso-bidi-font-family: calibri">Now that we have a queue and the ability to add items to that queue, we need to process them and report them to the development fabric. In the StudentZineWorkerRole solution, open up WorkerRole.cs and add the StorageClient reference in the same way you did for the WebRole.     <p></p>   </span></p>  <p class="MsoNormal"><span style="mso-bidi-font-family: calibri">For the WorkerRole, you’ll notice two functions. Start() and GetHealthStatus(). Start() works like the Main() function in normal console applications and GetHealthStatus() returns the current state of the WorkerRole. For this demonstration, you can delete all the code within the Start() function, so that it looks like the following:     <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: blue; font-size: 9.5pt">public</span><span style="font-family: consolas; font-size: 9.5pt"> <span style="color: blue">override</span> <span style="color: blue">void</span> Start()      <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">{     <p></p>   </span></p>  <p class="MsoNormal"><span style="line-height: 115%; font-family: consolas; font-size: 9.5pt">}     <p></p>   </span></p>  <p class="MsoNormal"><span style="mso-bidi-font-family: calibri">Similar to the WebRole, we need initialize our storage account. Add the following line to the Start() function:     <p></p>   </span></p>  <p style="text-indent: 36pt" class="MsoNormal"><span style="line-height: 115%; font-family: consolas; color: #2b91af; font-size: 9.5pt">StorageAccountInfo</span><span style="line-height: 115%; font-family: consolas; font-size: 9.5pt"> account = <span style="color: #2b91af">StorageAccountInfo</span>.GetDefaultQueueStorageAccountFromConfiguration();      <p></p>   </span></p>  <p class="MsoNormal"><span style="mso-bidi-font-family: calibri">Now we need to add some code to reference the queue we created in the WebRole:     <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: #2b91af; font-size: 9.5pt">QueueStorage</span><span style="font-family: consolas; font-size: 9.5pt"> service = <span style="color: #2b91af">QueueStorage</span>.Create(account);      <p></p>   </span></p>  <p style="text-indent: 36pt" class="MsoNormal"><span style="line-height: 115%; font-family: consolas; color: #2b91af; font-size: 9.5pt">MessageQueue</span><span style="line-height: 115%; font-family: consolas; font-size: 9.5pt"> queue = service.GetQueue(<span style="color: #a31515">&quot;messages&quot;</span>);      <p></p>   </span></p>  <p class="MsoNormal"><span style="mso-bidi-font-family: calibri">As you can see, it’s pulling the same queue, “messages”, that was created by our WebRole. Now that we have that, we need to pull the messages from the queue. We do this by creating an infinite loop to check the queue. Once we have a message in the queue, we pull that from the queue, report it and then delete it from the queue. Remember, queues work in a FIFO prioritisation!     <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: blue; font-size: 9.5pt">while</span><span style="font-family: consolas; font-size: 9.5pt"> (<span style="color: blue">true</span>)      <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">{     <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin: 0cm 0cm 0pt 36pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: #2b91af; font-size: 9.5pt">Thread</span><span style="font-family: consolas; font-size: 9.5pt">.Sleep(10000);     <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">     <p>&#160;</p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin: 0cm 0cm 0pt 36pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: blue; font-size: 9.5pt">if</span><span style="font-family: consolas; font-size: 9.5pt"> (queue.DoesQueueExist())     <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin: 0cm 0cm 0pt 36pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">{     <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin: 0cm 0cm 0pt 72pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: #2b91af; font-size: 9.5pt">Message</span><span style="font-family: consolas; font-size: 9.5pt"> msg = queue.GetMessage();     <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin: 0cm 0cm 0pt 36pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">     <p>&#160;</p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin: 0cm 0cm 0pt 72pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: blue; font-size: 9.5pt">if</span><span style="font-family: consolas; font-size: 9.5pt"> (msg != <span style="color: blue">null</span>)      <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin: 0cm 0cm 0pt 72pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">{     <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin: 0cm 0cm 0pt 108pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: #2b91af; font-size: 9.5pt">RoleManager</span><span style="font-family: consolas; font-size: 9.5pt">.WriteToLog(<span style="color: #a31515">&quot;Information&quot;</span>,      <p></p>   </span></p>  <p style="line-height: normal; margin: 0cm 0cm 0pt 144pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: blue; font-size: 9.5pt">string</span><span style="font-family: consolas; font-size: 9.5pt">.Format(<span style="color: #a31515">&quot;Message '{0}' processed.&quot;</span>, msg.ContentAsString()));      <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin: 0cm 0cm 0pt 108pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">queue.DeleteMessage(msg);     <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin: 0cm 0cm 0pt 72pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">}     <p></p>   </span></p>  <p style="line-height: normal; margin: 0cm 0cm 0pt 72pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">}     <p></p>   </span></p>  <p style="margin-left: 36pt" class="MsoNormal"><span style="line-height: 115%; font-family: consolas; font-size: 9.5pt">}     <p></p>   </span></p>  <p class="MsoNormal"><span style="mso-bidi-font-family: calibri">So now, you’re completed WorkerRole Start() function should look like the following:     <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: blue; font-size: 9.5pt">public</span><span style="font-family: consolas; font-size: 9.5pt"> <span style="color: blue">override</span> <span style="color: blue">void</span> Start()      <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">{     <p></p>   </span></p>  <p style="line-height: normal; margin: 0cm 0cm 0pt 36pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: #2b91af; font-size: 9.5pt">StorageAccountInfo</span><span style="font-family: consolas; font-size: 9.5pt"> account = <span style="color: #2b91af">StorageAccountInfo</span>.GetDefaultQueueStorageAccountFromConfiguration();      <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">     <p>&#160;</p>   </span></p>  <p style="line-height: normal; margin: 0cm 0cm 0pt 36pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: #2b91af; font-size: 9.5pt">QueueStorage</span><span style="font-family: consolas; font-size: 9.5pt"> service = <span style="color: #2b91af">QueueStorage</span>.Create(account);      <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: #2b91af; font-size: 9.5pt">MessageQueue</span><span style="font-family: consolas; font-size: 9.5pt"> queue = service.GetQueue(<span style="color: #a31515">&quot;messages&quot;</span>);      <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">     <p>&#160;</p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: blue; font-size: 9.5pt">while</span><span style="font-family: consolas; font-size: 9.5pt"> (<span style="color: blue">true</span>)      <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">{     <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin: 0cm 0cm 0pt 36pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: #2b91af; font-size: 9.5pt">Thread</span><span style="font-family: consolas; font-size: 9.5pt">.Sleep(10000);     <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">     <p>&#160;</p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin: 0cm 0cm 0pt 36pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: blue; font-size: 9.5pt">if</span><span style="font-family: consolas; font-size: 9.5pt"> (queue.DoesQueueExist())     <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin: 0cm 0cm 0pt 36pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">{     <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin: 0cm 0cm 0pt 72pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: #2b91af; font-size: 9.5pt">Message</span><span style="font-family: consolas; font-size: 9.5pt"> msg = queue.GetMessage();     <p></p>   </span></p>  <p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">     <p>&#160;</p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin: 0cm 0cm 0pt 72pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: blue; font-size: 9.5pt">if</span><span style="font-family: consolas; font-size: 9.5pt"> (msg != <span style="color: blue">null</span>)      <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin: 0cm 0cm 0pt 72pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">{     <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin: 0cm 0cm 0pt 108pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: #2b91af; font-size: 9.5pt">RoleManager</span><span style="font-family: consolas; font-size: 9.5pt">.WriteToLog(<span style="color: #a31515">&quot;Information&quot;</span>,      <p></p>   </span></p>  <p style="line-height: normal; margin: 0cm 0cm 0pt 144pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; color: blue; font-size: 9.5pt">string</span><span style="font-family: consolas; font-size: 9.5pt">.Format(<span style="color: #a31515">&quot;Message '{0}' processed.&quot;</span>, msg.ContentAsString()));      <p></p>   </span></p>  <p style="line-height: normal; text-indent: 36pt; margin: 0cm 0cm 0pt 108pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">queue.DeleteMessage(msg);     <p></p>   </span></p>  <p style="line-height: normal; margin: 0cm 0cm 0pt 108pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">}     <p></p>   </span></p>  <p style="line-height: normal; margin: 0cm 0cm 0pt 72pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">}     <p></p>   </span></p>  <p style="line-height: normal; margin: 0cm 0cm 0pt 36pt; mso-layout-grid-align: none" class="MsoNormal"><span style="font-family: consolas; font-size: 9.5pt">}     <p></p>   </span></p>  <p class="MsoNormal"><span style="line-height: 115%; font-family: consolas; font-size: 9.5pt">}     <p></p>   </span></p>  <p class="MsoNormal"><span style="mso-bidi-font-family: calibri">And that’s all there is to it! A fully working WebRole and WorkerRole communicating with a queue!     <p></p>   </span></p>]]></content:encoded>
    </item>
  </channel>
</rss>