Tuesday, November 15, 2011

WPF Vs WinForms


WPF is a huge shift from WinForms . If you are planning to migrate from WinForms to WPF these are the benefits .
Benefits of WPF  over Winforms
  • Rich UI can be made very easily especially for the Windows Applications.
  • WPF Supports animations and Special Effects easily through Graphics API.
  • It has DPI settings for the application in built.
  • DataBinding makes WPF more easier to bind data from database dynamically
  • Templating (Control, Data and Item) makes extending controls or adjust controls  easily.
  • We can  add shapes, lines, and arbitrary drawings to the application using Vs IDE itself . Every component of these can be data-bound and animated, or controlled by code.
  • There are lot of things added in Graphics part colors, gradient brushes ,fancy fonts, rotations , tile brushes . Now graphically you can do anything that you want in Windows.
  • Customize the Controls, extends Custom Controls, User Controls .
  • Easy Maintainability .
Considerations – WPF over Winforms
  • Definitely costlier than Winforms but not too much costlier.
  • WPF stores its data more efficiently hence individual objects will be small, but there tend to be more objects in WPF than in WinForms .This would require more RAM than Windows Application.
  • CPU utilization will go up compared to WinForms   WPF objects onscreen takes more CPU as normal WinForms rendering (again depending on the requirement) .
When to Choose What ?
If application spends most of its time updating the screen, WPF is not the right case to choose .  ex: Applications that are written directly to DirectX.

No comments:

Post a Comment