Geeks With Blogs
Kevin Rohling Building great s0ftware, 1 line at a time.

It’s been a couple weeks since it was first announced that the Engineered Experiences team won Microsoft’s newCloudApp() contest and it’s about time I got around to blogging about it.  First things first, I couldn’t start this post without congratulating the other team members: Scott Densmore and Dwayne Brown, you guys rock!


Check it out:

As a software developer I am all about reuse so here’s the copy+paste from our description:

IMPULSE is an application for outdoorsy people that like to run, bike, hike, etc. and want to use a GPS device to keep track of stats like Average Speed, Total Distance, and Fastest Mile.  In addition to simple stats, IMPULSE outputs graphs relating the users speed to distance and time and displays routes taken on a visually appealing and interactive map.  While we will provide an import function that allows uploading from most off-the-shelf devices, for those with GPS-enabled Windows Mobile devices we have built a client application capable of streaming live data to our cloud services.  This lets users do cool things like send tweets (twitter-speak) with a link that allows others to see a live map of your current route that updates in real time!
Under the covers IMPULSE is a fully .NET solution.  The web client is being built in Silverlight 2 3, the Windows Mobile application on the Compact Framework 3.5 and the back end will take advantage of WCF services deployed in the Azure cloud.

Visifire Charts

In Part I of this blog post I’d like to talk about the Visifire charting controls we are using in IMPULSE for our Velocity charts.  In the future we have plans for several more charts including power output and historical comparisons that we plan on using Visifire for as well.


So first off why did we choose Visifire?  Obviously there are a number of other Silverlight chart controls on the web but here are several factors that made Visifire the best fit for us.


For starters, you can’t beat Visifire’s licensing.  If you’re an open-sourcie then you’re in luck because they’ve got a free plan for you.  I am however not that generous with my code and time and we are working to productize IMPULSE so that wasn’t an option.  Even so, $50 for a Silverlight Domain License is crazy cheap, even for a couple of guys doing this completely with their own time/cash!  Check out their site for more details:

Easy-To-Use API

Also, I hate having to learn complex API’s!  I love components that plug in and just work and I was literally able to get this chart up and running in an afternoon.  Furthermore, the API for their WPF build is the same as for Silverlight which is ideal for anyone with a Multitargeted solution.  There are also a ton of Visifire chart features that we are not even using and in fact we are only using one of their many chart types.  Having continued work on extending and improving our charting functionality I think the Visifire team has done a great job packing a lot of incredibly useful features into these components.


So Visifire’s a great charting control, but one of the limitations that I ran into while putting all of this together is their lack of support for DataBinding.  In many cases this is likely not a major impediment, however, IMPULSE is built using the Model-View-ViewModel pattern.  If you are not familiar with MVVM and are doing Silverlight or WPF development I strongly recommend you look into it.  However, for the sake of this conversation I’ll suffice to say that it is strongly dependent upon the DataBinding infrastructure provided in Silverlight and WPF.  To get around this problem I ended up building a set of generic Attached Properties that allowed me to DataBind our velocity data to the Visifire charts.  Here is an example of what this looks like:

   1: <vc:Chart attach:DataSeriesBinding.ChartData="{Binding Path=GeoLocationSummaries}" 
   2:           attach:DataSeriesBinding.XValuePropertyName="CummulativeTimeSpan" 
   3:           attach:DataSeriesBinding.YValuePropertyName="InstantaneousVelocity" >
   4: </vc:Chart>
  • DataSeriesBinding.ChartData is the property that you can use to DataBind the collection containing the data you want to display in your chart
  • DataSeriesBinding.XValuePropertyName is the name of the property on the objects contained in ChartData to use as the XValue in your chart
  • DataSeriesBinding.YValuePropertyName is the name of the property on the objects contained in ChartData to use as the YValue in your chart
  • Interested in the code?  Click here, download and enjoy!  I designed it to be generic enough that you can databind nearly any type of data to a Visifire chart but if you need to tweak, it shouldn’t be too hard.
Posted on Tuesday, August 4, 2009 10:06 PM | Back to top

Comments on this post: Windows Azure + Silverlight - #NEWCLOUDAPP()

# 红酒木瓜靓汤
Requesting Gravatar...
hong jiu mu gua tang
Left by 红酒木瓜汤 on Aug 01, 2011 5:53 AM

Your comment:
 (will show your gravatar)

Copyright © SundriedCoder | Powered by: