Subscribe

  • Subscribe  

Why Silverlight Lagging Behind Flex and Continuing

Posted by Charles | February 10, 2009 .

I thought about using a more provocative title like “The Charges against Silverlight.” But decided left it out because this is a serious technical discussion, not a flameware for eye balls.

While getting deeper into a Silverlight project, the frustration I’m feeling grows. Silverlight 2 indeed is a big leap forward comparing to version 1 in terms of development capabilities for ordinary developers. However, if you have decent enough experience working with Adobe Flex, Silverlight is still a very awkward product within the RIA development context. Hence, I believe it’s still behind Flex. I believe if Microsoft does it right, that lagging behind could be only in months, which will be a serious sooner-than-expected threat to Adobe and a huge benefit to Windows RIA developers. But, I don’t believe the current Microsoft development culture supports my optimistic thinking on Silverlight. Therefore, the lagging behind will be in at least a year if not years. Let me explain why (for all above statements).

Let me start with couple of lacking items I’ve encountered during Silverlight development.

Composite Application Development

I wish less and less people are still building applications and growing features by compiling code (piling up code) to giant monster programs. Check out what’s composite application architecture is if you are. Adobe Flex has this Module framework built into the Flex SDK framework. It takes almost no coding to allow you design and develop composite application with stand alone application “pieces”, swf files in Flex, and dynamically load them into application domain for execution. This build-in feature gives birth to simple composite application design such as the Flex Viewer. Don’t mix that concept with DLL if that’s what you are thinking at this moment. Can it be easily done in Silverlight? No.

Silverlight doesn’t have build-in feature to do that, now WPF if you are thinking in large. Microsoft is aware of that and knows about the design patterns behind it, which have been widely used by JEE and ActionScript developers in years. That’s why Microsoft’s Pattern and Practice group has this CompositeWPF in place. But first of all it doesn’t work for Silverlight because it’s for WPF. Behind the scene it relies on another package called ObjectBuilder and another one called Unity.  There is a brave soul claimed solved the puzzle with modified Unity and make it works for Silverlight but it will take another brave heart to actually make that works. I’ve spent hours reading through all the source codes Microsoft employees produced for CompositeWPF and other needed libraries, in the mean while I pretty much used up my next 5 years of curses. My bad for the cursing part. At this point I’m ready to get punched by Windows developers. But wait just seconds longer.

All those beautiful design patterns behind composite application development have existed for many years. JEE folks did earlier implementations. Flex/ActionScript folks learned a lot from JEE development and they didn’t reinvent the wheel. If you get the chance (highly recommend) to read the source code behind the same design patterns in Java, ActionScript (in Flex SDK) and CompositeWPF  (or whatever Microsoft employees produced code), you would find the same thing I did. So far, the most elegant and simple implementations are done by Flex guys. The Microsoft employees’ way of doing it is like 10 times complicate than both Java and ActionScript do. I know why but I’ll hold that for later. Anyway, if the punches are still there, why not cancel it for now, don’t take my words but go read the codes yourself. If you don’t know Java and Flex and careless about finding out what they can do, don’t touch me, ever.

BTW, if you do read source code in both Flex SDK and CompositeWPF, you will find out the Microsoft guys are actually mimicking Flex’s Module framework (not a surprise) in many aspects, plus just much more complicate.

Having said all these, if Microsoft is willing, it’s not that hard to put Module feature into Silverlight in no time. But I doubt.

Dynamic Theme

Flex developers should be very thankful to Adobe that they are not forced to work with Flash Studio for skin or theme, even though it’s an viable option. Flex developers can have very elaborate themes with custom control states using just standard CSS. And the theme can be stored stand alone, dynamically loaded into a Flex application and switch themes dynamically. All these can be done in a couple of very simple lines of code. Not the case with Silverlight. Silverlight does has the style and template frameworks. But you can’t put it into separate files freely and willingly. You have to use Flash studio alike Blend to do theme(skin). You can’t dynamically load the theme in and apply new theme dynamically.

If you really desperately want to have the similar thing as Flex does, Nikhil Kothari, the guy behind Silverlight gives you some goodies from his SilverlightFX library. If it works for Silverlight 2 (so far not), then still you need a big chunk of third party code to be inside your application to get something so simple, easy and taken for granted from Flex. You can look up further. For example, Juergen Baeurle tried very hard to come up with a good amount of code to merely just allow Silverlight be able to use style code stored in separate files. I know this is where Flex developer would laugh but please don’t. I’m working with Silverlight now. Silverlight is not that bad. It’s just behind. The badness goes to Microsoft employees, otherwise Flex developers won’t be able to laugh that much soon.

I’ll later put out other lacking items I found comparing to Flex, such as the not so streamlined packaging and deployment, the way too many points of truth for development, error prone and way too sensitive namespace stuffs with many ways to solve them but not everything and every time works, lazy compiler won’t tell you that your code sucks, and so on. I’ll talk about what Silverlight has but lacking in Flex as well, such as LINQ, etc, which are very beneficial for windows based enterprise application development. But that’s later.

Now, let’s answer the question, why Silverlight will continue lagging behind and what has to do with Microsoft employees?

