473,725 Members | 2,230 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Should I use WPF or WinForms for a major re-write?

Frinavale
9,735 Recognized Expert Moderator Expert
Those of you who know me know that I am not a windows-client developer. My technology of choice is ASP.NET and other web technologies. So, I am a fish-out-of-water when it comes to providing insight into which Windows desktop-client technology is best suited for a business's software needs. I have dabbled in Silverlight and I have created a few fairly simple WinForms applications, but for the most part I am a newbie to the Windows desktop-client development world.

I have been trying to decide whether to use WPF or WinForms for a major re-write/redesign undertaking of some existing software. And the deadline for completion of this new software is much closer than I would like it to be.

To help me decide, I started out by creating a WPF application to experience using this technology first hand and then I attempted to create the same thing in a WinForms application.

Originally, I was under the impression that WPF was mainly used for eye-candy user interface (UI) design (with it's support for animations and skinning features). I am not a fan of really flashy UI since it these designs usually take up my time doing some silly animation. So, I was a bit skeptical about WPF. But what I found was that this technology is much more than just flashy stuff.

WPF's use of templates and data-binding is incredibly flexible. Business logic validation can be done by the UI without any code in the UI or the code-behind for the page/control/window. The hard things for me had to do with skinning but I think that's mainly because I do not have the appropriate tools to do what I was trying to accomplish (I don't have access to Expressions Blend and was learning how to do things by hand).

When I created the WinForms application I found that I was very constricted by the controls that were available to me. I truly missed the template and binding features in WPF... but at the same time working in WinForms was much more familiar to me even though I am coming from a web-development background.

WinForms seems to be a good choice considering the time constraint, and the fact that most of the team is coming from a VB6 background.

However, WPF is a powerful, flexible, framework that promotes good business logic class design (since the application is driven by binding to these classes). Also, since our application involves embedding live video streaming, graphics, and even has a component that requires objects be dragged around a "desktop" and placed in desired spots... I can see a lot of advantages of using WPF.

Since I do not have a lot of experience using either of these technologies, I am putting the question to you:

Which would you recommend moving to, WPF or WinForms?


-Frinny
Oct 22 '10 #1
4 3175
Niheel
2,456 Recognized Expert Moderator Top Contributor
Just from a project management perspective.

Two things you metioned:
  • The time constraint
  • Lack of experience with these technologies
  • Working with a team

I would go with the one that you're the most familiar with. Even if it's by the slightest. You noted that the team would be more familiar with VB6, making WinForms ideal.

If you guys have more time and can all get on board with WPF, then that's a different case.

Just a thought, keep us posted on which way you go.
Oct 22 '10 #2
What's the original software in? I am assuming vb6? I just completed a project this month doing a migration, not a rewrite , for a 200k line complex vb6 app to winforms using a company called ArtinSoft. Project went very well. 4 months to do it too. We are now stabalizing and refactoring and will be moving towards wpf as we go and learn it (MVVM).

Skip the rewrite, migrate.
Oct 23 '10 #3
Hugo Dahl
2 New Member
Slight disclaimer: I am presently a very happy WPF developer, though I have done HTML, ASP, ASP.net, Quickbasic, C, C++, VB (versions 3.0 - 6.0), VB.Net, C# and Winforms in the past.

There are several important factors which will weigh into your decision. You have mentioned several internal, be they to yourself, your team or the business. However there are also external factors which should be considered, separately and jointly.

Since this is a rewrite from another application, I presume the application has been around for some time, with features and functionality added over time as needed. So how long will you be supporting this application and it's current technology set? Also, bear in mind that Winforms technology will stay where it is, with no future enhancements or functionality added by Microsoft. WPF is their UI presentation technology platform from this point forward. So if you are going to be supporting this version of the application for 10 years, you will be on 10 year old technology at the end of the lifecycle.

Given that the current skill set on your team is fairly even between Winforms and WPF, and coming from a VB6 familiarity, I would actually recommend the WPF route, for a number of reasons.
  • It is the backed UI presentation technology from Microsoft for now and the forseable future
  • As you mentioned, you can create Control and Data templates, which can then be reused throughout the application. Though it may take longer to create the first time around, that is the only time you would need to create it, and then reuse everywhere
  • Using WPF and the recommended M-V-VM design pattern (with a specialized library or not), proper design and separation of concerns such as in a classical n-tier design are much easier to implement and follow. The Model is the data, the view model is how the data is meant to be interacted with in the UI, and the view is the UI
  • It also makes it much more difficult, if not nearly impossible, to bring the bad development habits that may have developed over the years in VB6 to the new platform
  • Data binding and data interactions from the UI tier are, for the most part, simple, requiring little to no code behind to work
  • You can have two groups in your team, one focusing 100% on the visuals (XAML, Converters, etc) and the other on the logic, mitigating the need for all developers to become well rounded enough in all aspects of the new platform

Several of my points presume going with the M-V-VM pattern, particularly the last one, for which I will go into more detail here.

You can split a team into 2 groups, one with a focus on the visuals (View layer, possibly also the ViewModel depending on what other portions of the system already exist, if any) and the other on the business logic and data repository interactions. As long as both sides have a contract (interface) that is agreed upon by both sides, they can work on their own portions and "meet in the middle". Meaning that the UI group can create fake/mock/stub objects which implement the interface, to use as their data source or data context, because the other group will be exposing the data to them in exactly that manner. The same with the "data" group, who can test that the data coming out of their end through the interface is exactly as it should.

I know that I've mentioned a lot here, and it's a decent chunk of information to digest, but I hope that it helps you in making your decision, no matter which way you choose.

Hugo
Oct 23 '10 #4
Alex Papadimoulis
26 Recognized Expert New Member
Lots of good discussion and points have been raised thus far, but there's another consideration.. . WPF is less mature technology.

While it's certainly true that WinForms are "only" 9 years old, it's a natural evolution of the paradigm that defines Windows development from Windows 1.0* to VB6 through even today (non-.NET development). WPF is a fundamental shift from this paradigm.

Mature technologies will offer less risk while newer technologies provide the ability to do more with less. Mature technologies also offer the benefit of collective knowledge and experience, and there are a lot more questions/answers on the web regarding them. There are less resources available for newer technologies.

The point in this is to make sure to consider your team. A group of “rockstar” developers can often mitigate the risks, but most teams (mathematically speaking) are average. Obviously, only a select few can be “the best”.

Here’s a quick anecdote to illustrate/remind the problems with newer technologies. When my team explored WPF, we ran into a deal-breaker after deployment: the text was “blurry” on many clients. Apparently, this is a “known feature”. For us, the solution was simple: disable ClearType in the registry or upgrade to WPF 4. We would have been in serious trouble if neither was a possibility.

* from what I’ve heard and read in Old New Thing, at least; I got my start in Windows 3.x, so I don’t know what a 1.x is like first hand
Oct 23 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1438
by: Alan Partridge | last post by:
I have an app with both a webforms and winforms front end. When I change the web.config file, eventually IIS\ASP.NET pick up the changes and all is well. With the WinForms GUI - when I change the .config file, I need a way to force the AppDomain to reload the new config settings. This doesn't need to be automatic cause I can control when the config file is updated. Does anyone know how to force a reload of a new config
10
2412
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ComboBox.SelectedValue = db_value; If the db_value was not included in the ComboBox value list the ComboBox.SelectedIndex used to return -1, Now the very same code is
4
3734
by: Elhanan | last post by:
hi.. all a client of ours is considering to move from a dos application to windows desktop application. the application is for traveling agency, the database is rather large. their current database for other application is SQL-SERVER. they have 12 users.
0
1380
by: Shamil Salakhetdinov | last post by:
Hi All, Have anybody seen somewhere techniques like the one described here: Automating Windows Applications http://www.thecodeproject.com/com/automatingwindowsapps.asp but for managed WinForms application? Basically what is needed:
5
4088
by: Segfahlt | last post by:
I need a little help here please. I have 2 win forms user controls in 2 different projects that I'm hosting in 2 different virtual directories. The controls have been test and operate okay in both projects. Both controls(dlls) have been signed using SN.exe and I've set up the appropriate .Net assembly permissions using those Strong Names The DLL's have been copied to the /bin directory in both web virtual directories.
1
8557
by: Pieter | last post by:
Hi, In my application VB.NET 2005 application I placed a ReportViewer, and link it to a server-report: Me.ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote Me.ReportViewer1.ServerReport.ReportPath = "/myproject/DemandeDeCotation" Me.ReportViewer1.ServerReport.ReportServerUrl = New System.Uri("http://myserver/reportserver2005", System.UriKind.Absolute)
4
3937
by: 3Cooks | last post by:
I have a windows application written in Visual Basic 6.0 that is going to be redeveloped in dotNET. We are trying to decide if we should deploy using Webforms or Winforms and I need advice from someone who is not on my team. The VB 6.0 application is used by approximately 100 users. All users reside in-house. There is an existing external website that will use some of the same components but the two applications are separate. The...
0
1655
by: netflex | last post by:
Working on a handed off C# project and pretty much my third time dipping into C#. In my solution file, I have a collection of .resx files in their own folder, several .cs files, and my winforms .cs files. From what I understand the .resx files house embedded resources, such as images and buttons texts. When I open up my winforms however there is nothing there! When I open up my winforms code behind, I see code such as: this.$ = new...
5
3826
by: brian.wilson4 | last post by:
Our group is currently comparing winforms vs webforms.....app is Corp LAN based - we have control of desktops.....Below is pros and cons list we have come up with - if anything strikes you as untrue or you would like to add - please comment - thanks..... Rich Client PROS 1. User experience (* indicates feasible on web with AJAX) - a. Single, unified application experience b. Windows/Office-like look and feel - i.Tabs - drag and drop...
23
4542
by: raylopez99 | last post by:
Here I am learning WinForms and two months into it I learn there's a WPF API that is coming out. Is this WPF out yet, and is it a threat to WinForms, in the sense that all the library routines I memorize and/ or familiarize myself in WinForms will disappear in WPF? I did note in one early version of C#, the non-generic "ArrayList" was replaced by the generic and template <based List, but that kind of change is not a big deal. If WPF...
0
8884
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8749
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9252
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9168
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9103
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6700
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4779
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2631
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2154
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.