WPF:是棱镜矫枉过正的小应用程序? [英] WPF: Is Prism overkill for small apps?

查看:175
本文介绍了WPF:是棱镜矫枉过正的小应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我不拆我的应用程序到不同的模块(否则我会认为棱镜将杰福是要走的路),我应该使用棱镜?

If I don't split my app into different modules (otherwise I would argue that Prism would defo be the way to go) should I use Prism?

我知道,棱镜给出了一个方便的实施的ICommand (我可以做我自己在code页),并为我们提供了 IEventAggregator 但所有的引导程序,壳牌,ModuleCatalog东西真的有用吗?

I know that Prism gives a convenient implementation of ICommand (which I could do myself in a page of code) and gives us the IEventAggregator but does all the Bootstrapper, Shell, ModuleCatalog stuff really help?

为什么不直接使用MVVM模式(无棱镜)分离出你的关切,你的应用程序是可测试和鲍勃是你的叔叔!

Why not just use the MVVM pattern (without Prism) to separate out your concerns so your app is testable and Bob's your Uncle!

推荐答案

对于一个小的应用程序,你肯定可以把它看作是矫枉过正,但即使是小型应用程序,你已经确定了一些有用的方面如 DelegatedCommand IEventAggregator (其中顺便说一句带有弱事件处理所以并不完全微不足道正确地执行)。

For a small application you could definitely see it as overkill, but even for a small application you have identified some useful aspects e.g. DelegatedCommand and IEventAggregator (which BTW come with weak event handling so not totally trivial to implement correctly).

也许更轻质框架可能更合适。我只知道棱镜,所以真的不能评论。

Perhaps a more light-weight framework might be more suitable. I only know Prism, so can't really comment.

有一点我会做,虽然,是,这是很常见的小型应用从小事做起,但后来演变成更大的应用程序。把相对少量的精力架构是正确的第一个地方是不是支付后整理出来的巨大的(有时甚至是不可能的)任务更好。

One point I would make though, is that it is very common for small applications to start small, but then evolve into bigger applications. Putting the relatively small amount of effort into architecting it right in the first place is better than paying for the monumental (and sometimes impossible) task of sorting it out later.

这篇关于WPF:是棱镜矫枉过正的小应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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