Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF: Is Prism overkill for small apps?

Tags:

c#

.net

mvvm

wpf

prism

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!

like image 536
Bob Avatar asked Feb 02 '11 17:02

Bob


2 Answers

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.

like image 124
Tim Lloyd Avatar answered Oct 04 '22 23:10

Tim Lloyd


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

like image 45
fabien Avatar answered Oct 04 '22 23:10

fabien