71
votes

My company develops several types of applications. A lot of our business comes from doing multimedia-type apps, typically done in Flash. However, now that side of the house is starting to migrate towards doing Flex development.

Most of our other development is done using .NET. I'm trying to make a push towards doing Silverlight development instead, since it would take better advantage of the .NET developers on staff. I prefer the Silverlight platform over the Flex platform for the simple fact that Silverlight is all .NET code. We have more .NET developers on staff than Flash/Flex developers, and most of our Flash/Flex developers are graphic artists (not real programmers). Only reason they push towards Flex right now is because it seems like the logical step from Flash.

I've done development using both, and I honestly believe Silverlight is easier to work with. But I'm trying to convince people who are only Flash developers.

So here's my question: If I'm going to go into a meeting to praise Silverlight, why would a company want to go with Silverlight instead of Flex? Other than the obvious "not everyone has Silverlight", what are the pros and cons for each?

22
i too wonder the same, but this forum is too microsoft heavy, so i view any pro silverlight comment with a bit of scepticism.user158282

22 Answers

52
votes

I think you should look at Silverlight as a long-term play, just as Microsoft seems to be doing. There's an obvious balance on when to use Silverlight vs. Flash when you're concerned about reach and install base, but here are some reasons Silverlight is a good direction to move in:

  1. Second mover advantage - Just as Microsoft built a "better Java" with .NET, they're able to look at how you'd design a RIA plugin from scratch, today. They have the advantage of knowing how people use the web today, something the inventors of Flash could never have accurately guessed. Flash can add features, but they can't realistically chuck the platform and start over.

  2. Developer familiarity - While Silverlight is a new model, it's not entirely unfamiliar to developers. They'll "get" the way Silverlight works a lot more quickly than they'll understand firing up a new development environment with a new scripting language and new event paradigms.

  3. Being rid of the timeline model in Flash - Flash was originally built for keyframe based animations, and while there are ways to abstract this away, it's at the core of how Flash works. Silverlight ditches that for an application-centric model.

  4. ScottGu - ScottGu is fired up about Silverlight. Nuff said.

  5. Cool new features - While Silverlight still has some catching up to do with Flash on some obvious features (like webcam / mic integration, or 3d / graphics acceleration), there are some slick new technologies built in to Silverlight - Deep Zoom is one example. I'm seeing more "revolutionary" technologies on the Silverlight side, while Flash seems to be in maintenance mode at this point.

30
votes

There's two questions here: Silverlight vs. Flash as platform and Silverlight vs. Flex as RIA framework.

The first question depends on your timeframe. Flash Player has over 95% reach, Silverlight has no way near that. However, Silverlight may get there, it is after all backed by Microsoft. If you aim to launch a site next week and want a huge audience, Silverlight is not an option. If you aim to launch a really cool application that everyone would want to use it's a bit different, if your app is good enough your target audience may install Silverlight just to be able to run it.

As for the second question its a matter of how easy it is to develop applications in Silverlight. Flex isn't just a set of widgets, it's a very big framework that does a lot of thing that ease the work of the developer. You could write the same applications using only the core Flash API, but it would be very much more work. Depending on what's available in Silverlight, this should be an important factor when deciding. If you can cut development time, is having two platforms worth it?

22
votes

I think Silverlight is most advantageous for companies that have .NET developers but noone with designer experience.

Skill sets will be easier to find as far as finding C# or VB developers vs finding ActionScript guru's. However there is the trade off:

Design experience is an investment not only in Designers with artistic skill, but also in the knowledge and tools provided by Adobe. You can nearly guarantee that a professional designer uses a mac and has experience with Adobe tools.

Right now the Silverlight designer tools are half baked and can be a headache. For instance Blend errors when trying to render any xaml containing an IValueConverter, this is problematic. I have no idea what the Adobe developer experience is, I'm sure it is as hairy.

So at this stage of the game it comes down to human resources:

If you have .NET experience and little invested in Design skills go Silverlight. Programming skills/tools will be transferable. If you have Design experience and skill set go with Flex. Designer skills/tools will be transferable.

Either way both client platforms require communication with services to get data, so you will always leverage your existing programing expertise on the back end.

Paraphrased Jon's opinion from a different point of view:

I think you should look at Flex as a long-term play, just as Adobe seems to be doing. There's an obvious balance on when to use Silverlight vs. Flex when you're concerned about reach and install base, but here are more reasons Flex is a good direction to move in:

  1. Second mover advantage - Just as Adobe built a "better Java Applet" with Flash, they're able to look at how you'd design a runtime from scratch, today. They have the advantage of knowing how people use the web today, something the inventors of existing client platforms could never have accurately guessed. .NET can add features, but they can't realistically chuck the platform and start over.

  2. Designer familiarity - While Flex/AIR is a new programing model, it's not entirely unfamiliar to designers. They'll "get" the way Flex works a lot more quickly than they'll understand firing up a new design environment with new feature poor tools and new animation paradigms.

  3. Being rid of the RGB color model in Silverlight- .NET was originally built for windows and it is at the core of how it works. Flex ditched a long time ago for an design-centric model.

  4. All your tools run on your mac. Nuff said.

  5. Cool features - Silverlight still has some catching up to do with Flash on some obvious features (like webcam / mic integration, or 3d / graphics acceleration).

15
votes

We are doing both silverlight and flex, and here are developer's point of view for both.

Pros of Silverlight:

  1. Power of C#, Code Snippets, Reusing existing C# Algorithm Implementations
  2. Power of other languages too, Generics and Linq etc
  3. Power of Native execution of CLR instead of Flash's Action Script Interpretator
  4. One Integrated Visual Studio for All Development
  5. Expression Blend is really cool and more advanced editor then Flex Builder
  6. XAML is Search Engine Friendly
  7. Pretty nice state transitions and easy to define them
  8. Threading and Asynchronous Tasks
  9. Accessibility, no one knows that Microsoft always made the best accessiility features on all of its products, they always worked well with disabled people, comparing the browsers only IE supports full accessibility and Safari/firefox etc are no where closer.

Cons of Silverlight:

  1. Strictly Microsoft Platform, I know lot of people will argue but with current scenario, half of Intel Mac guys cant get silverlight 3.0 working, all PPC Mac guys cant use Silverlight 2.0 onwards, and No silverlight for Linux.
  2. There is mono, but not officially supported by Microsoft, it will always lag behind reverse engineering .NET and porting it on other platform, its not out of the box yet.
  3. Majority of components/controls are "Sealed" so its difficult to extend them and override to make new components easily.
  4. Bad CustomControl/UserControl architecture. E.g. you cant have XAML's root as ComboBox or any other control and let it have both design as well as code, you can create custom control but they are way too complex
  5. Binding requires component naming and does not support instance expressions like flex does, though two way binding is good in silverlight but you have to write long codes for multiple bindings for one math expression
e.g.
// this is possible in flex..
// but not in silverlight
<mx:TextBox id="firstName"/>
<mx:TextBox id="lastName"/>

// display full name..
<mx:Label text="{firstName.text} {lastName.text}"/>

Pros of Flex:

  1. Truely platform independent, supported on various hardware and operating systems and truely working everywhere great.
  2. Open Source makes it really easy to understand and extend the functionality.
  3. Every control/component can be extended and there are less restrictions overriding default behaviour.
  4. The most easy way to create new components, you can have mxml derive from any control and extend them with extensive binding
  5. Flex contains lots of controls and you dont need any third party library

Cons of Flex:

  1. Slow execution for iterative executions, no threads !! no async tasks !!
  2. Based on point 1, no great animation or graphics possible
  3. No generics, No other languages, No linq..
  4. Number class has a bug, cant store full 64 bit long value
  5. Eclipse is bad to design something great UI

Conclusion

  1. We use flex for data applications, those are simple form processing applications
  2. Silverlight for extremely rich graphics and animation
13
votes

The problem with Silverlight, is that there's still a lot of people who don't have it installed. Also, I"m not sure how well your existing .Net developers will be able to leverage their existing skills if they are only familiar with more traditional server-side .Net coding.

What are your reasons for pushing Silverlight over Flex? If you have to ask the SOFlow community for reasons, it seems odd that you would be so willing to push it.

11
votes

Another advantage of Flex development is that you can switch to developing desktop applications (Adobe AIR) with the same source code (and same IDE) and distribute them from web. You can check out this for the future of Flash platform.
Update Q3/2011: Flash 11 supports low-level 3D acceleration, and there are already many frameworks and major engines (Unreal Engine 3, Unity) supporting it. The selling point for the future, however, is that AIR application will work on Windows, Mac, Android, Playbook, and iOS platforms (Linux support has been dropped). With an absolute minimum of hassle between porting between those (at least when you have Adobe CS5.5+).

Update Q2/2015: Silverlight is officially dead. Adobe AIR is alive, but not thriving - it might be useful based on your skills and tool chain. Both Microsoft and Adobe admit that HTML5 is the way to go (whether with AIR or Apache Cordova or Visual Studio).

Update Q3/2017: Haha wow, who even uses Flash anymore.

7
votes

Not to forget:

Flex is very much cross platform, as it is compiled using as Java compile which means that you can easily use Mac or Linux when developing Flex applications. I've my current cruisecontrol setup (which uses Linux) I build build Flex applications, but the development guys uses both Mac, Linux and Windows.

In my experience, java developers feels quite at home in Flex Builder since it is based on Eclipse.

7
votes

You will never get an fair vote to this question on SO as it has so many Microsoft devs.

Also, people will probably down vote this answer, which says it all really.

I say let your developers try both platforms, and see which they prefer.

To answer the comments below, I just noticed that while there are lots of answers recommending Flash / Flex, the ones for Silverlight have many more up votes. It's not a matter of lying, it's just favouring what you're familiar with, not necessarily the best platform.

6
votes

Silverlight programmer's don't know what they're missing out on, when it comes to Flex. Silverlight lacks the component model and event triggering capabilites that Flex has. Using XNA, and C#, a friend of mine has to jump through all kinds of hoops to get his Silverlight application to work. Then, it has to be handed off to a designer to get it to look half way decent.

Listen to the deepfriedbytes.com podcasts on Silverlight, and you'll hear how even a couple guys that really push Silverlight, acknowledge some of these issues. (I think, if I recall correctly, one of the guys works for Microsoft, but I could be wrong - I listened to it last week). They agree that Silverlight isn't quite ready for any huge applications, in its current state.

I would go with Flex, for a nice clean, straightforward approach - especially if you're already familiar with Flash and ActionScript 3.0. Flex makes alot more sense, in my opinion - Silverlight still has to mature.

6
votes

At the end of the day, your developers should not be dictating your technology. This is absolutely a product decision that should be based on your users.

If you are deploying to the consumer Internet, the Flash Player or AJAX is the way to go. If you're deploying to a private LAN for a .net enterprise, you have options.

5
votes

Asa graphics designer, I've used Flash (on and off) over the last few years, and Silverlight (and its big brother WPF) over the last 1.5 years. Based on what I've heard from my team (all of whom are developers or former developers, if your .Net developers will be doing all the programming, go with Silverlight. I love Flash, but even with the OOP overhaul to ActionScript 3 in Flash 9 and up, it's still a somewhat quirky language, and going back and forth between AS3 and C# will probably drive your developers nuts :-).

For your designers, do the following:

  • Get them a copy of Expression Blend, the GUI development tool for Silverlight/WPF.

  • Blend has a somewhat steep initial learning curve, and the interface throws a ton of variables/options at you, so invest in some training, and give your designers time to get up to speed with the UI.

  • Speaking of training, get a subscription to the Lynda.com video library, esp. the Lee Brimelow Expression Blend training course.

  • Caveat emptor: Blend and WPF change rapidly, so sometimes you'll run into bugs in Blend that are fixed in the next beta/CTP of Blend. E.g. There was a bug in Blend 2 that prevent my storyboards (animations) from working in a recent project. I upgraded to Blend 2.5CTP, and it worked.

  • Silverlight content doesn't always seem to work with the latest Beta of the Silverlight plugin, just something to keep in mind if you're testing some new feature that's only available in the latest Silverlight plugin.

  • Invest in a powerful system (Quad Core, 4Gigs of RAM, etc.) Blend consumes a lot of resources, esp. when you have tons of layers. E.g. I'm working on an app with over a 100 layers(!) in the base app (and another 100+ in some of the user controls), and about 40-50 storyboards. Every few minutes, I have to restart Blend, because the UI stops responding (but doesn't freeze). Either that, or move everything you can into user controls.

5
votes

My team used to write rich web features in Flex, and now writes them in Silverlight.

Our reasons for this switch:

  • FlexBuilder is built on Eclipse. Eclipse is awful! Free, but bug ridden, glitch filled and slow.
  • FlexBuilder is twice the price of Expression Blend, which we get for free with MSDN anyway.
  • Flex is a pain to source control, it doesn't like being made to put files in one place and it doesn't play nice with other parts of your solution (we tried with SourceGear Vault and SVN).
  • Flex's version of ActionScript doesn't like most SOAP implementations, in particular it has all sorts of problems with .Net WebMethod ones.
  • Despite us using licensed Flex components periodically it decides that we don't have that version and adds demo-only watermarks in. The only way to remove this is to take the project to bits, reinstall Flex, reinstall the licenses and rebuild it.
  • FlexBuilder does not like Vista at all.
  • Silverlight acceptance is growing, once it was at the level where we could add it as a requirement for the relevant features we switched. If we were working for a web (rather than corporate) audience I'm not sure that we could have.

The rest of our project is .Net and C#, you may find all these issues less significant in a Java shop.

3
votes

As Kibbee hinted at above, the argument of leveraging existing .Net developers doesn't hold much water. It is impossible to be an expert in all facets of .Net development. The platform is just too big. The same goes for Java. The only thing Silverlight has going for it from a skills perspective is that you can code in your favorite .Net language. That advantage is fairly small if you are already doing any significant web development that utilizes JavaScript since Action script is a variation. So really to convert a programmer to either Flex or Silverlight is all about learning the platform's API.

3
votes

We went through this same issue and Flex won hands down. Our .NET developers were concerned at first, but after working so long in the pain of Ajax and JavaScript, they now LOVE and really enjoy working in Flex.

Here's a simple test for you . . . try to find at least 3 examples of real-world Silverlight applications (that aren't games, video players or gadgets). Then do the same for Flex.

2
votes

I think Silverlight and XAML is preferable to ActionScript, and though I'm not familiar with ActionScript IDE's, I am familiar with VS2008 and Expression Web/Blend, and they are very good development environments and getting better all the time. I would go with Silverlight, and I think the key to getting users to install the plug-in is to have a good plug-in detect page that explains what SL is and why they need it. For an example of this, go to http://memorabilia.hardrock.com/ and try it with your SL plug-in disabled.

2
votes

Although I have done work with Silverlight and am pretty excited about the ability to have apps living outside of the browser, one huge benefit of AIR is that is provides access to native drag and drop functionality. This allows you to build very user-friendly image or document uploads features (e.g. Flickr uploader). From what I heard, MS is not focusing on that kind of support yet (i.e. no plans announced).

1
votes

I use this rule of thumb: if your company is developing internet based multimedia software, and has customers with all sorts of platforms, and you are not doing database intensive applications Flex is the definite answer, if your company develops both internet and DVD based products, less interactive but more intensive (CPU, Memory) and uses ridiculous amount of database transaction Silverlight makes more sense

1
votes

Someone said: "Find 3 real world silverlight applications". Ok, I knew some off the top of my head but I googled it anyway. The list:

  • 2008 Beijing Olympics (stats here, 250TB of data delivered!)
  • Netflix on-demand player
  • AOL email client (may not be released yet)

Oh, not video players? Well that leaves the UFC application (it's a hybrid video/chat/other stuff) and the AOL email client. Silverlight excels at video and that's where it's gaining it's foothold but that doesn't mean it can't do other things. I see no reason to dismiss it just because it does video well.

Infoworld [link] said that "Silverlight has substantial technical merit and relatively good performance. It's a very capable RIA technology that's especially useful in the hands of programmers with .Net experience and designers with XAML experience." It's a good article for you to read regarding your question.

My answer: if you have a team of devs that are comfortable with .NET then Silverlight should be first on your list. If not, then it's a real tossup. I've seen articles say that Visual Studio is a superior development platform compared to what you use with Flex. But Flash is damn near ubiquitous.

Also keep in mind that Silverlight 2 uses almost no Javascript (I think none, but I'm not positive). So any avoidance of Silverlight because of JS is unfounded.

If performance matters, Silverlight wins there. I've seen my browser's CPU usage go to 100% many times and killing whatever window is running Flash always got rid of it. It's especially obvious in Chrome where you can see the process that's consuming your CPU. If your interested in Silverlight for gaming potential, look for QuakeLight, the Silverlight port of Quake. It's shaping up really well.

I really think it comes down to where your developer talent lies and what kind of application you'll be delivering. Simple game? Flash. Line of business app? Silverlight. In-between? Go with what your devs recommend.

1
votes

If you know .NET, Silverlight 3.0 is the way to go. I'm using it and I love it. I don't have to mess with AJAX or JS BTW (I have no idea what that guy was refering to, maybe SL 1.0) For data it's mostly async WCF calls (LINQ to SQL behind WCF) or XML files or RIA Services. It let's you use most shader FX, it has styles, control templates and the native access windows/mac clipboard. I can run high def video and most processes run very well even under slow CPUs. I also enjoy the data binding, control binding and the observable collections save me a lot of time. PLUS i can use LINQ, major time saver, not to mention using Visual Studio to debug with.

I'm developing enterprise .NET applications, so I know my install base and they will install the add-in (30 seconds usually). For a front end website, you may lose some users who don't want to install silverlight or don't run Mac or Windows. You CAN have apps with SL outside of the browser with 3.0.

I may be a biased .NET guy but I've been developing so quickly I have to recommend it.

0
votes

You seriously shouldn't use ANY of these ActiveX2.0 technologies. Neither Silverlight nor Flex...

First of all, both of them are nothing more then "distributed winforms frameworks with support for being ran in the browser", second of all they don't port well to other devices (specially true for Silverlight), thirdly they don't work good with other portions of your page. They don't work well for disabled people, etc, etc, etc. List goes on into infinity...

Adobe and Microsoft both tries to hide this fact really hard, but at the end of the day both Silverlight and Flex is nothing but ActiveX in a new wrapping...

Sure they run in sandboxes, are managed languages and all that. But it's still a big piece of BLOB being downloaded to run locally in your browser, AKA ActiveX...

0
votes

This is an old question, history has now spoken!

Silverlight has been as good as abandoned by Microsoft, it never got a useful install base. Party due to Microsoft not committing 100% to it.

Flash (hence Flex) is still going. However more and more browsers don’t support any plug-ins, so it is only a matter of time (years) before flush goes the way of Silverlight.

Maybe one day Flex will be re-targeted to HTML5 with no plug-ins….

The iPhone was spoken, and it said the only option is Apples Way or HTML5.

-1
votes

Flash Player is available & supported officially in almost all desktop platforms (Windows, Linux, Mac) whereas Silverlight will be supported mainly in Windows.

the following article provides comparision of both the platforms.