Tales from the Smart Client

John Gossman's observations on Avalon development

The All-Avalon, All-the-time Application

Expression Interactive Designer (aka Sparkle) is a 100% .NET, managed code application.  The source is currently more than 1200 .cs files and about 140 .xaml files totally 210,000 some lines of C# and 23,000 some lines of XAML.  There is no unmanaged code directly in the Sparkle source, and only one PInvoke.  The single PInvoke is used to call out to HtmlHelp.  We could have used the managed wrapper for HtmlHelp, but that is in the WinForms assemblies, and since we are so Avalon based we decided to avoid additional WinForms dependencies (frankly, for interop reasons we will probably have them anyway, but sometimes it is the thought that counts).

As I mentioned in my attempt at Sparkle history, we decided early on to build Sparkle's UI using Avalon even though Avalon was very rough and untested at the time.  We almost certainly could have made faster progress using a fully functional and tested UI framework like WinForms or even using unmanaged Win32.  We certainly would have avoided a huge amount of churn as we constantly fixed or rewrote our code when Avalon changed. 

I recently heard that in some early review BillG said Sparkle should "be the conscience of Avalon."  I wish I had heard it then, because it is a great summary of how we felt.  As much as we were all committed to making our team's product succeed, we always knew Avalon was more important.  We needed to look at Avalon the way the customer would when they started building their applications.  Frankly, there is no artifical test or team of QA people that can match trying to build real, production code on a platform.  We tried to do everything the Avalon way, and tried to use Avalon features we weren't even sure we needed.  At some point somebody starting calling us "The All-Avalon, All-the-time application". 

We don't cover every area of Avalon, but we hit most of them and provided a lot of feedback to the Avalon team.  Which was hard...because the Avalon folks were working very, very hard and most of the time all they heard about from us were the bugs and the missing functionality.  

And the gamble paid off.  Sparkle works and has a very powerful, unique UI.  Because we are all-managed and all-Avalon we don't have a lot of fiddly interop code.  And we have some features (like the zooming UI) that would have been much harder to build on another platform, if even possible.



Published Monday, September 26, 2005 4:15 AM by JohnGossman

Comments

 

jmacdonagh said:

I understand the need for the HtmlHelp call, and I understand the desire to utilize Microsoft's HTML Help framework, but why not replace all those ugly help files with a flashy help file using Avalon's document features? Either that, or talk to the WinFX team about putting in a managed wrapper around it.
October 7, 2005 12:13 AM
 

JohnGossman said:

The tools and infrastructure for a replacement for HTML help will take time to build. I think the WinFX team is ambivalent about adding another wrapper (since one already exists in WinForms) when we don't know whether HTMLHelp is the right long term strategy.
October 7, 2005 10:59 AM
 

Raimond Brookman said:

Microsoft has used Avalon internally already for a major application: Sparkle. Expression Interactive
September 4, 2006 5:52 PM
 

DEVELOPMENT SITE - NOT MY PUBLIC BLOG said:

In case anyone ever wonders if Microsoft produces any real apps (other than Microsoft Max ) using managed code, here you go: Expression Interactive Designer (aka Sparkle) is a 100% .NET, managed code application. The source is currently more than 1200

June 28, 2008 11:40 PM
New Comments to this post are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker