Performance Tip #3: Setting Styles

A common task to do in JavaScript is to change the appearance of elements dynamically. There’s a couple of ways of doing that: 1. Setting style properties in the DOM divTest.style.backgroundColor = "red"; divTest.style.fontWeight = "bold"; 2. Setting the style property to a CSS string divTest.style.cssText = "background-color: red; font-weight: bold; margin: 0px 0px 0px…


Performance Tip #2: Iterating Over Node Collections

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: var list = document.getElementById("itemList"); // ul containing 100 li elements for (var i = 0; i < list.childNodes.length;…

1

Performance Tip #1: Variables in the DOM

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 :). Advice in a nutshell: Try to declare all your functionality within closures and avoid declaring variables in the global scope or any part on…


A New Start IV

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…


Popfly Shuting Down – Saving Projects Locally

Well I just finshed what will be the final update to Popfly, to place the shutdown notice on the front page. As John has blogged about on our team blog Popfly will go offline on 8/24.   If you do have projects on Popfly then you will lose access to them on 8/24 if you want to download…


Online Code Editors

The other day I was looking at Bespin, 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….

1

Roll on PDC

On a non Popfly related note James Lissiak (an SDE on Popfly) and myself are down at PDC helping Dan Fernandez out at the Coding4Fun & Channel9 lounge. Where we are talking about a UT 3 Bots for .NET a revamped version of the project we worked on at University and used in some labs…

1

Embeding Games and Mashups in Live Spaces

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…

1

Mashups &amp; Politics

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…

1