Flex and WPF: A comparison – Part 1

In this series of articles I will try to do a head-to-head comparison of many of the features in Windows Presentation Foundation and the Flex platform. In many ways these platforms embody similar concepts, but are also different in their own unique ways. As a Developer/Designer it is important to have a good understanding of the available choices when developing solutions for your clients. When I say solutions, I refer to Frontend development, the presentation layer. Having this knowledge enables us to borrow good practices from either camp to solve problems. A good example I can think of is the Cairngorm architecture for Flex, which is also equally applicable to WPF.

Windows Presentation Foundation (WPF) is a great step forward for UI development on Windows. It is a much simplified programming model that incorporates good OO principles, Design Patterns and proven practices right out of the box. Plus it is powered by a rich .Net framework 3.0 API that makes it an obvious choice for any new application development on Windows. It has a consistent model for developing for both Desktop and Web applications. UI development on Windows has not been particularly easy until Window Forms arrived with the .Net framework. Although WinForms made it a lot easier to develop UIs it still wasn’t an easy task to provide a rich user experience. So it was left to Third parties to develop frameworks/libraries for doing things like animation, formatted text, custom layouts, 3D, etc. Though it was technically possible, each framework/library was different and suited only to particular scenarios. What the developer community really needed was a single, consistent and standardized technology for doing UI development. WPF was the answer.

A similar story exists for the Flash community. Flash was capable of delivering rich experience from the very early stages. It had the technology for mixing text, images, animations, videos and even 3D (although using third party products). Over the last couple of years, there was a shift to bring Form based development into Flash. I think it was in Flash MX 2004, when the Data components were introduced, thus making Form development easier. However it didn’t seem like a deeply integrated solution. For example it was not easy to mix custom animations with the data components. Here too the need was felt for creating a unified platform for developing rich experiences which integrated UI components with the rest of the Flash technology. Flex was the answer.

It is thus clear that the technology offerings from Microsoft and Adobe have moved towards unification of all the UI capabilities, available thus far only as separate components with no common theme. Additionally each platform also does a clear separation of the presentation from the data, similar to the CSS – HTML separation on the web. With this separation it is possible to have a more natural workflow between the Designers and the Developers, something that was difficult earlier. The toolset that these technologies provide take that into account and make it clear where these boundaries exist. Microsoft has an Expression family of products specifically targeted at this workflow. Similarly Adobe has their popular Creative Suite that incorporates this kind of workflow. With CS3, Adobe will make it even easier to seamlessly exchange assets between PhotoShop, Illustrator and Flash.

In the next post I’ll dive deeper into the specifics of each technology and how they are similar.

Hello! from FlexWinds

This is my new blog where I chronicle my adventures with Flex, Flash and Apollo — which in my opinion are some of the coolest web-client technologies. I come from a .Net background and have worked extensively with Windows Presentation Foundation (WPF). I have a WPF blog here. Of late I have been delving deeper into Flex. I have had experience with Flash/ActionScript/JavaScript earlier, so it was great to pick up Flex and play with it.

In addition to just talking about flex and my adventures, I will also give a perspective of how it compares to the world of Windows Presentation Foundation. There are similarities at many levels and I will try to point that out. In fact if you are a WPF developer, learning Flex should be natural. It feels like migrating from Java to C#. However there are many elements in Flex which are actually superior to WPF, eg. Data Binding. I say superior not in terms of power but in terms of ease-of-use. Topics like this and many more will be explored.

I have come to the world of Flex a little late and started playing with it only after the 2.0 release. I think the Flex community is doing some really cool stuff and I would love to be part of it. Look out as I post more of what I learn, hear and create. Welcome to FlexWinds!