<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Space Intentionally Left Blank</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/andy_sterland/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/andy_sterland/feed.xml</link>
    <description />
    <lastBuildDate>Tue, 16 Apr 2019 04:39:21 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Performance Tip #3: Setting Styles</title>
      <link>https://docs.microsoft.com/archive/blogs/andy_sterland/performance-tip-3-setting-styles</link>
      <pubDate>Sun, 20 Jun 2010 21:13:11 GMT</pubDate>
      <dc:creator><![CDATA[Andy_Sterland]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/andy_sterland/2010/06/20/performance-tip-3-setting-styles/</guid>
      <description><![CDATA[A common task to do in JavaScript is to change the appearance of elements dynamically.  There’s a...]]></description>
      <content:encoded><![CDATA[<p>A common task to do in JavaScript is to change the appearance of elements dynamically.</p>  <p>There’s a couple of ways of doing that:</p>  <p>1. Setting style properties in the DOM</p>  <pre class="code">divTest.style.backgroundColor = <span style="color: maroon">&quot;red&quot;</span>;
divTest.style.fontWeight = <span style="color: maroon">&quot;bold&quot;</span>;</pre>
<a href="https://11011.net/software/vspaste"></a>

<p>2. Setting the style property to a CSS string</p>

<pre class="code">divTest.style.cssText = <span style="color: maroon">&quot;background-color: red; font-weight: bold; margin: 0px 0px 0px 0px;&quot;</span>;</pre>
<a href="https://11011.net/software/vspaste"></a>

<p>3. Setting a CSS class name</p>

<pre class="code">divTest.className = <span style="color: maroon">&quot;newStyle&quot;</span>;</pre>
<a href="https://11011.net/software/vspaste"></a>

<pre class="code">newStyle{ background-color: red; font-weight: bold; margin: 0px 0px 0px 0px; } </pre>
<a href="https://11011.net/software/vspaste"></a>

<p>Whichever way a style for an element happens there is a couple of things that need to happen:</p>

<ol>
  <li>Dispatch to the DOM </li>

  <li>Style calculation </li>

  <li>Layout calculation </li>

  <li>Rendering </li>
</ol>

<p>As JavaScript (and to some extent the browser) is single threaded the first three steps need to happen before the next JavaScript statement can execute. For example if you set the color attribute for the body you would expect that any children who didn’t specify a fontColor would now return the value just set on the body. E.g.:</p>

<pre class="code"><span style="color: blue">var </span>divTest = document.getElementById(<span style="color: maroon">&quot;divTest&quot;</span>); 
alert(divTest.currentStyle[<span style="color: maroon">&quot;color&quot;</span>]); <span style="color: #006400">// alert's #000000 (default)
</span>document.body.style.color = <span style="color: maroon">&quot;blue&quot;</span>;
alert(divTest.currentStyle[<span style="color: maroon">&quot;color&quot;</span>]); <span style="color: #006400">// alert's blue</span></pre>

<p>That works in IE in other browsers you will need to use the standard <a href="https://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSview-getComputedStyle" target="_blank">getComputedStyle</a>. As the same thing happens for attributes involving layout it’s reasonable to assume that layout is also calculated before the completion of the JavaScript statement.</p>

<p>What doesn’t happen is the actual rendering of the updated page. This frequently causes developers problems. For example if you tried to show a “please wait” dialog while some long running synchronous operation completes you’d find that the dialog doesn’t display and the page isn’t updated. This is true in IE but other browsers have different behavior.</p>

<p>With this knowledge we can start to time and measure the different ways of updating the page. To do it fairly we need to only consider the different approaches but also the complexity of the page. </p>

<p>Trying the three approaches on a couple of pages gets some interesting results:</p>

<table border="0" cellspacing="0" cellpadding="0"><tbody>
    <tr>
      <td width="92">(100 iterations)</td>

      <td width="72">Style DOM</td>

      <td width="77">Style String</td>

      <td width="73">Class Name</td>
    </tr>

    <tr>
      <td>about:blank</td>

      <td>25 ms</td>

      <td>44 ms</td>

      <td>33 ms</td>
    </tr>

    <tr>
      <td>google.com</td>

      <td>26 ms</td>

      <td>69 ms</td>

      <td>188 ms</td>
    </tr>

    <tr>
      <td>cnn.com</td>

      <td>47 ms</td>

      <td>193 ms</td>

      <td>10,651 ms</td>
    </tr>
  </tbody></table>]]></content:encoded>
    </item>
    <item>
      <title>Performance Tip #2: Iterating Over Node Collections</title>
      <link>https://docs.microsoft.com/archive/blogs/andy_sterland/performance-tip-2-iterating-over-node-collections</link>
      <pubDate>Thu, 25 Mar 2010 18:04:35 GMT</pubDate>
      <dc:creator><![CDATA[Andy_Sterland]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/andy_sterland/2010/03/25/performance-tip-2-iterating-over-node-collections/</guid>
      <description><![CDATA[It’s fairly common in JavaScript to get a list of nodes from a DOM element and then iterate over...]]></description>
      <content:encoded><![CDATA[<p>It’s fairly common in JavaScript to get a list of nodes from a DOM element and then iterate over them to perform some function such as setting a class name. Typically this is done with something like:</p>  <pre class="code"><span style="color: blue">var </span>list = document.getElementById(<span style="color: #a31515">&quot;itemList&quot;</span>); <span style="color: green">// ul containing 100 li elements
</span><span style="color: blue">for </span>(<span style="color: blue">var </span>i = 0; i &lt; list.childNodes.length; i++) {
    list.childNodes[i].innerHTML = <span style="color: #a31515">&quot;New Item #&quot; </span>+ i;
}</pre>

<p>It looks pretty harmless but you need to consider the length of the nodes is actually a lookup from the DOM and not a simple comparison. As it’s a lookup it’s also can change so for every loop that statement needs to be evaluated. Realistically in JavaScript the length of the collection is very unlikely to change during execution, mainly because JavaScript is single threaded and in in IE it shares the UI thread so only IE or JavaScript can be interacting with that collection (for most intents and purposes). Thus a simple optimization would be to cache the length outside the loop:</p>

<pre class="code"><span style="color: blue">var </span>list = document.getElementById(<span style="color: #a31515">&quot;itemList&quot;</span>); <span style="color: green">// ul containing 100 li elements
</span><span style="color: blue">var </span>numberOfNodes = list.childNodes.length;
<span style="color: blue">for </span>(<span style="color: blue">var </span>i = 0; i &lt; numberOfNodes; i++) {
    list.childNodes[i].innerHTML = <span style="color: #a31515">&quot;Item #&quot; </span>+ i;
}</pre>
<a href="https://11011.net/software/vspaste"></a>

<p>Really this doesn’t gain you much as it’s a small fraction of the time compared to what ever you’re going to do inside the loop. It does mean that if in the future engines <a href="https://en.wikipedia.org/wiki/Loop_unwinding" target="_blank">unwind loops</a> the code above would benefit as it’s a much harder to unwind a volatile loop. But writing code hoping that in the future engines can take advantage of it is a poor idea and not something worth pursuing. In general it’s probably a bad idea to code patterns for specific engines as it may be slower on others. </p>

<p>There is another way&#160; to iterate over a list using a loop and that’s to walk the node list, itself using a while loop, something like:</p>

<pre class="code"><span style="color: blue">var </span>list = document.getElementById(<span style="color: #a31515">&quot;itemList&quot;</span>); <span style="color: green">// ul containing 100 li elements
</span><span style="color: blue">var </span>node = list.firstChild;
<span style="color: blue">var </span>i = 0;
<span style="color: blue">while </span>(node) {
    node.innerHTML = <span style="color: #a31515">&quot;Item #&quot; </span>+ i;
    node = node.nextSibling;
    i++;
}</pre>
<a href="https://11011.net/software/vspaste"></a>

<p>If you time a 1000 iterations of each above loops you the following times in milliseconds:</p>

<table border="0" cellspacing="0" cellpadding="0"><tbody>
    <tr>
      <td width="99">&#160;</td>

      <td width="86"><strong>For Loop #1</strong></td>

      <td width="93"><strong>For Loop #2</strong></td>

      <td width="96"><strong>While Loop</strong></td>
    </tr>

    <tr>
      <td><strong>IE8</strong></td>

      <td>4304.4</td>

      <td>4142.4</td>

      <td>3253.4</td>
    </tr>

    <tr>
      <td><strong>Chrome 4.1</strong></td>

      <td>394</td>

      <td>323.8</td>

      <td>139.2</td>
    </tr>

    <tr>
      <td><strong>Firefox 3.6</strong></td>

      <td>1772.8</td>

      <td>1717.8</td>

      <td>1642.7</td>
    </tr>
  </tbody></table>

<p>Iterating nodes is probably less common a pattern in JavaScript as you have to be careful around cross browser differences and in making sure you get the right node. But it just so happens that in all major browsers it’s faster. Why? Probably because it’s more similar to how the list is traversed in their internally implementations, but that’s speculation.</p>]]></content:encoded>
    </item>
    <item>
      <title>Performance Tip #1: Variables in the DOM</title>
      <link>https://docs.microsoft.com/archive/blogs/andy_sterland/performance-tip-1-variables-in-the-dom</link>
      <pubDate>Mon, 15 Mar 2010 08:17:10 GMT</pubDate>
      <dc:creator><![CDATA[Andy_Sterland]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/andy_sterland/2010/03/15/performance-tip-1-variables-in-the-dom/</guid>
      <description><![CDATA[In this blog I’m going to talk about a simple rule for speeding up JavaScript. Plenty of other folk...]]></description>
      <content:encoded><![CDATA[<p>In this blog I’m going to talk about a simple rule for speeding up JavaScript. Plenty of other folk have commented on this but it’s worth saying again and again :).</p>  <p>Advice in a nutshell: Try to declare all your functionality within closures and avoid declaring variables in the global scope or any part on the DOM.</p>  <h3>Background</h3>  <p>When you declare a variable in JavaScript that’s in the global scope it is defined onto the window object e.g.:</p>  <div>   <pre class="code"><span style="color: blue">&lt;</span><span style="color: maroon">script </span><span style="color: red">type</span><span style="color: blue">=&quot;text/javascript&quot;&gt;
    var </span>foo = 1;
<span style="color: blue">&lt;/</span><span style="color: maroon">script</span><span style="color: blue">&gt;
</span></pre>
</div>

<p>Variable foo can be accessed from anywhere on your page as either foo or window.foo. That sounds great as it’s a way to share data across functions and scripts. While it certainly does that it does it at a cost. </p>

<p>Because it’s defined on window that means that the variable is actually now part of the DOM. Which doesn’t sound too bad, except that the DOM isn’t actually part of the JavaScript engine&#160; in IE. Which might not make sense at first but look at this way, JavaScript is only one of the ways you can manipulate the DOM. The other obvious way is the HTML on the page itself, but more subtlety other script engines can manipulate the DOM. For example in IE you can have JavaScript and&#160; VBScript on the same page. So now two different script engine can access the DOM and the variable window.foo. </p>

<p>This is where it starts to get complicated as a script engine can’t own DOM elements then they need to be brokered through a 3<sup>rd</sup> party i.e. the host, IE (more specifically the IActiveScript host) . Now whenever you need to look up window.foo the JavaScript engine needs to ask the host if the host has that variable. Also doesn’t sound too bad, except the most logically way of doing this one in Windows is via a mechanism called COM. Now many books have been written on COM but if I was given a sentence to describe it I would say. COM is a technology that enables different components to communicate with each other either in process, out of process or over a network. As the DOM and the JavaScript engine are different components it sounds like a great match and it is. But of course the mechanics of making two separate components work isn’t so simple. It requires dynamic integration of objects and type marshalling all of which cost CPU cycles.</p>

<h4>Comparison</h4>

<p>Comparing the two different scripts below, the first reads the variable via the DOM 1 million times the 2<sup>nd</sup> reads a local variable 1 million times. </p>

<h5>Script 1</h5>

<pre class="code"><span style="color: blue">&lt;</span><span style="color: maroon">script </span><span style="color: red">type</span><span style="color: blue">=&quot;text/javascript&quot;&gt;
</span>    <span style="color: blue">var </span>dateStart = <span style="color: blue">new </span>Date();
    <span style="color: blue">var </span>someMessage = <span style="color: maroon">&quot;yay a message&quot;</span>;
    <span style="color: blue">for </span>(<span style="color: blue">var </span>i = 0; i &lt; 1000000; i++) {
        <span style="color: blue">var </span>x = someMessage;
    }
    <span style="color: blue">var </span>elapsedTime = <span style="color: blue">new </span>Date() - dateStart;
    alert(elapsedTime);
<span style="color: blue">&lt;/</span><span style="color: maroon">script</span><span style="color: blue">&gt;
</span></pre>
<a href="https://11011.net/software/vspaste"></a>

<h5>Script 2</h5>

<pre class="code"><span style="color: blue">&lt;</span><span style="color: maroon">script </span><span style="color: red">type</span><span style="color: blue">=&quot;text/javascript&quot;&gt;
</span>(<span style="color: blue">function </span>() {
    <span style="color: blue">var </span>dateStart = <span style="color: blue">new </span>Date();
    <span style="color: blue">var </span>someMessage = <span style="color: maroon">&quot;yay a message&quot;</span>;
    <span style="color: blue">for </span>(<span style="color: blue">var </span>i = 0; i &lt; 1000000; i++) {
        <span style="color: blue">var </span>x = someMessage;
    }
    <span style="color: blue">var </span>elapsedTime = <span style="color: blue">new </span>Date() - dateStart;
    alert(elapsedTime);
})();
<span style="color: blue">&lt;/</span><span style="color: maroon">script</span><span style="color: blue">&gt;
</span></pre>

<p>Executing the test 10 times and then taking an average I got the following:</p>

<table border="1" cellspacing="0" cellpadding="0"><tbody></tbody><thead>
    <tr>
      <td valign="top" width="169">&#160;</td>

      <td valign="top" width="160">Script 1 (DOM)</td>

      <td valign="top" width="160">Script 2 (closure)</td>

      <td valign="top" width="149">Difference </td>
    </tr>
  </thead><tbody>
    <tr>
      <td valign="top" width="169">IE8 </td>

      <td valign="top" width="160">343ms</td>

      <td valign="top" width="160">42ms </td>

      <td valign="top" width="149">810% </td>
    </tr>

    <tr>
      <td valign="top" width="169">Chrome 4</td>

      <td valign="top" width="160">85ms</td>

      <td valign="top" width="160">3ms</td>

      <td valign="top" width="149">2,833%</td>
    </tr>

    <tr>
      <td valign="top" width="169">Firefox 3.6</td>

      <td valign="top" width="160">3ms</td>

      <td valign="top" width="160">3ms</td>

      <td valign="top" width="149">0%</td>
    </tr>
  </tbody></table>

<p>As you can see accessing variables via the DOM is a lot slower than accessing them locally, for me it was 8x slower. While a million access might sound like a lot it’s not actually that many, try using the IE8 profiler on some sites as you type an email or chat online and you might be surprised as to how much goes on, a topic for another day. </p>

<h4>Bonus Tip: Timings in IE &amp; Date</h4>

<p>In IE8 and below the clock used by Date has a resolution of ~10ms but if you go to the developer tools and press start profiling we change the clock resolution to be 1ms. This has some other side affects but nothing to worry about.</p>]]></content:encoded>
    </item>
    <item>
      <title>A New Start IV</title>
      <link>https://docs.microsoft.com/archive/blogs/andy_sterland/a-new-start-iv</link>
      <pubDate>Mon, 15 Mar 2010 08:16:54 GMT</pubDate>
      <dc:creator><![CDATA[Andy_Sterland]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/andy_sterland/2010/03/15/a-new-start-iv/</guid>
      <description><![CDATA[Well it’s been a long time since I’ve blogged a long time indeed. But I thought it was about time I...]]></description>
      <content:encoded><![CDATA[<p>Well it’s been a long time since I’ve blogged a long time indeed. But I thought it was about time I got back in to it. Luckily after Popfly myself and a few ex-popfliers moved to a new team the browser tools team over in DevDiv. Where we get to work on tools that make web developers lives easier, being a web developer at heart it’s great to work the other side of the fence. </p>  <p>Over the next few months I intend to blog about the tools in IE and general tips from what I’ve learnt of web development having spent the last year working in IE. </p>]]></content:encoded>
    </item>
    <item>
      <title>Popfly Shuting Down - Saving Projects Locally</title>
      <link>https://docs.microsoft.com/archive/blogs/andy_sterland/popfly-shuting-down-saving-projects-locally</link>
      <pubDate>Thu, 16 Jul 2009 13:15:00 GMT</pubDate>
      <dc:creator><![CDATA[Andy_Sterland]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/andy_sterland/2009/07/16/popfly-shuting-down-saving-projects-locally/</guid>
      <description><![CDATA[Well I just&nbsp;finshed what will be the&nbsp;final update to Popfly,&nbsp;to place the shutdown...]]></description>
      <content:encoded><![CDATA[<FONT color=#0066cc>
<P><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"><FONT color=#000000>Well I just&nbsp;finshed what will be the&nbsp;final update to </FONT><A href="https://www.popfly.com/" mce_href="https://www.popfly.com">Popfly</A><FONT color=#000000>,&nbsp;to place the shutdown notice on the front page. As </FONT><A href="https://blogs.msdn.com/johnmont/" mce_href="https://blogs.msdn.com/johnmont/">John</A><FONT color=#000000> has </FONT><A href="https://popflyteam.spaces.live.com/" mce_href="https://popflyteam.spaces.live.com/">blogged</A><FONT color=#000000> about on our team blog Popfly will go offline on 8/24. &nbsp;<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></SPAN></P>
<P><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"><FONT color=#000000>If you do have projects on Popfly then you will lose access to them on 8/24 if you want to download you projects for prosperity (they won't run locally) then you can always add a .zip onto the URL of the project to get a packaged up zip. E.g.:<o:p></o:p></FONT></SPAN></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT color=#000000 size=3 face=Calibri>https://www.popfly.com/users/Team/Soccer.zip</FONT></P></FONT>]]></content:encoded>
    </item>
    <item>
      <title>Online Code Editors</title>
      <link>https://docs.microsoft.com/archive/blogs/andy_sterland/online-code-editors</link>
      <pubDate>Thu, 19 Feb 2009 19:58:00 GMT</pubDate>
      <dc:creator><![CDATA[Andy_Sterland]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/andy_sterland/2009/02/19/online-code-editors/</guid>
      <description><![CDATA[The other day I was looking at Bespin, a new online code editor from Mozilla, all told it’s a pretty...]]></description>
      <content:encoded><![CDATA[<P>The other day I was looking at <A class="" title=Bespin href="https://bespin.mozilla.com/" target=_blank mce_href="https://bespin.mozilla.com/">Bespin</A>, a new online code editor from Mozilla, all told it’s a pretty slick responsive code editor with classification (syntax coloring) for HTML, JavaScript and CSS. It really seems like the online code editor space is going to heat up a bit as people integrate which is great. Indeed Popfly has had one from the get go (~2 years ago). At first the editor was built with textboxes and JavaScript which was all too messy and now a much improved version built on Silverlight (<A class="" title="Popfly Game Creator Code Editor Screen Shot" href="https://ypzqyg.blu.livefilestore.com/y1pBXQq8cs8Y9qJC8clyWgdit1QmzFnCwnFpov9Ty9UbvRKNDAS98BFlX7RnnwlVqpdVYG3y8CptRgIX8qOkUcP_A/PopflyCodeEditor.jpg" target=_blank mce_href="https://ypzqyg.blu.livefilestore.com/y1pBXQq8cs8Y9qJC8clyWgdit1QmzFnCwnFpov9Ty9UbvRKNDAS98BFlX7RnnwlVqpdVYG3y8CptRgIX8qOkUcP_A/PopflyCodeEditor.jpg">screenshot</A>)&nbsp;thanks to work done by <A class="" href="https://www.removingalldoubt.com/" target=_blank mce_href="https://www.removingalldoubt.com/">Chuck Jazdzewski</A>. You’ll find it in places such as the game creator custom editor and on the mashup editor for when in a blocks “advanced view”.<BR><BR>Of course there are plenty of other online editors out there, now to just find a compelling business model for them… <BR></P>]]></content:encoded>
    </item>
    <item>
      <title>Roll on PDC</title>
      <link>https://docs.microsoft.com/archive/blogs/andy_sterland/roll-on-pdc</link>
      <pubDate>Tue, 28 Oct 2008 15:48:00 GMT</pubDate>
      <dc:creator><![CDATA[Andy_Sterland]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/andy_sterland/2008/10/28/roll-on-pdc/</guid>
      <description><![CDATA[On a non Popfly related note James Lissiak (an SDE on Popfly) and myself are down at PDC helping Dan...]]></description>
      <content:encoded><![CDATA[<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>On a non Popfly related note James Lissiak (an SDE on Popfly) and myself are down at <A class="" title=PDC href="https://www.microsoftpdc.com/" target=_blank mce_href="https://www.microsoftpdc.com">PDC</A> helping <A class="" title=https://blogs.msdn.com/danielfe/ href="https://blogs.msdn.com/controlpanel/blogs/Dan%20Fernandez" target=_blank mce_href="https://blogs.msdn.com/controlpanel/blogs/Dan Fernandez">Dan Fernandez</A> out at the Coding4Fun &amp; Channel9 lounge. Where we are talking about a <A class="" title="UT 3 Bots for .NET" href="https://www.utbots.com/" target=_blank mce_href="https://www.utbots.com">UT 3 Bots for .NET</A> a revamped version of the project we worked on at University and used in some labs for students with great success. </FONT></P>]]></content:encoded>
    </item>
    <item>
      <title>Embeding Games and Mashups in Live Spaces</title>
      <link>https://docs.microsoft.com/archive/blogs/andy_sterland/embeding-games-and-mashups-in-live-spaces</link>
      <pubDate>Mon, 22 Sep 2008 13:48:00 GMT</pubDate>
      <dc:creator><![CDATA[Andy_Sterland]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/andy_sterland/2008/09/22/embeding-games-and-mashups-in-live-spaces/</guid>
      <description><![CDATA[For any of you who’ve used Popfly in the past you might of noticed that you could embed your games...]]></description>
      <content:encoded><![CDATA[<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri>For any of you who’ve used Popfly in the past you might of noticed that you could embed your games and mashups into Windows Live Spaces pages. Yet if you tried it today you’d be sadden to see the option has gone missing, d’oh our bad. While that bug waits to get fixed (it’s a p3</FONT><SPAN style="FONT-FAMILY: Wingdings; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">L</SPAN></SPAN><FONT face=Calibri>) you can use a mashup<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>I just shared to generate the embedding link. All you need to do is enter your account name and project name and hit go, and like magic a link will appear. Click on it and you will be taken to Live Spaces where you can follow the wizard and embed your project.</FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><A href="https://www.popfly.com/users/Andy/LiveSpacesURLGenerator"><FONT face=Calibri color=#0000ff size=3>https://www.popfly.com/users/Andy/LiveSpacesURLGenerator</FONT></A><FONT face=Calibri size=3> </FONT></P>]]></content:encoded>
    </item>
    <item>
      <title>Mashups &amp;amp; Politics</title>
      <link>https://docs.microsoft.com/archive/blogs/andy_sterland/mashups-amp-politics</link>
      <pubDate>Mon, 11 Aug 2008 22:20:00 GMT</pubDate>
      <dc:creator><![CDATA[Andy_Sterland]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/andy_sterland/2008/08/11/mashups-amp-politics/</guid>
      <description><![CDATA[One of the blocks we recently added to Popfly is “Campaign Contributions”. As many of you know the...]]></description>
      <content:encoded><![CDATA[<SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri>One of the blocks we recently added to Popfly is “Campaign Contributions”. As many of you know the 2008 Presidential race is on! As part of the race the FEC requires that all individuals who contribute $50 or more have to report it and subsequently they expose the contribution as public record. At Popfly we decided it would be fun to import that data and using .net 3.5sp1 data services create a block where you can query that information. The information we collect includes the name, employer/occupation, amount, zip code and of course who the money was given too. It’s all public domain and can be found on the FEC web site. By exposing the data in Popfly though you can create some mashups of the information. </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri>Simple bar graph, the first mashup I made takes a ZIP code and returns all the people who donated sums up the money and puts it on a graph. You can see the mashup below (or on Popfly at </FONT><A href="https://www.popfly.com/users/Andy/Campaign%20Contributions%20By%20ZipCode" mce_href="https://www.popfly.com/users/Andy/Campaign%20Contributions%20By%20ZipCode"><FONT face=Calibri>https://www.popfly.com/users/Andy/Campaign%20Contributions%20By%20ZipCode</FONT></A><FONT face=Calibri>), and you can copy it and create your own version at </FONT><A href="https://www.popfly.com/users/Andy/Campaign%20Contributions%20By%20ZipCode.project" mce_href="https://www.popfly.com/users/Andy/Campaign%20Contributions%20By%20ZipCode.project"><FONT face=Calibri color=#0000ff>https://www.popfly.com/users/Andy/Campaign%20Contributions%20By%20ZipCode.project</FONT></A><FONT face=Calibri>. </FONT></P><IFRAME style="WIDTH: 524px; HEIGHT: 375px" src="https://www.popfly.com/users/Andy/Campaign%20Contributions%20By%20ZipCode.small" frameBorder=no allowTransparency></IFRAME>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri>Go ahead open it up! See how it’s made and have a play. </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri>You can also create a new mashup using the block by going to: </FONT><A href="https://www.popfly.com/mashupcreator" mce_href="https://www.popfly.com/mashupcreator"><FONT face=Calibri>https://www.popfly.com/mashupcreator</FONT></A><FONT face=Calibri> and search for “campaign” and you should see the block “Campaign Contributions” you can also find it by expanded the “New &amp; Updated” category.</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri>Try some of the operations, write your own queries! Help for the block is at: </FONT><A href="https://www.popflywiki.com/users;popfly;Campaign%20Contributions.ashx" mce_href="https://www.popflywiki.com/users;popfly;Campaign%20Contributions.ashx"><FONT face=Calibri color=#0000ff>https://www.popflywiki.com/users;popfly;Campaign%20Contributions.ashx</FONT></A><FONT face=Calibri> and you can find some help for writing your own custom queries at: </FONT><A href="https://www.popflywiki.com/DataServiceQuery.ashx" mce_href="https://www.popflywiki.com/DataServiceQuery.ashx"><FONT face=Calibri color=#0000ff>https://www.popflywiki.com/DataServiceQuery.ashx</FONT></A><FONT face=Calibri>. </FONT></SPAN></P>]]></content:encoded>
    </item>
  </channel>
</rss>