Yesterday, to much excitement, Microsoft released Silverlight 3 beta, and gave a run-down on the new features at the MIX09 conference. It has been a very long time since I first looked at Silverlight (here’s my post on a pre 1.0 early build I got to use over in Redmond), and I’ve used both Silverlight and WPF since (which will eventually be two in the same IMHO), one app for the BBC was demo’d at the MIX07 keynote, so I’m fairly familiar with the offering and how it compares.

Just to give a run-down of the key features we’ve seen announced, I’m adding comparisons to Flash features:

  • Out of the Browser – Silverlight now runs out of the browser via a desktop shortcut (like AIR but remains in browser sandboxed mode), inc. offline mode
  • Push data/syncing – Something we’ve seen in BlazeDS/LiveCycle Services
  • Support for multi-touch
  • Caching libraries/content – FP10
  • Hardware accelerated H264/MP4/AAC – FP10
  • Pixel level shading – Standard filters in Flash 8 and custom pixel shaders in FP10
  • Perspective 3D – FP10
  • LocalConnection API – LocalConnection in FP6
  • Built-in deep-linking support – SWFAddress for Flash or to some extent for states in Flex
  • IIS Media Services – FlashCom?
  • Cached Composition – cacheAsBitmap/scrollRect in FP8?
  • Bitmap API – Flash 8 introduces a bitmap API)
  • Expression Blend 3 – Combination of Flash IDE/Flash Catalyst/Flex Builder

Features

I doubt anyone at Adobe was under any illusion, Microsoft want the RIA space bad. They tooled up and geared up as only they can and the story over the last 3 years has been incredible. Along the way the have clearly been learning a lot from Adobe, many of the features are “inspired” by features we’ve seen added to the Flash Player and AIR. The releases have been overbearingly strategic, ever since the 1.0 release which was predominantly touting the support for WMV/streaming video (a wink at YouTube) and coding via JavaScript (the swathes of AJAX developers were getting larger by the minute), then they announced SL for mobile (Flash Lite), and now H264/MP4/AAC.

It’d be unfair to say that in just 3 years they’ve caught up with the Flash Platform which has taken a whole 10 years to reach it’s current state. If you gave the Flash Platform engineers a real world example Flash Player X and AIR X running right now and said “we’d like to compete with that”, it would not take them 10 years again to create it from scratch, and I imagine even less time when you consider the unbelievable 10 year legacy support, 3 text rendering engines etc. It has been a process of evolution, user feedback and hardware improvements that has led to what we now call the Flash Platform, and it has been rapid when you compare it to the other web technologies to say the least.

Coding

So, to Silverlight. In some ways it simply exceeds the competition; developer support in C# and related tools is second to none, absolutely none. The .NET “stack” is enormous, robust and jam-packed with heavy-hitting features for professional developers, Visual Studio is a fast, extendable (Re-Sharper) and helpful IDE. But at the same time it lacks the relative hackability of ActionScript, even down to something as simple as putting any code in a binding expression in MXML (e.g. visible=”{someBool && someOtherCondition}”), compared to the extremely strict rules imposed by the XAML validator which force you to introduce Converter classes and such. Having said this, I’ve found for an application, development speed is comparable overall, and I did say, for an application. This is helped by having less bug-finding to do. So in terms of coding, it’s a close run thing.

Creativity and Workflow

There’s one key differentiator that needs to be considered, the creative edge. Adobe clearly kings of the creative industry, un-shakeable. The new Microsoft Expression suite is impressive in both its rapid evolution, and capability, and in my eyes this is largely due to the fact that Microsoft has had an “FXG” and animation built into XAML from the start, they have never had to integrate with binary vector/animation formats, everything was XML. They also have an iron-clad separation of view from code-behind that made things like skinning and subclassing components somewhat easier. This leads to an incredibly tight and bi-directional developer/designer workflow (if you haven’t tried skinning in WPF try it!), but at the same time it leads to a huge limitation on just what you can do – no timeline/keyframe animation in the traditional sense… something that design agencies absolutely thrive on. I’ve seen and tried experiments of doing shape-tweens in XAML, but it’s not just processor-unfriendly, it’s XML-gargantuan and the tooling doesn’t support it (unless that has changed in this last release).

Challenges and User-base

What about the fact that Flash developers don’t want to re-learn another tool which may or may not have the same capabilities? Obviously if it gets to the point where it has more features and a sufficient install-base, I think the type of person that makes a good Flash developer is exactly the type of person that won’t take very long at all to re-learn, in fact they relish the challenge. I’ve seen at least 6 fellow Flashers in my limited circle take up the challenge of creating iPhone apps in Objective-C in the last month or so, and it’s really not such a big leap, indeed – the London Flash Platform User Group is having 2 iPhone talks instead of a Flash talk this month.

One key area which seems to affect the mindset of a creative programmer is how much does the tool actually get in my way instead of helping me. The strict nature of the .NET environment may mean a lot of reading, but the documentation is really well organised with code examples for everything, and there are clearly laid paths to follow not just hints in the direction of XYZ. I think Adobe need to “sure-up” the Flex SDK, hopefully this is underway with the new Spark components, but I want to know if anyone has any metrics on how long it takes a new developer to find out something as simple as needing to implement the IFocusManagerComponent or IDropInListItemRenderer interfaces in order to magically activate dormant code in the 10,000 line UIComponent superclass. Certainly there is no clear path in the documentation, I remember I had to study the source code for the Flex components to figure these out when I needed them for the first time. This very fact literally raises the bar so much that it knocks out a lot of Flash developers too scared to rely on the SDK. Previous to this it was mix-ins in the AS2 components, and now marker interfaces. I understand there are performance reasons for this technique and it can lead to more forgiving and flexible code, but it really needs to stop because it makes Flex a dark art where Monkey Patching runs riot and that really removes the fun, I don’t think annoying the developers is going to increase their faithfulness.

What Next?

So really that just leaves innovation in creativity. I feel that Adobe are probably going to be forced to accelerate development, adding new innovative features. For me this means un-questionably we must see lower-level access to video/audio (audio is pretty much covered), multi-touch if the OS allows it, launching/comms with other apps in AIR (this one is forever requested and I’m sick of wrapping in Zinc, pure AIR would have been an option otherwise) and of course the elephant in the room, native 3D, not just billboarding, and that last one would have to come in the next 2 versions; Papervision 3 when complete should hold off the competition for some time, but we’re already seeing a lot of developers posting about Unity3D, now that its IDE supports Windows (as of today), time is ticking.

The difficult position for Silverlight is, yes there are masses of strong .NET developers out there who can utilise the whole stack from database connectivity to GUI, but they aren’t all GUI programmers. That’s a special skill that takes an eye and a love of design. You see this when you go to something made in Silverlight and the animation doesn’t loop smoothly, or the text is not anti-aliased, touches that are simply unacceptable to a good Flasher and are totally avoidable in Silverlight too if those people were using it. So the creative battle is still on, the pace just got a whole lot faster.