Symmetri, Software Development, Melbourne, Australia

Flex vs Silverlight


Shourov Bhattacharya, Symmetri
22nd September 2008

The term “Web 2.0″ can mean a lot of things to a lot of people, but one thing that most would agree on is that one part of the “Web 2.0″ revolution is the development of a new generation of applications known as “Rich Internet Applications” (RIAs). Loosely speaking, RIAs are web applications that do not behave like traditional web applications; they offer a user experience that is fast and interactive and hides the server/client post-and-response cycle from the user. The earliest prototypes of RIAs used client-side Javascript to manage change in parts of a traditional webpages without having to refresh the entire page; in time, this led to the development of what is now known as Ajax. From a different direction, many developers (including myself) began using Flash to build user interfaces that were visually rich but difficult to create and manage; as Flash did not natively support many of the activities needed for building interfaces, we were forced to build our own code to do even simple tasks such as a building forms and managing common components.

The past year and a half have seen a quantum leap in RIA development. Adobe has released Flex, a new development environment that synthesizes Flash/AS3 with HTML-like front-end code to build RIAs that run within Flash Player 9. Microsoft has released Silverlight, a RIA platform based on .NET which allows applications to run within the browser using the Silverlight plugin. Both of these technologies seek to leverage off existing technologies: Actionscript 3 for Adobe, C#/.NET framework for Microsoft; both allow the developer to quickly create and deploy visually impressive and functional web applications.

So which way to go - Flex or Silverlight? I am facing that decision for a new project that involves developing two web applications: a smart client application that needs to run as either a disconnected or connected client, store data locally and upload to a server; and a server-based web application that creates reports based on that aggregated data and makes them accessible on the Web. I want to build an RIA for both - I have ruled out doing in the traditional way (deskptop app/web 1.0 application).

There are plenty of forums and articles out there that compare Flex and Silverlight; as usual when developers discuss their choice of technology, much of the discussion can get quite heated and parochial. It is hard, sometimes, to judge things on an objective basis when people’s opinions are so often coloured by their prejudices about Adobe and Microsoft. As a developer I can honestly say that I do not share those prejudices; I have spent almost exactly equal time developing in Flash/AS3 and .NET over the past two or three years, and I am equally comfortable with both the technology and support tools for both.

Here is my attempt at weighing up the pros-and-cons for each technology (although I am thinking within the context of my new project, I believe the issues are general enough):

Adobe Flex:

Pros: more mature technology with a larger developer community (as of now) which means better support; leverages off existing AS3 knowledge; can use Flash animations; Adobe AIR makes it easy to build RIAs that live both on and off the web; Flash Player 9 available on 97%+ client machines; both development process and the deployed application run truly platform-independently

Cons: Flex Builder 3 IDE costs about $500;

Microsoft Silverlight:

Pros: leverage off existing C#/.NET domain knowledge; VS2008 superior IDE (IMO) compared to Eclipse based IDE of Flex Builder; integrate seamlessly with traditional .NET 3.5 web apps; can launch from local filesystem and run as a desktop app; Silverlight plugin for all browsers

Cons: need VS2008 license $800+; cannot develop on Mac OSX (as far as I can see); Silverlight plugin is not as widely installed as Flash Player 9; newer technology that is just out of Beta and therefore has less of a developer community

I have decided to use Flex. I am more comfortable with the Flash Player as a platform right now than I am with the Silverlight plugin, and I am also conscious of how hard it might be to find good examples and support when developing with Silverlight; in the context of a commercial project, those inevitable bottlenecks can make or break timelines and budgets. Also, I like the flexibility of developing in Mac OSX as well as Windows, and I cannot do that with Silverlight; and I think that the Adobe AIR provides as excellent solution to my problem of creating a disconnected desktop client that can also run within a browser.

These are exciting times for web developers. Both technologies are impressive in their own right, and there isn’t that much between them. I suspect the market will decide on a combination of both, and neither Adobe nor Microsoft will find it easy to dominate the RIA space.

Microsoft Silverlight showcase: http://silverlight.net/Showcase/
Adobe Flex showcase: http://flex.org/showcase/