我有大约三年的 C# 经验.我想学习一些 WPF 和 MVVM 模式.这个网站上有很多文章链接,但我有点不知所措.对于初学者来说,暂时忘记 mvvm 并快速学习一点 WPF,然后再回到 MVVM 是一种明智的做法吗?
I've got about three years c# experience. I'd like to learn some WPF and the MVVM pattern. There are a lot of links to articles on this site but I'm getting a little overwhelmed. Would a sensible approach for a begginer to be forget mvvm for a while and just quickly learn a bit a of WPF, then come back to MVVM?
我了解了 Application=Code+Markup - Charles Petzold 在今天的工作中,似乎没有提到 MVVM(至少在索引中没有).我对此感到非常惊讶,因为我认为 MVVM 应该是 WPF 的通用语言"?
I had a leaf through Application=Code+Markup - Charles Petzold in work today, it doesn't seem to mention MVVM (at least not in the index). I was pretty surprised by this as I thought MVVM was supposed to be the "lingua franca" of WPF?
另外,我刚刚开始在一家新公司工作,他们正在使用带有 WinForms 的 MVVM,有没有人遇到过这种情况?
Also I've just started working at a new company and they are using MVVM with WinForms, has anyone come across this before?
谁能推荐一本可以教我 WPF 和 MVVM 的书?
Can anyone recommend a book that will teach me both WPF and MVVM?
推荐答案这取决于你的经验.
我个人认为这是 MVVM 讨论中的一个缺失领域,这促使我在 从 Windows 窗体开发人员的角度来看 MVVM 和 WPF.
I personally felt that this was a lacking area in MVVM discussions, which was what led me to write my series on MVVM and WPF from a Windows Forms developer perspective.
如果不学习 MVVM,我不会尝试学习 WPF.您最终将试图忘记"许多方面,因为 WPF 真的没有任何意义,完全没有意义,直到您了解在整个体系结构中普遍存在的表示和逻辑的分离.MVVM 实际上只是将这种相同的分离扩展到应用程序空间.
I would not try to learn WPF without learning MVVM. You'll end up trying to "unlearn" many aspects, as WPF really doesn't make sense, completely, until you understand the separation of presentation and logic that's pervasive throughout the architecture. MVVM is really just extending this same separation into the application space.
至于Windows Forms 中的 MVVM" - 很多人尝试这样做,但它并不是真正的 MVVM.为了执行MVVM",您需要访问比 Windows 窗体提供的更丰富的数据绑定形式.Windows 窗体中的 MVVM"通常实际上只是具有不同名称的模型-视图-演示者(我猜是跟随 MVVM 潮流),但与 WPF 中的 MVVM 并不完全相同.
As for "MVVM in Windows Forms" - a lot of people try to do this, but it's not really MVVM. In order to do "MVVM" you need access to a richer form of data binding than Windows Forms provides. "MVVM in Windows Forms" is really, typically, just Model-View-Presenter with a different name (riding the MVVM bandwagon, I'd guess), but not really the same as MVVM in WPF.
更多推荐
学习 WPF 和 MVVM
发布评论