Friday, January 25, 2008

Windows Presentation Foundation (WPF)

WPF or Windows Presentation Foundation is an exciting presentation technology from Microsoft shipped in the .NET Framework 3.0 Version along with other technologies called Windows Communication Foundation, Windows Workflow Foundation, and Windows CardSpace.

It has been in the air since long back and I always used to wonder why some critical business application would require such a flashy jazzy user interface technology. Now that I got a chance to work in WPF, I am slowly realizing its benefits and potential.

Earlier the applications were command prompt based. Then came the GUI (Graphical User Interface) revolution that introduced the end users to windows, buttons, drop downs and so forth. But after that, there has been nothing exciting in the user interface world for desktop applications, though the web went through a fabulous UX (User Experience) change. Windows Forms that appeared with .NET was just a better version of old GUIs.

Now there is WPF with an entirely new set of features and technologies that makes it possible to define the UX of desktop application user to a new level. Of course Windows Forms will continue to be in the field, especially for LOB (Line Of Business) applications, but WPF can be used to make compelling data visualizations for applications that require a pleasing user experience.

Developing stunning applications in WPF is much easier than we might think of. In earlier technologies audio, video, etc were islands in an application. With WPF, a single API can be used for all of this. A video can be part of an application just like a button or label.
For example the below code snippet creates a Windows Vista Style Button with content as a playing video.

<Button Height="100" Width="200">
<MediaElement Source="C:\Users\Public\Videos\Sample Videos\Butterfly.wmv" />

The new XAML language helps in creating the UI layer keeping the business logic separately in the code behind files. With features like Templates, Styles, and Animations WPF is opening up a new arena where a normal developer can now create ‘cool’ apps!

No comments:

Post a Comment