Welcome to irritatedVowel.com Sign in | Help

POKE 53280,0: Pete Brown's Blog

Silverlight, WPF, Woodworking, .NET Programming, CNC, Nature, and other topics.

Pete Brown writes on a number of topics including Silverlight, WPF, .NET, woodworking and working as a consultant in the DC area. On most forums, Pete goes by the name Psychlist1972. Pete has worked at Applied Information Sciences (AIS) since 1996 where he currently performs as a lead architect and project manager.

Subscribe to my feed

Add to Technorati Favorites
Applied Information Sciences - My Employer

Community Events




World Domination

who's online

Networks


View Pete Brown's profile on LinkedIn

AddThis Social Bookmark Button
Silverlight 1.1 Carbon Offset Calculator is out!

I've written about some Silverlight work lately, but couldn't really talk about it until now.

Well, I can finally talk about it officially :)

The Silverlight 1.1 alpha Carbon Calculator that I and Steve Suing from Applied Information Sciences built was released into production last night, just in time for Live Earth. We're still doing a little bit of shake-out (and video editing and uploading), but it's out there, usable and fully functional, all on an alpha platform.

 

The Carbon Offset Calculator is a tool that calculates your impact on the environment, specifically your carbon dioxide output. This is affected by things such as the type and amount of energy in your home, your car and all the way down to the diet you eat. The science behind it is pretty solid, supported by government data. 

There are a number of calculators out there, some in HTML/AJAX, some in Flash, some in plain old HTML with JavaScript. This is the first of its kind in Silverlight, though. It's also one of the first real production Silverlight 1.1 applications out there.

If you click on "Explore Madagascar" you can see how we also integrated Virtual Earth into the solution.

The colors could still use a little updating, as we scrambled at the last minute to restyle this for a white page. Originally it was all set up for a black page. The map page still uses the color scheme set up for the black page, as it really looks best that way.

I will blog later about a lot of the specific details of the implementation. In the mean time, here is some high-level information:

Some Details

  • Two developers, two months doing everything on the project except for coming up with the specific language to show up on the screens 
  • Almost all test descriptions and calculator data is served up from various MOSS (SharePoint) lists
  • All filmstrip images come from MOSS
  • All videos are served up from MOSS
  • The geodata for the map points is also served up from MOSS
  • Silverlight is sitting over a layer holding the Virtual Earth map. We show and hide that layer as necessary. The shapes are placed on the map by converting lat/long data into real Silverlight coordinates.
  • The calculator itself is hosted in a regular old html page and surfaced via a page viewer web part (iframe) in a SharePoint page. This eliminated having to tackle building a web part on such a short project.
  • We couldn't pop up web pages using Silverlight, as popup blockers aren't yet aware of it like they are Flash. For that reason, the donation process takes over the iframe. This is far from ideal, but the best approach for now, as the donation pages change regularly.

Code Metrics

VS Analyzer doesn't yet understand agclr-hosted assemblies, so I did a quick count of files by hand  (good old DIR /S), ignoring the test projects

  • The UI layer project has 87 XAML files, 93 .cs files and 5 .js files, not counting the sample silverlight controls I modified
  • The business layer project has 28 .cs files
  • The web service layer project has 38 .cs files and 2 .asmx files

Tools Used

  • Visual Studio Orcas Beta 1 for all development, and some xaml tweaking
  • Expression Blend 2 Beta for main UI design and some of the animations
  • Expression Design RTM for all vector graphics (everything in the UI except the backgrounds)
  • Expression Media Encoder Beta for the videos
  • Corel Paint Shop Pro Photo for raster graphics (I'll graduate to PhotoShop CS some day!)

All in all, while the project had a lot of long days, this was very enjoyable, and we both learned a ton. LINQ and the other .NET 3.5 additions were a great bonus to our learning on this project, and turned out to be extremely useful for navigating the objects we created from the SharePoint data. 

Lamont Harrington at Microsoft (the person who owned this project on the Microsoft side) has a blog post that talks about some of the other bits he oversaw as part of this whole launch.

See it at BiodiversityHotspots.org . While you're at it, make a donation to a great cause!

  Add to Technorati Favorites
Posted: Saturday, July 07, 2007 3:07 PM by Pete.Brown
Filed under: ,

Comments

Rocky Moore said:

The app looks great! Just wonder what the carbon offset is for the Live Earth event was ;)
# July 8, 2007 7:13 AM

Lamont Harrington's Blog said:

As mentioned in my last post , in addition to the website redesign and replatform to MOSS , I also oversaw
# July 8, 2007 9:52 PM

Lamont Harrington's Blog said:

As mentioned in my last post , in addition to the website redesign and replatform to MOSS , I also oversaw
# July 8, 2007 9:55 PM

Lamont Harrington's Blog said:

As mentioned in my last post , in addition to the website redesign and replatform to MOSS , I also oversaw
# July 8, 2007 9:59 PM

Public Sector Developer Weblog said:

As mentioned in my last post , in addition to the website redesign and replatform to MOSS , I also oversaw
# July 8, 2007 10:08 PM

