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.

  • DannyT

    Posted: March 19, 2009


    Nice commentary, I share a lot of the same thoughts (http://twitter.com/dannyt/status/1350370721).

    To add to your comments on the 'creative battle', I'd say this field is still wide open as even though Adobe dominate the design world I still think there is a whole new field that sits between 'creative design' (creatives/graphic designers/web designers) and 'boring grey app developers' (traditional windows app developers).

    As you point out hardcore developers are a long way off GUI experts but equally the majority of photoshop ninjas out there could care less about application (as in RIA) design and how to achieve that perfect pretty-but-effective-and-efficient transition from 'search results list' to 'detail view' within some dry LOB app.

    There still aren't many who fill that gap so it's possible the candidates for such a role aren't the ones tied to the Adobe toolset...

    Saying that, I don't know who or where they are just think we need more of em! :)


  • Rob McCardle

    Posted: March 19, 2009


    A thoughtful well written post and nice to see an objective discussion. Only thing is that yes loads of Flashers are nosing at the iPhone and that's great but iPhones are cool and Silverlight isn't. It's pretty schoolyard stuff but it's a stone cold fact at the mo - unless theres some really sexy demos that appear for it very fast it will never drag Flashers into it's filthy maw :)


  • TimmyG

    Posted: March 19, 2009


    Great comparison. It's rare that someone comparing Flash and SL knows much about both. You clearly do which gives you credibility here.

    A quick thought of my own: There are 3 major groups of developers out there: Windows developers, Web developers and now RIA developers. RIA development is soon to be the dominant style of development and the choices are Flash or SL. Most web developers will use Flash because it uses Javascript (ActionScript) and most Windows developers will use SL because it uses .NET. Its fun to speculate on who will dominate in the end but the big picture to me is that either way, both platforms are in for a HUGE boost in adoption.

    This is good for Flash, good for SL, good for developers, and great for users!


  • ryan

    Posted: March 19, 2009


    that was one of the most objective posts i have read in a long while... thank you for sharing an unbiased view the technology platfrom we have available to us today... no reason to look at this in a negative way if you are a flash developer... and if you are a .net/silverlight developer i guess you probably jumping in your skin as i write this comment...

    i would be keen to hear more of your thoughts on silverlight development...


  • Tink

    Posted: March 20, 2009


    Interesting read. Not that I know much about SL, but thought I'd clear up a couple of points about Flex.

    Built-in deep-linking support - SWFAddress for Flash or to some extent for states in Flex


    Flex comes with a HistoryManager class for built in deep-linking support. Its a different thing to states, although can be used in conjunction with them.

    in a binding expression in MXML (e.g. visible="(someBool && someOtherCondition)”)


    a binding in MXML would look like...

    visible="{someBool && someOtherCondition}"


  • Rich

    Posted: March 20, 2009


    Thanks all for the comments, really glad the post went down well.

    @Tink, I'm not sure I get you on these, probably my unclear explanation, but I was already referring to HistoryManager when I mentioned states in Flex (IHistoryManagerClient uses load/saveState calls), and the binding expression was missing { } so I've just edited it thanks. It's not a great example, but here I'm referring to the fact that you can't just put any old code in a binding expression in XAML without having to enlist a ValueConverter or a Markup Extension (the latter is even required to put Null into a tag's attributes, it's a smart construct) to bridge the gap or achieve the value you want.

    Markup Extension - http://msdn.microsoft.com/en-us/library/ms750413.aspx

    ValueConverter - http://msdn.microsoft.com/en-us/library/system.windows.data.binding.converter.aspx


  • Dave

    Posted: July 2, 2009


    @DannyT: Microsoft saw the gap between developer and designer and developed different tools for both. Developers use Visual Studio (full code + basic XAML) and designers use Expression Design/Blend (Full XAML coverage, but only basic coding support).

    Since Silverlight 2 and VS2008 solutions can shared which makes it easier to focus on your skills. Designers design in Expression and developers add functionality (and behavior) using VS. A common rule is that designers can't code and developers can't design. And if one can do the other, they often don't like it.

    As in any other arena competition is good. It's paces release cycles and features are faster implemented. I wouldn't be surprised if opening another AIR app is supported in the next version of AIR. Until Firefox gain some real market share (above 10 percent) browser development stood basically still. Both Microsoft and Adobe are challenged to push the envelope. With Silverlight 3 Adobe is getting some real competition. If you like Flash/AIR stay with it, because it probably wouldn't take a long time before that special feature in Silverlight finds it's way to Adobe and vice versa.