How reusable should ViewModel classes be?

Posted by stiank81 on Stack Overflow See other posts from Stack Overflow or by stiank81
Published on 2010-03-15T12:30:35Z Indexed on 2010/03/15 12:39 UTC
Read the original article Hit count: 386

Filed under:
|
|
|
|

I'm working on a WPF application, and I'm structuring it using the MVVM pattern. Initially I had an idea that the ViewModels should be reusable, but now I'm not too sure anymore.

  • Should I be able to reuse my ViewModels if I need similar functionality for a WinForms application?
  • Silverlight doesn't support all things WPF does - should I be able to reuse for Silverlight applications?
  • What if I want to make a Linux GUI for my application. Then I need the ViewModel to build in Mono - is this something I should strive for?
  • And so on..

So; should one write ViewModel classes with one specific View in mind, or think of reusability?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about mvvm