Noticias externas said:

As mentioned in my last post , in addition to the website redesign and replatform to MOSS , I also oversaw

# July 8, 2007 10:17 PM

POKE 53280,0: Pete Brown's Blog said:

Now that I have completed the Silverlight project , I had a few moments to tie up some loose ends on
# July 9, 2007 1:55 AM

Christopher Steen said:

The Distributed Observer Pattern | The REST Dialogues [Via: (author unknown) ] PainlessSVN - Subversion...
# July 9, 2007 10:27 PM

Frank La Vigne said:

# July 11, 2007 9:49 AM

WynApse said:

Silverlight Cream for July 11, 2007
# July 11, 2007 12:27 PM

Lorin Thwaits said:

Looks like the flight calculation for carbon is way off. Selecting 10 flights a year shows way, WAY more carbon usage than using 12 megawatt-hours of electricity a year. This calculator seems to be for a chartered 737, as if I am the only one on the plane! Divide by about 100 to get the real carbon offsets. Ultimately jet travel gets between 30 and 50 mpg per passenger, depending on how full the plane is. Check this out: http://www.carboncounter.org/offset-your-emissions/calculations-explained.aspx#_ednref24
# July 12, 2007 8:22 AM

Andrew Lush said:

Nicely done, I like the photo viewer, but there is a bit of a delay loading the images.
# July 12, 2007 7:31 PM

Pete.Brown said:

Hi Lorin

Thanks for the information on the calculation for air travel. Unfortunately, the calculators that are out there do not agree on this. For example, the old calculator at Conservation International (upon which we based this code, as it was really just a port) comes up with 7.9 tons for 10 short and 10 long flights. The one at the nature conservancy comes up with 25 tons for the same input. The one at begreennow comes up with 6.41 metric tons for 20 flights (to my surprise, they don't differentiate short from long, but it averages out to 1660 miles per flight). The reason the calculators do not all agree is because of the way they count long and short flights. As conservation international has stood by their data and their calculations, I stand by the implementation :)

Thanks for writing.

Pete

# July 12, 2007 9:38 PM

Pete.Brown said:

Hi Andrew

Thanks for the kind words. I agree on the delay being bad. Unfortunately, time ran out before we could do some of the optimizations we'd like to have done. The photos are all loaded from a SharePoint list, a list that is expected to get pretty big over time. The thumbnails are from the same list. However, we are able to do a background download of the thumbnails; even that doesn't always cut it, especially on a slower connection.

Doing the same for the main images would have been possible, but we felt that was a poor use of the user's bandwidth (plus they might wonder what the heck was going on in the background!)

Pete

# July 12, 2007 9:42 PM

Felix's Notes on Evangelism said:

在MSN赞助的今年 LiveEarth 活动中, Conservation International 发布了基于MOSS 2007新网站,作为阻止温室气体排放的努力,他们发表了一个二氧化碳排放量计算器,当然,这是基于Silverlight的应用:
# July 13, 2007 4:43 AM

Noticias externas said:

在MSN赞助的今年 LiveEarth 活动中, Conservation International 发布了基于MOSS 2007新网站,作为阻止温室气体排放的努力,他们发表了一个二氧化碳排放量计算器
# July 13, 2007 4:54 AM

外部部落格 said:

在MSN赞助的今年 LiveEarth 活动中, Conservation International 发布了基于MOSS 2007新网站,作为阻止温室气体排放的努力,他们发表了一个二氧化碳排放量计算器
# July 20, 2007 12:17 AM

外部部落格 said:

在MSN赞助的今年 LiveEarth 活动中, Conservation International 发布了基于MOSS 2007新网站,作为阻止温室气体排放的努力,他们发表了一个二氧化碳排放量计算器
# July 20, 2007 12:17 AM

Attin said:

its a very useful blog with much information regarding ealth in all terms……..

# August 6, 2007 1:06 AM

POKE 53280,0: Pete Brown's Blog said:

I previously posted about the Carbon Calculator we wrote using the Silverlight 1.1 alpha bits and MOSS
# August 21, 2007 12:42 PM

POKE 53280,0: Pete Brown's Blog said:

The Silverlight Carbon Calculator is back up and functioning. It took some doing to get it back up (not
# September 25, 2007 11:33 AM

POKE 53280,0: Pete Brown's Blog said:

Frank LaVigne and I were both interviewed as part of a Silverlight article for Redmond Developer News.
# October 1, 2007 10:06 PM

Frank La Vigne said:

# October 2, 2007 5:33 PM

Frank La Vigne said:

# October 2, 2007 5:40 PM

POKE 53280,0: Pete Brown's Blog said:

The main pattern I followed in the Silverlight 1.1 Carbon Calculator UI development was the pattern of
# October 17, 2007 1:12 PM

POKE 53280,0: Pete Brown's Blog said:

My colleague at AIS, Steve Suing, just started up his own blog today. Among other things, Steve was half
# October 24, 2007 10:07 AM

Frank La Vigne said:

# December 21, 2007 4:36 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

Enter the text you see in the image:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS