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

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

问题描述

windows 窗体的大多数限制和技巧对大多数程序员来说都是常见的.但从 .NET 3.0 开始,还有 WPF 可用,即 Windows Presentation Foundation.据说您可以使用它更轻松地制作性感应用程序",并且使用 .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 窗体,甚至非托管 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)?

您的经理能否接受(或分心注意到)开发人员生产力在四到六个月内大幅下降?

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天全站免登陆