WPF: Is Prism overkill for small apps?

末鹿安然 提交于 2019-12-21 07:15:08

问题


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?

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?

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


回答1:


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.




回答2:


For smaller apps, caliburn micro provides a simpler framework. To me prism is especially useful when you need to define regions in your application.




回答3:


MVVM Light is the best bet....!



来源:https://stackoverflow.com/questions/4877481/wpf-is-prism-overkill-for-small-apps

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!