Why I think Silverlight has an edge…

In the Silverlight vs Flex debates, I’ve always been staunchly located on the Flex side of the fence.

But, as much as it pains me to say it, it’s beginning to dawn on me that the dirty ol’ boys in the Microsoft labcoats may just have the leading edge.

And, it’s not about browser penetration, or hi-def video, or 3D capabilities, or swanky new sound API’s.

It’s about language.

If you wanna compare these two frameworks, feature-by-feature, then as it stands, Flex wins out — every time.  But what people tend to miss (IMHO) is that we’re comparing frameworks, and not languages.

Do a comparison of Actionscript to .NET, and it’s a whole different kettle of fish.

Comparatively, shipping a new release of a framework with additional features takes much less time than adding features to your language.

In the time span between Alpha and Beta 1 of Silverlight, MS added a bucket load of features to their (somewhat limited) framework.  Beta 1 to Beta 2 saw lots more of the same.  Add to that the development community who will throw their collective weights behind the platform, and you’ll see real traction.

Does the Silverlight UI framework suck?  Maybe.  But it doesn’t matter.  If it’s really that bad, it won’t take long for the development community to provide one that rocks.

We see the same thing every day in the Flex community.  Hate Cairngorm?  Meet PureMVC / Mate.  Not a fan of <some 3d API>, not a problem — we’ve got 3 or 4 alternatives waiting just around the corner.

But — all of these frameworks share the same lowest common denominator — the Actionscript language.

And, it’s a little embarrassing to tell my .NET mates that mid 2009 the Flex community is getting support for typed arrays.  (Woot!)

I might be wrong, I’ve had limited exposure to Silverlight, but from what I understand the language is boasting some pretty impressive .NET features…

  • Typed Arrays
  • Generics
  • A decent reflection API
  • Dynamic Compilation
  • Abstract classes
  • Threading
  • LINQ / Lamba expressions
  • All sorts of C# 3.0 / 3.5 goodness!

Fire up Silverlight, and you’ll get all these things out of the box.  Today.  Right now.

For that matter, if you don’t like the language, you can write your own!  (IronPython, IronRuby)

And, by the time that Flex 4 and our typed arrays make a release, you can expect that C# 4.0 & VB10 will be boasting some funky new features in early preview.

Sure, Flex is an extremely powerful framework…today….comparatively.

But .NET is an extremely powerful language.  And where there’s a language, there’s developers.  And, where’s the developers, there’s eager minds….filling gaps in markets, plugging holes, and pushing boundaries.

Don’t get me wrong.  I think that Adobe are kicking ass with Flex.  In fact, had they not done such a good job, Silverlight probably wouldn’t be the contender it is.

And — come to think of it — Adobe are doing one helluva job in including the development community in guiding where the framework is headed.

So maybe it’s out fault.  Hell – maybe, it’s just me.  Maybe the community really does want a better designer / developer workflow over and above the ability to mark a method as abstract.

But I worry that while we’re getting swanky new ways of integrating designers and developers, the Microsoft team are giving their developers ways to achieve more powerful products with less code.

And, if Paris Hilton has taught us anything, it’s that looks can only get you so far in this world!

I just hope I haven’t backed the wrong horse in this race!

