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.