Brian Noyes / WPF Update on .NET Rocks
Brian Noyes delivered an update on the state of WPF on .NET Rocks a couple of months ago, and the podcast aired on February 12. (Ok, so I’m a little behind on my podcast consumption). Brian made a couple of good points about WPF – things that he’d like to see changed or improved in later versions of the technology.
The first point he made was on WPF animations, and seeing as I just did a series on those last month (WPF Animations Part 1, Part 2, and Part 3) I think it’s good to put the two side by side. Brian made the comment that XAML actually takes us backward in some respects. For example, XAML gives us the ability to define and fire animations in the markup directly. However, there is no way to automate a test for an animation defined like this. Fair point, but how would you automate a test for an animation defined and triggered in code? Would you trigger it in a unit test, and then examine the final position of the object being animated? Don’t get me wrong – I am a firm believer in the value of automated testing, but I also think 100% test-case coverage is not realistic. My gut says that the 80-20 rule applies here (80% of the test cases will require 20% of the time to automate the tests for them), and automating tests for animations falls into the 20% bucket.
The second point deals with inheritance. You can’t inherit the declarative part of a WPF control, meaning the XAML markup. While I haven’t hit this roadblock yet, I can the truth in it and see why it will be a problem.
LIke Brian, I am also curious and slightly anxious to see where Microsoft and the development community takes this technology. Perhaps there is an elegant solution to these two issues waiting to be found.
UPDATE: Less than an hour after I posted this, I came across a blog post by Scott Guthrie where he describes a feature that shipped with Silverlight 2.0 Beta 1 – a cross-platform, cross-browser unit testing harness for Silverlight. While Scott doesn’t explicitly mention testing animations, you might just be able to do with this. For the last week I’ve been checking out Selenium from the team at ThoughtWorks for browser-based UI testing. If this Silverlight test harness can test something other than just Silverlight apps, that might be a second product to consider.
Sorry, the comment form is closed at this time.