Just a bit disappointed that it's Silverlight

Mar 25, 2010 at 7:40 PM


Thanks for your comment on my blog post. :)

The only thing that is particularly disappointing to me is that the API seems to be focused on Silverlight. Because of its service-oriented nature, it could easily have been generically .NET, and then you could have added a Silverlight or WPF or Windows Forms or any other basic lifetime management dependency. As it is, though, WebAnalyticsService implements IApplicationService and IApplicationLifetimeAware, which creates a specific dependency on Silverlight (and possibly to WPF). Using this API, though, I could have added an analytics logging mechanism to a web service, or perform similar tracking in a WinForms application.

Perhaps I'll create a fork, though!  :) 

As an aside, in many ways, I feel like Microsoft needs to reevaluate its API strategy.  When Silverlight was still WPF/e, I was really excited; the name implied that it would be a strict subset of WPF with just a bit of interoperability for things like interacting with the HTML DOM.  When Silverlight 2.0 was being discussed, though, I saw a substantial divergence between WPF and Silverlight emerge (triggers and behaviors, for instance, were inconsistent).  Now we have three similar but inconsistent APIs for managed programming in Windows (WinForms, WPF, and Silverlight) that have a lot in common but are still irritatingly different (for instance, WinForms has ISynchronizeInvoke (part of the BCL in System.ComponentModel), where WPF and Silverlight have the Dispatcher object that doesn't implement ISynchronizeInvoke, in spite of the fact that they do pretty much the same thing.  Consequently, we have to build a compatibility layer when working with components that need to operate across technologies.

I'm not quite ready to say that Microsoft lost the API war, but this kind of API pollution is, in my opinion, not making it easier to be a Microsoft platform developer.

Mar 25, 2010 at 8:39 PM


If you could come up with any design suggestions for how the framework should be exposed in WinForms, I'd love to hear them.