创建新的GUI时,WPF是Windows窗体的首选吗? [英] When creating a new GUI, is WPF the preferred choice over Windows Forms?

查看:86
本文介绍了创建新的GUI时,WPF是Windows窗体的首选吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows窗体的大多数限制和技巧对大多数程序员来说都是常见的。但是从.NET 3.0开始,Windows Presentation Foundation也提供了WPF。据说您可以使用它使性感的应用程序更容易,并且使用.NET 3.5 SP1可以大大提高执行速度。

Most restrictions and tricks with windows forms are common to most programmers. But since .NET 3.0 there is also WPF available, the Windows Presentation Foundation. It is said that you can make "sexy applications" more easy with it and with .NET 3.5 SP1 it got a good speed boost on execution.

但是另一方面使用WPF时,很多事情都不同。我不会说这比较困难,但是您必须从头开始学习一切。

But on the other side a lot of things are working different with WPF. I will not say it is more difficult but you have to learn "everything" from scratch.

我的问题:值得在创建时多花些时间吗?一个新的GUI,项目没有时间压力吗?

My question: Is it worth to spend this extra time when you have to create a new GUI and there is no time pressure for the project?

推荐答案

WPF使您可以做一些令人惊奇的事情,我很喜欢它...但是,无论何时开发人员问我是否认为他们应该转向新技术,我总是有义务接受我的建议。

WPF enables you to do some amazing things, and I LOVE it... but I always feel obligated to qualify my recommendations, whenever developers ask me whether I think they should be moving to the new technology.

您的开发人员愿意( (EAGER)最好花一些时间来学习有效地使用WPF?我从没想过要谈论有关MFC,Windows Forms甚至是不受管理的DirectX的事情,但是您可能不希望团队在正常开发过程中尝试挑选 WPF。

Are your developers willing (preferrably, EAGER) to spend the time it takes to learn to use WPF effectively? I never would have thought to say this about MFC, or Windows Forms, or even unmanaged DirectX, but you probably do NOT want a team trying to "pick up" WPF over the course of a normal dev. cycle for a shipping product!

您的开发人员中至少有一个或两个具有一定的设计敏感性,并且拥有最终设计权限的个人对开发问题是否有充分的了解,这样您就可以利用WPF功能来创建实际上更好的东西,而不是仅仅带有色彩丰富的动画的多彩东西?

Do at least one or two of your developers have some design sensibilities, and do individuals with final design authority have a decent understanding of development issues, so you can leverage WPF capabilities to create something which is actually BETTER, instead of just more "colorful", featuring gratuitous animation?

您的目标客户群是否有一定比例运行集成图形芯片组上可能不支持您正在计划的功能-或者它们仍在运行Windows 2000,这将完全消除客户的使用吗?有人还会问您的客户是否真正关心增强的视觉效果,但是在90年代初期,通过内部公司生活的我们的业务客户不在乎颜色和图片的辩论,我知道您的竞争对手精心设计的解决方案将使他们受到关注,而真正的问题是条件是否正确,以使您能够提供一些使他们现在受到关注的东西。

Does some percentage of your target customer base run on integrated graphics chip sets that might not support the features you were planning -- or are they still running Windows 2000, which would eliminate them as customers altogether? Some people would also ask whether your customers actually CARE about enhanced visuals but, having lived through internal company "Our business customers don't care about colors and pictures" debates in the early '90s, I know that well-designed solutions from your competitors will MAKE them care, and the real question is whether the conditions are right, to enable you to offer something that will make them care NOW.

该项目是否涉及理由-至少在表示层上进行开发,以避免尝试陷入不兼容的旧式脚手架的额外复杂性(与Win Forms互操作不是无缝的)?

Does the project involve grounds-up development, at least for the presentation layer, to avoid the additional complexity of trying to hook into incompatible legacy scaffolding (Interop with Win Forms is NOT seamless)?

经理接受(或分散注意力)开发人员生产力方面的严重下降4到6个月了?

Can your manager accept (or be distracted from noticing) a significant DROP in developer productivity for four to six months?

最后一个问题是由于我想将其视为WPF的 FizzBin性质,通过十种不同的方式来执行任何任务,并且没有明显的理由偏爱一种方法来实现她,几乎没有指南可以帮助您做出选择。您做出的任何选择的缺点不仅会在项目后期更明显,而且实际上可以确保您的项目中的每个开发人员都采用不同的方法,这会导致严重的维护麻烦。最令人沮丧的是,在您尝试学习框架时,不断引起您的不一致。

This last issue is due to what I like to think of as the "FizzBin" nature of WPF, with ten different ways to implement any task, and no apparent reason to prefer one approach to another, and little guidance available to help you make a choice. Not only will the shortcomings of whatever choice you make become clear only much later in the project, but you are virtually guaranteed to have every developer on your project adopting a different approach, resulting in a major maintenance headache. Most frustrating of all are the inconsistencies that constantly trip you up, as you try to learn the framework.

您可以在条目中找到更多与WPF相关的深入信息在我的博客上:

You can find more in-depth WPF-related information in an entry on my blog:

http://missedmemo.com/blog/2008/09/13/WPFTheFizzBinAPI.aspx

这篇关于创建新的GUI时,WPF是Windows窗体的首选吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