18 thoughts on “Why I think Silverlight has an edge…

  1. John says:

    Based on the amount of b*tching and complaining our .Net developers are doing with SilverLight (only 1 knows Flex), the advantage of knowing C# hasn’t been an advantage. Things they use regularly in WPF 3/3.5 aren’t there in Silverlight beta 2. But that is just what I’m hearing. I’m the designer who uses Flash and Flex … so I’m happy 🙂

  2. lowdown says:

    I haven’t seen a compelling reason to install silverlight, whereas I couldn’t imagine not having FP9 installed. I’m sure, at some point, that will change (lord knows every time I update windows MS has the popup promising AMAZING content).

    C# is pretty cool, but frankly installing dotnet is extremely unappealing for crossplatform users. Flash is not.

    Competition is a great thing though. It will push both companies to develop more and better features as they play off one another. Good times.

  3. Dusty says:

    I think that AS3’s relative simplicity will be a bonus in the future. To this day, I have yet to see a really pretty silverlight RIA, (though I have seen some technically awesome ones, I’ll admit).

    Flash9/AS3 has already received flack for being too complicated, you’ll never find a designer that’ll be able to wire up silverlight apps in c#. It means adding another person to a team… in large companies, thats no big deal, but in small companies, you don’t want to have an uber-programmer, a designer/developer hybriid and an uber-designer. With flex, the uber-programmer and uber-designer can work side-by-side, without having someone in the middle.

    So, yes… c# is a cooler language that as3. I’ve wished for abstract classes and reflection (the rest, meh…)… but they don’t keep me from implementing anything, they just add a little extra time. And if that little extra time means one less person *necessary* on the team, then it’s a trade-off I’ll gladly take

  4. lowdown says:

    I meant to add that you could argue strongly that Java has had many of the advantages that you outline for Silverlight for years, but I don’t know about you, but Java doesn’t enhance my browser space experience… at all.

  5. Rob McKeown says:

    You may be right about the differences in the languages. However, what really matters right now, and still will 2 years from now, is what you can build with them. Right now, you can build better experiences with Flex/Flash hands down. Your analogy to Paris Hilton is flawed in that User Experience is not about “looks”, its about the interaction between the human and the computer. (Incidently, the way Paris Hilton interacts with humans is her problem… that’s what we should be learning from her.) That is common misconception among pure developers.

    Typed Arrays will not make or break a project but a poor User Experience will. User Experience isn’t a technical problem so the technology is never going to be the sole factor in a projects success. It is all about how the folks that design applications can work with those that develop them. Adobe is on the right track in this regard.

    So, while I have no doubt that MS will make Silverlight bigger and better, so will Adobe. But in n years, we will still be saying “what can you build with it?” and “How well can humans interact with it?”.

    Right now, my money is on Flex.

  6. JesterXL says:

    Be careful where you drop “.NET”. While I know you know what .NET is, some don’t. Silverlight is not .NET, it has C# in the 2.0 version, but it does NOT have .NET capabilities. It does NOT utilize the .NET runtime nor does it have its features.

    Yeah, even my old CTO was amazed that all the things that C# has (threads, Abstract classes) that ActionScript didn’t and was amazed anything “decent” could be built atop it; hilarious! I have a house and car that prove that it’s decent.

    …anyway, the only other thing I’d say is that, at least currently, Silverlight takes a TON more code, not less. Then again, it’s only version 2, and Flex, while version 3, started on a version 9 runtime so has a MAJOR head start.

  7. RogerV says:

    ActionScript3, Flex, and the Flash runtime can more than hold their own against Silverlight.

    I’ve developed extensively in C# and built a lot of GUI with it (heck, I worked on the .NET project when I was a Microsoft employee). For over five years I’ve programmed extensively with Java. I tallied over a decade of C++ prior to Java and C#.

    My credentials in GUI programming go back to the first Mac OS in the late 80s, as programming the Mac was my first job out of college. I programmed the Mac in Object Pascal, C, and 68000 assembly language.

    I employed AJAX back in 2000 working on a project for the Microsoft AutoPC platform. Microsoft showed off my handiwork at Detroit auto show that year sitting in the dash of a BMW. Quite a number of years prior to AJAX catching on mainstream as an approach to managing the web GUI.

    I’ve learned, mastered, and then forgotten more computing languages and CPU assembly languages than most programmers these days have ever heard of (particularly the web folks, who seem to have very light weight background in such things).

    I throw out an industry pedigree of diverse experiences spanning 22 years to assert that ActionScript3 is a vastly better GUI programming language than C# 3.0. AS3 is the kind of language for the kind of code I want to write to run in the browser context.

    AS3 strikes a fine balance for it’s intended purpose – a well crafted tool to suit the task. Rapid to learn, surprisingly expressive in interesting and useful ways (check out Bruce Eckel’s article on doing functional programming with AS3 and its array classes).

    C# 3.0 started out pretty good when was aimed as an improvement over java’s irritations. These days, though, it’s a PL/I kitchen sink language that has too much surface area and not particularly graceful syntax.

    AS3 can be picked up in a week by a new-comer. C# 3.0 – buy some of those thick books and decide with idiom of programming approach you want to sink into first. C# 3.0 will be a Swiss army knife for letting you try all manner of different ones. It’s all such an overkill for what it takes to craft RIA GUIs running in a browser. Not only should the runtime result be light and fleet of foot, but so should the language that’s used to craft it. AS3 is exactly that in terms of its feel as a language. Light, fleet of foot, and expressive while employing a syntax that does not become overwraught as so much of C# 3.0 is prone to do.

    You know, I do enjoy the degree of static type safety that AS3 has, but I really don’t miss generics. Used generics in both C# and Java (and C++ templates before that). There never has been a case where I’ve thought to myself, “gee, I wish AS3 had generics like C# or Java”. Nope, never, ever crosses my mind.

    Given I don’t run queries against my back-end database directly from my app running in the browser, I haven’t exactly missed LINQ either. But LINQ hasn’t panned out to be the to-die-for feature that we once thought it would be. I wrote an article that was well circulated inside Microsoft that pondered whether LINQ would do some serious impact to Java (I was concerned from a Java developer’s point of view). Hasn’t happened. LINQ has done almost next to nothing in wooing folks away from Java. Dynamic languages have been the huge factor in that regard instead. Nor does anyone in the Java camp feel much jealousy toward LINQ – there many other things they’re all much more concerned about. LINQ doesn’t get a mention any more in the Java blogsphere. It’s 15 minute of fame has come and gone.

    Elsewhere I’ve written extensively how the async i/o classes of Flex combined with the closure feature of AS3 is a better programming model for modern GUIs than the explicit multi-threading of C# .NET and Java Swing. So I won’t retread that here.

    The secret to the success of AS3/Flex/Flash-player is that it strikes the sweet spot of simplicity plus capability better than anything that anybody else has conceived as a RIA technology.

  8. Jonathan says:

    We are also comparing frameworks which can only be as good as their closed viewers. More than likely Microsoft will create a viewer and a framework for their platform which will out perform Adobe’s. Fortunately for Adobe MacOSX and Linux have been playing an increasing role and I am guessing they have a huge lead on Microsoft. So it depends on the client requirements of multi or single platform compatibility. (I am not convinced Microsoft can pull off MacOSX compatibility over time.)

  9. Jensa says:

    Hi,
    Sounds like you suffer from language-envy? 😉

    >But .NET is an extremely powerful language.

    Might be just me, but it seems like you confuse the framework with the language here? C# is really powerful, but there1s good reasons for me not to learn it. I just want stuff to work. I don’t care that much about fancy features, I want something that is fast, free and flexible.

    I highly recommend reading Hackers & Painters by Paul Graham (http://www.paulgraham.com/hackpaint.html) That book will put programming langages in perspective…

    J

  10. While I totally agree with you about the power the .net Framework (I’ve been using C# and the .net Framework since it was a preview called ASP+), I think MS is missing and will miss by a long shot strictly from lack of developer adoption. Most .net devs I’ve talked to are well aware of the power of SL but have little interest in creating the front end of engaging applications. They are way more interested in .net Framework with whatever language to create server side apps that feed the frontend while leaving the look and feel to a designer, who by the way, is not going to use MS design tools for creating SL content. That’s a whole other lack of adoption issue they are dealing with. Another reason is, IMO, MS doesn’t really care about the SL community. The whole stink about the Mojave Experiment site is a good example. Does it use Silverlight? Nope, that’s the Flash Player. MS may say they want devs to use SL but their own actions and the actions of the marketing agencies that represent them speak volumes about where the really stand. The one group I would say is trying to get it moving is the Moonlight group. They’ve worked really hard to port SL to Linux and deserve tons of kudos for their work.

    Honestly, I just don’t see it SL becoming a staple of the .net development community and if they don’t have massive adoption, it won’t matter how good it is.

    Guess we’ll see. 🙂

  11. mike says:

    Can’t remember the last time the client went “must have Typed Arrays”
    Do not recall the last time the client said “must have Generics”
    Did I ever hear a board meeting where they said “must have A decent reflection API”

    *DO* Recall a dozen clients wanting a creative, innovative, rich media solution NOW not with some BETA bollocks that nobody can view. Deployable, working, viewable useable by the paying public TODAY.

    Good luck in that meeting where you deployed silverlight, and the customers stayed away, perhaps you could say “but we have LINQ / Lamba expressions..”

    as Paris might say “whateva”

  12. Marty Pitt says:

    @Mike — Sure, clients don’t ask for generics, typed arrays, or a decent reflection API…but developers do.

    These are all really valuable tools in a developers toolkit, which enable them to write powerful, flexible code.

    My concern with Flex vs Silverlight, is that we’re seeing Adobe add a bunch of features to empower designers, but less to enrich the language for developers.

    And my point was never that Silverlight has a better offering today — it doesn’t.

    But it’s language set is more powerful, meaning that over time (and I’m talking several months, rather than several years) the gap between the two in the richness department will close as .NET developers rush to fill the gaps that MS have left.

    I agree that browser penetration will remain their major stumbling block. But if turns out that Silverlight has a stronger offering, this won’t take long to resolve.

  13. Marty Pitt says:

    @Jensa — Yep, I’m a .NET guy from way back. (I probably should’ve mentioned that!)

    And, I agree with you that the Flex framework does a killer job of letting us get things built quick. And I’ve worked on some pretty large scale enterprise apps that have been a success largely because of Flex.

    But, in writing those apps I often found myself reaching for techniques I’d apply in .NET which I can’t use in AS3. IMHO the lack of these features meant that the code quality suffered.

    The lack of an Abstract method or a typed array means that a contract on the class is less obvious to the next developer who consumes my class.

    And while you can always find creative ways to code around these situations, it generally results in less clear code.

  14. Marty Pitt says:

    @Dusty – You raise a good point about the need for another member within the team and the trade-off against time, one I hadn’t really considered.

    I’m not sure that the addition of these features would neccessarily make the language any more complex, just more powerful. I could be wrong though — maybe it would.

    In fairness, I don’t really know, I just wanna have my cake and eat it too 🙂

  15. Matthew Fabb says:

    Note that ActionScript is based on the ECMAScript standard. So that means unfortunately, the ActionScript won’t move forward unless the standard also moves. Typed arrays are only finally being added to ActionScript Flash 10 because they have finally been added to ECMAScript. Otherwise, I imagine that Adobe would have likely added typed arrays with the move from AS2 to AS3 in Flash 9.

    If you take a look at Flex framework language docs, the first classes at the top of the list are AbstractConsumer, AbstractEvent, AbstractInvoker, etc. A whole bunch of abstract classes, in concept at least without using the abstract keyword. Even in the Flash Player API, objects like DisplayObject are considered an abstract class that should not be called directly. So the Flash Player team would likely love to make real abstract classes as part of ActionScript, but unfortunately cannot because it’s not yet in the ECMAScript standard.

    If you look at Colin Moock’s FITC presentation on ECMAScript 4 (http://www.moock.org/lectures/newInECMAScript4/) they have added recently added things such as as generic objects, reflection and more. As long as they haven’t since been deferred (Moock’s presentation was last updated in April) from ECMAScript 4, these things are likely to be found in Flash 11, since ECMAScript 4 is supposed to be finalized by the end of this year.

    Unfortunately the biggest thing I think currently missing from the Flash Player, that is no where to be found in ECMAScript is threading. Out of all the items you listed, I think this is the biggest difference between the two technologies, which gives Silverlight a big advantage. Others mentioned above that user experience trumps all and I think they are correct and having the UI on a separate thread means Silverlight apps won’t freeze up when doing something complex. There are all sorts of work arounds for Flash/Flex, but from what I’ve read and seen (I’m a Flash developer, still learning about Silverlight) it works so much better with Silverlight and scales a lot better when trying to run these complex apps on slower machines. Not all applications need threading, but for the more complex ones, especially ones dealing with real-time data with fast updates, this is essential.

    Adobe has a huge head start, as install base is a big issue and I do think Silverlight has many, many years to go to catch up. In the time, hopefully UI threading will be added to the Flash Player. There’s already things inside the Flash player that works on separate threads such as socket connections. It’s just your ActionScript code that deals with these items that’s all on one thread. Perhaps something similar could be done with the UI? We’ll have to wait and see.

  16. RogerV says:

    The reason generics in C# is not going to win the day for Silverlight is similar to why LINQ ended up being a yawn to the 6 million plus Java developers after was all said and done.

    Java folk had for years already been spoiled by a plethora of various choices in ORM solutions (most of the really good ones being open source). LINQ came onto the .NET scene with no similar maturity to the fundamentals of ORM to give it any legs. A cart before the horse approach.

    It’s the vast eco system of mature Java libraries (most of them open source) and well worn working solutions that mattered the most vs the interesting language feature that LINQ represented.

    Silverlight is up against that kind of end-to-end solution maturity when its pitted against Adobe Flex (which is in beta release with its fourth generation iteration while Microsoft still hasn’t officially shipped 2.0).

    When one tallies up what counts in terms of building products based on a business rationale, Flex is there in spades. C# generics and LINQ count for less than zero in that particular comparison matrix.

    Silverlight remains only of interest to those that already know .NET programming. But take heart you guys, you can be programming Flex in a few days time (MXML/AS3 is very quick to learn and get started with) while still writing your middle-tier services using .NET. (There is an AMF for .NET effort.) Couple Flex on the client-tier to .NET on the middle-tier and then you have something that wouldn’t get you shot down for in terms of business viability.

  17. RogerV says:

    http://www.fluorinefx.com/
    FluorineFx

    FluorineFx provides an implementation of Flex/Flash Remoting, Flex Data Services and real-time messaging functionality for the .NET framework.
    Features

    Flex, Flash Remoting (RPC), Flex AMF Polling

    Flex Messaging

    Flex Data Services (partial)

    Supports AMF0, AMF3 and RTMP, RTMPT protocols

  18. Arpit says:

    Fast forward couple of years to now… with the release of Blend 3 and Silverlight 4.

    I think people will realise that the evolution of Flash from a simple plugin to what it is now has tremendously helped the direction in which Silverlight is going and Microsoft is clever enough not to make the same mistakes from which the Flash community has learnt in the past, the things which are now starting to appear in the Flash player.

Leave a reply to RogerV Cancel reply