From Flex to Silverlight

A couple of years ago my company started development on a web product that had designs for a very rich user interface. We started out building a AJAX HTML based application and realized very soon that we were having to work really hard to make HTML and CSS do what we wanted it to do and in many cases it just wasn’t happening.

Our UI designer was doing prototypes in Flex (which I didn’t know what it was at the time) but his stuff was really cool and we starting talking about it. I was skeptical about Flex at first, but it turned out to be a real platform for developing rich Internet applications. Anyway, to make a very long story short, we chose Flex as the front end of our .NET web application.

In the beginning Flex was cool. It gave us a strongly typed object oriented language (ActionScript 3) and IDE support in Eclipse. We were able to develop some really slick things in a fraction of the effort if we would have done them using DHTML/CSS. It was good, but working in Flex did have its negatives as well. Some of the things that we struggled with were

  • We’re .NET folks, so there was a learning curve
  • Extra time in working with two IDE’s to develop in (Eclipse and Visual Studio for Flex and .NET respectfully)
  • The IDE plug-in was very buggy
  • No refactoring support
  • No real testing support
  • Compiles painfully slow on large projects
  • Not a lot of support from Adobe when we would have problems

I had been keeping my eye on Silverlight waiting to see how it was all going to play out. When the first beta of 2.0 came out, we started looking at it hard. Then in April at ALT.NET Seattle, I had the opportunity to steal a few moments of Scott Guthrie’s time and ask him about what to expect from Silverlight in the future. The guy’s enthusiasm about what they were doing completely sold me. We started our Silverlight project that following week and haven’t looked back.

I’m truly digging Silverlight. It is amazing to be able to write .NET code that runs in the browsers. I even forget that I’m working in a browser sometimes. There are a few things we miss from Flex, but nothing we couldn’t create ourselves without too much effort. Some of the things we now get to take advantage of are

  • All the C# language features
  • Passing .NET types to and from the server
  • Reflection
  • Testing Tools
  • We able to use Resharper (can I get a “heck yeah” for this one?)
  • Support of Microsoft

That last point is really important. Microsoft made us part of their early adopters program and we so have good channels of communication with the team. We tried to do something like that with Adobe, but I guess we never talked to the right person.

I think the Silverlight team has done a great job and I’m looking forward to the future releases.

Technorati Tags: ,,

About Ray Houston

Ray is a software development leader and architect with 20 years hands-on experience. He enjoys finding elegant solutions to complex problems and delivering real value to customers. Ray is a speaker and contributor to community events.
This entry was posted in Uncategorized. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

20 Responses to From Flex to Silverlight

  1. Matt says:

    How did your designer deal with the change from Flex to Silverlight?

    One of your points is that you didn’t like working in two IDEs. Don’t you find yourself still working in two? Visual Studio and Blend?

  2. Ray Houston says:

    @Matt – Our designer had the most learning curve when making the switch but he really did his homework and starting reading a ton about WPF and XAML. Once he figured out how he could make it do what he wanted, then he was all for it. He too has been disappointed about some items mentioned above when working with Flex.

    As far as having to use two IDEs, he is the only person on our team that uses Blend. It is a pain point for him to switch back and forth, but he fully embraces Silverlight and believes it was the right change.

  3. Sidewinder128 says:

    Nothing to look here on this blog, It is a bunch of rubbish.

    I was specting a technical review comparing Flex with Silverlight to evaluate if technically Silverlight is more capable than Flex or vice verse. But Nothing here just a rant to Flex and biased to Silverlight.

    Note to the author: Of course if you are a .Net programmer you will choose Silverlight anytime that is obvious Microsoft created Silverlight and .Net and also because the Framework is the same as the WPF in .Net but let me tell you Flex it have also nice features and technically are different, you should point the diferences.

  4. ms says:

    does silverlight require a ms server to serve the web pages?

  5. Ray Houston says:

    @Sidewinder128 – Pretty much everything I say is rubbish, so no argument there ;) . The tech differences would be a topic for another post. Flex does have some nice things about it and we’ve had successes with it. I’m only stating that we’re happier with Silverlight.

  6. Ray Houston says:

    @ms – no, the Silverlight application is just a file gets loaded by the Silverlight plug-in running in the client browser. Any web server should be able to serve it up. You can host the plug-in in a normal HTML page if you wish.

  7. the mistake is compare Silverlight to Flex bat you must compare with Flash. As developer you can switch but if your job is Designer you can switch ?? No designer use MS Blender.

  8. Darren says:

    I’m not convinced that 3,4 and 5 of the Flex cons are still valid. The current Eclipse plug-in (Flex 3.1) isn’t buggy at all, there is now refactoring support (still not as good as Java though and probably .Net), and there is either FlexUnit or AsUint for unit testing (and has been for some time). Profiling in Flex 3 is handy too. Also echoing the point above – what designer doesn’t use Photoshop/Illustrator/Indesign? The integration with Flex skinning is far greater with these and will be much more so in Flex 4/CS4/Thermo. Since you are already .Net developers though, it’s easy to see the attraction of Silverlight in your case.

  9. Adrian says:

    I have never had an issue with the Eclipse plug-in for Eclipse. Going between two IDE’s isn’t an issue with Flex, but rather your IDE platform choice.

    I still have not yet seen an actual business application built in Silverlight, aka Silverlate.

    Darren pointed out the rest of the items. This comes across as a .net developer team that would use silverlate no matter what.

  10. Ray Houston says:

    @Darren – you may be right about the bugs and the latest version. We only briefly used 3 when it first came out before we switched.

    I remember the refactoring support in version 3 to be pretty lame. VS.NET doesn’t have great refactoring support out of the box either, but with Resharper it is awesome. We always wished we would have had Resharper for Flex.

    As far as FlexUnit and AsUnit, they were better than nothing, but don’t really compare to what you can do with .NET (mocks, for example). It was always a pain when working in a single area and having to comment and uncomment tests to keep from running the whole suite. Maybe there has been improvements since then?

    I agree about the profiling in Flex 3 which was pretty cool.

  11. RogerV says:

    About this business of Flex support:

    The Internet is chalk full these days of Flex evangelist and consultants in terms of their blogs and forums – many with RSS feeds. Any of these guys are pretty darn easy to approach. Just for a starter, try James Ward. Very nice guy and very helpful with advice and pointers of who to talk to.

    Also, Flex is about to go 4.0. That means it’s about to be in its fourth iteration of refinement and improvement. It really hit critical mass with Flex 2.0 and soon topped off with the excellent 3.0 release. Flex has been at production quality, shipping release for so long that many of us doing Flex development are now on our second and third generation project efforts.

    By the same token, with all this maturity of the Flex RIA platform, there are by now a bounty of Flex and ActionScript books on the market. Most are certainly up to date on 3.0 (and AIR). There’s now a book that explores every angle of this platform. The quantity of Flex books vs. Silverlight, gauging by how many are on the shelves at the B&N in Bellevue, WA (Microsoft’s backyard), looks to be a ratio of about 10 to 15 Flex related titles to Silverlight.

    This post mentioned Seattle. Well, the SeaFlex meets monthly and has had great guest speakers. These guys are always availble to chat with after their talks. Plus SeaJUG is guided by some Aldus employees, given that the meetings are held on the Aldus Seattle campus. Just show up to these meetings and you’ll find folks able and willing to assist with Flex technical questions.

    To be a Flex developer is to wallow in a vibrant and expanding developer community.

    As to MXML and ActionScript3, AS3 is derived from a JavaScript heritage, yet has attributes of Java (package namespace, classes with inheritance, interfaces, access control), and a few nice inclusions from C# (events and properties), plus other niceties of note like data binding and closures. AS3 is a capable language and easy to learn for any Java or C# programmer.

    AS3 is a very well balanced language that is concisely dialed in to the task of programming a rich GUI running in a web browser. Its programming model is rather easy but capable. Instead of explicit threading it uses async i/o (coupled to closures). It’s not weighted down with features or APIs that are not relevant to a GUI web app. Apps running in browsers do not access a database directly, but interact with HTTP web servers. Hence there’s no JDBC or ADO.NET – or LINQ. Yet with its collection classes and closure feature, you can use AS3 to do functional style programming. (Bruce Eckel has a great article on this over on the Artima web site.) When it comes to programming an SDK designed the way Flex is, MXML coupled to AS3 is a better tuned combo that something based on Java or C# would be. After you get familiar with AS3, one becomes thankful that Flex is not founded on those either of those two heavy-weight languages.

    Lastly, now that the Olympics has come and gone, the Microsoft deal with NBC has concluded. Without an on-going monetary incentive provided by Microsoft, NBC has now dropped Silverlight and has returned to using rich media compatible with the Adobe Flash Player. This was Microsoft’s big chance to get some momentum going for Silverlight adoption. It didn’t even have success with partner NBC. NBC was compelled by business reality to go with the most ubiquitious platform standard on the Internet – the Adobe Flash Player. While seeded on to ~ 95% of browsers accessing the Internet, it exceeds the reach of HTML, CSS, DOM, and JavaScript as a web platform standard (which, of course are different across different browsers and is thus highly fragmented).

  12. RogerV says:

    (Boy, where did Aldus come from? Aldus got swallowed by Adobe back in ~ 1994. Of course I meant the Adobe campus.)

  13. RogerV says:

    Our designer actually likes to use Flex Builder to prototype wireframe concepts in. I pointed him to a Visio template package for Flex look and feel, but he found the Flex Builder easy enough and more expressive for his purposes.

    He uses Adobe Illustrator to create scalable images that he saves as .swf file format. We directly include these as resources in our Flex apps. They scale very well and look much better that pixel-based image design. It’s nice to have a professional tool like this for designing portable art-house vector graphics that works well on all browsers where our apps run.

  14. I said this before. I think Flash/Flex and Silverlight are targetting different audiences. Adobe’s products are more RAD with ties to their graphical products. However, Microsoft has the advantage with .NET (C#, WCF, Data Services). That advantage is HUGE.

    For example: To me (if I understand correctly)…Flash/Flex doesn’t have “true” multithreading still. How can you take a framework like that seriously. (I know that some things are async by default, but I am talking about a true multithreaded API).

    I have written a couple articles about Silverlight and multithreading and have received pretty big performance gains by doing so.

    Someone correct me if I am wrong, but just google Flex and/or Flash and mulithreading.


    I am going to piggyback on my comment to you. You state the vibrant/large Flash community. It took me several hours and questions on boards from Flash/Flex developers to try to figure out if it supported multithreading. Finally, I got a post on my blog by Matt Farb to describe “sort-of” multithreading with PixelBender.

    Try googling this on google (Flash multithreaded). My Silverlight blog comes up on the top on some search derivatives :) I would challenge that Flash/Flex has that much more information out there.

  15. kadypk says:

    Interesting article. One quick question. Can you say anything about your experience with deploying your application? For example, is your app intended to be used on the open web, or only internally within an organization. The reason I ask is that I’m curious about adoption issues on the open internet. For example, how many of your potential users may not have tried the application because they may not have wanted to install the Silverlight plug-in?

    Just curious.


  16. Ray Houston says:

    @kadypk – I probably should have mentioned this in the meat of the post. We’re developing data driven business applications for private companies which will be used internally, so no we don’t have to worry about public acceptance. Also, we are not developing applications that focus on animation or video streaming.

  17. You mentioned the C#language features. Forget that, and refactoring. Start using IronPython or IronRuby for you Silverlight development, and you’ll see you can improve your productivity.

  18. Roy Adam says:

    +1 for Silverlight.

    There are a lot of community driven controls coming up for Silverlight. is a nice example.

  19. Loam says:

    some great tips -many thanks

  20. Bruce says:

    I have learned both.

    Technically I prefer Silverlight.

    Realistically, Flex (with PHP) is a better choice for developing and selling web apps for small companies.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>