views:

1104

answers:

2

I have been looking at the Model-View-ViewModel pattern that is suggested by several people out there (especially John Gossman, take a look at this post and this podcast), but what other patterns (if any) have people used and liked ... and where do they add value?

I have also stumbled across:

I would love an active discussion on these above and those I may not have discovered yet.

+1  A: 

I have been using a variation of the Model-View-Presenter pattern. It has served our purposes pretty well developing various UIs. It is not perfect but it gets the job done well. One of the issues I've had is that I am never satisfied with multi-threaded scenarios. We've recently been making many of our presenters multi-threaded. Since these worker threads, in the end, update the UI, we have had to dispatch actions to the UI through the View's dispatcher. Code was becoming really verbose if every View property checked the dispatcher so because of time constraints, we ended up exposing the View's dispatcher to the Presenter. Not the greatest move if you ask me...

We are using a modular UI framework similar to CAB and Prism, so a lot of those patterns apply to us as well.

I am also a big fan of Commands in WPF. I haven't been able to play around with Prism's DelegateCommand and CompositeCommand yet, but they sound really nice.

siz
You might want to check the DataModel-View-ViewModel pattern using the link above. My understanding is that pattern specifically takes into account multi-threaded scenarios. In fact, one could argue that it is overkill to use it otherwise.
cplotts
+1  A: 

Another pattern that we have used and loved is the Attached Behavior pattern ... using the extensibility mechanism of attached properties in WPF. There are quite a few posts out there on this useful pattern as well.

cplotts