WPF vs. Windows Form


One benefit big corporations provide to their IT people is that they don’t have to keep up with the latest technology to keep their job. That’s why it is 4 years after WPF was introduced with Visual Studio 2005, I learned about it for the first time.

WPF (Windows Presentation Foundation), a component of Microsoft .NET Framework 3.5, is a new platform for building rich user experiences on Windows. WPF supports UI, media, documents, hardware acceleration, vector graphics, scalability to different form factors, interactive data visualization, and superior content readability.

Now you open Visual Studio and try to create a Windows project, you  have an option to create a traditional Window Form project or a WPF project. What are the differences, and which one should we use?

First of all WPF is not replacing Windows Form. Microsoft has also announced that Windows Forms, widely utilized for traditional “forms over data” applications today, will continue to be supported for years to come. With its easy support to multimedia, audio, video, 3D and animation, WPF can create a UI Candy, that Microsoft puts more focus on since Windows Vista.

WPF forms are written in XML like Extensible Application Markup Language (XAML), which are rendered by a graphical composition engine at run time. This made dynamically loading UI controls from web services very easy, therefore, WPF is used in a more widely utilized environment, the web, to support Silverlight, the Microsoft version of flash.

Using XAML to write WPF forms made Windows Form developement similar to creating web pages with HTML. One big advantage is that designers and developers can work on the same form using different tools. Microsoft has a Software called Expression Blend that is used to design WPF forms. The designed forms can be easily opened in Visual Studio to be edited by the developers.

So, what’s the point for Windows form?

Well, WPF is still growing but Win Forms are very mature. There are a lot more controls and 3rd party component for windows forms. Also, WPF’s rendering UI at run time from XML gives Win Forms a slight advantage in performance, for now. Last but least, Visual Studio provides so many features for Windows Form development, and I’m sure Microsoft is working towards providing an environment of same greatness for WPF development .

The above is a comparison of WPF and Windows Form based on my experience. For more information, you can check out the following white paper from Microsoft. http://windowsclient.net/wpf/white-papers/when-to-adopt-wpf.aspx

The last question is, should corporate Windows developers adopt WPF and start to build eye catchy applications to support the dull business functions? I say, why not? It’s always exciting to learn new things as a developer, especially something related to graphics. Take me for example, I caught up with 4 years of technology about WPF in the past week. Also, because of the heavy use of browser based applications, most IT shops put their best forces in web development, making Windows developers feeling left behind. WPF serves as a bridge between these two, and it definitely motivates the programmers, who will hopefully build some prettier applications to motivate the business users.

About these ads

One Response to “WPF vs. Windows Form”

  1. jatin Says:

    nice distinction.. thanks .. it really cleared my doubts ..


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: