开发者

WPF: Is Prism overkill for small apps?

If I don't split my 开发者_如何学Goapp 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!


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.


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


MVVM Light is the best bet....!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