Because there are way too many truly above average smart people working inside Microsoft. The only outcome of it is everything comes out of Microsoft is way way too complicate than the reality needs. By reading their code (Microsoft employees’ code) and comparing the same implementation in other languages you will know what I mean. It’s hard as a Microsoft employee to get stand out because there are too many of them at the same (high) level. Microsoft throws lots of money to collect them. To get ahead, you need produce something very intelligent and very computer science and to be understood by as less people as possible. You don’t want some other guy come in and say, “you didn’t handle that situation.” And, you don’t want to answer, “the chance that situation will possibly happen is one in million.” No, you can’t say that, because you are a smart dude working for Microsoft so that you need get all the bases covered and save the world. Just imagine you put bunch of Einstein (or people think they are Einstein) inside a room. I bet nothing good will come out it. Anyway, that’s why those code produced by Microsoft employees are good but I’ve been cursing all the way when reading them. The codes are doing too much. I understand the coders have to in that kind of environment and culture. Just amplify the observation some, it makes sense now why Windows OSs have all these problems and it’s hard to get fixed, let alone sometimes a totally failure like Vista. It’s all because Microsoft has too much money throwing at problems with more smart people get involved to fix them. The result will be always opposite and getting worse.

Let’s get more constructive here. So, any suggestion to Microsoft? Yes. The answer is simple, laying off another or two of 5K. Don’t get me wrong. This is not Microsoft bushing and mocking. I think it’ll really work to make Microsoft a better company. Both Apple and Adobe are doing well is because they are small and have much smaller collection of highly smart people. They have to be creative and making things simple to compete and fully utilizing their resource. Smart people in that type of small environments can easily stand out and has less time to produce over complicate junks. Microsoft should do that and hold tight its bank account. The down side of this solution is that the 5K or more unlashed out of Microsoft can pollute the rest of industry. These are good and high quality people and can be easily hired into the industry to be in lead position.  However, old habit will stay for awhile unless forced to get rid of. So, the ideal or responsible solution from Microsoft is to setup and put those people into fix price based consulting business for a year or more. That will retrain those people how to get real than to save the whole world every time when writing a line of code.

Can Microsoft does that? I doubt. That’s why the same culture will drive the same bunch of developers doing the same type of software development and will produce the same type of outcome. Thus, Silverlight will continue lagging. However, for my own benefit, I do wish I’m wrong.

Leave a Comment

If you would like to make a comment, please fill out the form below.


Name

Email

Website

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Comments

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word


Related Posts

8 Comments so far
  1. John  February 10, 2009 11:33 am

    I think another issue hurting Silverlight is the complete lack of Mac tools. There are plenty of designers & developers out there on the Mac platform who would play around with SL if we had the tools to work with. I asked last year at Microsoft MIX and got no response. I asked again when I bumped into a MS engineer who was attending Adobe MAX in November, no response. Using Parallels or VMWare is a horrible option (and doesn’t work very well). If we can’t play with it in our free time, then we won’t have any interest in it. No interest translates to less blog posts about it or less twitters about it, and then less suggestions on how to make it better, etc.

  2. Ryan Cromwell  February 10, 2009 12:36 pm

    Two points:

    1. CompositeWPF does work for Silverlight (most of it :)). Maybe not when you used it, but it does now.
    2. Styles and Template CAN exist in seperate files. Styles cannot be changed at runtime for an Element to support runtime theme swapping as you state.

    My Opinions:

    Flex is ahead… it’s been out there longer. It’s design story is much better and probably will remain there for some time due to the Adobe focus in that market.

    Silverlight will gain traction because of the number of .Net developers overall. The learning curve is smaller.

  3. Evan  February 10, 2009 2:41 pm

    Totally agree with the Microsoft Culture. I think another necessary step for Microsoft to catch up is by brining a new breed of leadership. They over-think, over-complicate all of what they do. It’s time for some new bright minds to step up and send Steve B on his way.

  4. Mark  February 10, 2009 8:41 pm

    Since Flex can call anything on the serverside, it can use LINQ. :)

    Anyway this is why JavaFx has a chance. It has all the good things from the past and the future.

  5. Tom Van den Eynde  February 11, 2009 12:28 am

    I wonder how long it will take before Scott Barnes jumps in :)
    Anyway – it’s not very nice of you to suggest to lay off people given the financial crisis…

  6. Charles  February 11, 2009 10:44 am

    @Tom
    Agree, my bad using the word layoff. It’s a dirty word in today’s world. I should said “transition” because the suggestion was to put them into service business rather than software development. Also, breaking up MS may not a bad thing either.

  7. Evan  February 12, 2009 10:02 pm

    Someone tell Adobe to fix FLEX’s GUI builder Designer. Complete junk, full of bugs. Totally unusable. Silverlight and Expression isn’t that great either (not even integrated within VS) but at least it works.

  8. Rabih  August 21, 2009 6:35 am

    It is true that Flex can make use of LINQ on the server side, it is also true that some of LINQ is at the client side as well!! check out this: LINQ to Objects for FLEX

<

Direct TV Offers - usdirect has the best directtv deals