Silverlight Vs. WPF Vs. Winforms What is good for specifically my purpose?
I am about to start a new Windows applications and the contenders for the platform are:
- Windows Forms
- WPF
- Silverlight
Now my experience with WPF at least in my last application was not very encouraging (the app failed to run on the deployment machines and I had to re-do it in Winforms). So my confidence is shaken here.
My app is for mass-distribution (the last version had some 100,000+ installations). So I want to make absolutely sure that my users will be able to use it and enjoy it without any problems.
I would love to create a nice interface, goi开发者_开发知识库ng the next step like a Flex or Silverlight, iPhone app, with animations and effects. So I would really like to go with WPF or Silverlight if I can.
My needs are
- Good support for visuals and animation effects.
- Support for database connectivity.
- Support for printing (Is there an equivalent of PrintDocument in Silverlight)
- Must not suffer from deployment troubles.
Silverlight is universal, but does it have printing support and good controls toolset? WPF has printing support and a nice toolset, but can I depend on it? Winforms is dated already and is not so impressive, but should I go with it anyway?
Your advice would be appreciated
Good support for visuals and animation effects.
So thats WinForms out really unless you want to do things the painful way.
Support for database connectivity.
WinForms and WPF can to this directly, Silverlight needs support from the backend server (although that can be a SQL Server that exposes data as web service).
Support for printing (Is there an equivalent of PrintDocument in Silverlight)
Silverlight 4 has good print support, if you were to target Silverlight you would be targeting SL4.
Must not suffer from deployment troubles.
All technologies suffer from deployment troubles. Its matter of nature and degree of those troubles.
Silverlight has the advantage that it does not require the client have the full .NET framework and works on a Mac. You will need to deploy through a Web server though.
First - your deployment issue is not your problem. If you get a customer telling you to make something, you propose technology, they check and it is their responsibility. I currently do software in a bank, and we are VERY limited, but this is not my problem as in: I know what I can use and can ask the admins before walking into non-supported paths.
That said - check before asking what you WANT or CAN support.
I would go for WPF on .NET 4.0 these days. I actually do for a complex trading application. Together with a web application for the administrative side (there is quite a lot, and I use the dynamic data framework there to make adding users etc. simple in code).
After that I would give Silverlight a try. Especially 4.0 - the new "local mode" is great, install it locally, even with a shortcut in the menu. No real difference to the user, and XAML on Silverlight 4 is a lot better than the earleir version.
I would try staying away from Winforms - it is a lot less flexible.
But at the end, you have to check requirements first. For example here whereI currently work, .NET 4.0 is a "no" and Silverlight in ANY version is "no", too, until they do their upgrade on the standard system image.
It all comes down to how much time you have.
If you are short on time it would be best to go with what you know (WinForms) but if you have a lot of time to develop this it may well be worth while going for Wpf as the animation and visuals are loads better natively than WinForms.
- Animations and visuals are easier / better in WPF
- Both have support for database connectivitiy (.NET underpins wpf and Winforms).
- Printing is not too hard in either.
- WinForms can target .NET 2.0 meaning it has greater ease in deployment. Wpf must target 3.5 meaning your users must be using the latest version. Also if you develop for .NET 3.5 SP1 you can run into troubles with users not using SP1. This can cause deployment and usability problems.
If you are ready to pay then check out Telerik Win forms controls and Silverlight 3 has print support.
精彩评论