1

In CinchV1 there was a section of Sacha's CodeProject post which described how to develop Models with Cinch. Now, looking at the documentation for CinchV2, all I can find out about models is this:

4 Developing Models Using Cinch

      NOTE : This is no longer possible in Cinch V2

Clearly, I am missing something, right? I mean, it's not the 'VVM' Pattern, is it?

What exactly does it mean when it says "This is no longer possible in Cinch V2"?

If Models are no longer used, what should I do in place of using them?

Community
  • 1
  • 1
  • I'm not familiar with Cinch, but your models should not depend on any framework except the .Net Framework. Models should be POCO classes, and not inherit from anything, except maybe implement `INotifyPropertyChanged`, but that's it – Federico Berasategui Nov 20 '13 at 19:46
  • HighCore, thanks for your feedback. I am aware that I can make a Model class just using INPC, but my real question is more about why the documentation doesn't speak of it at all. Also, there's a sample project for V2, and it doesn't use any models, only ViewModels. – astallaslions Nov 20 '13 at 20:19
  • I guess that's a matter of "the M part of MVVM is up to you"... you're free to implement it in any way you want – Federico Berasategui Nov 20 '13 at 20:26

1 Answers1

2

So the answer was buried in a part of the CodeProject post I didn't see. Here is what it says:

As I just stated, Cinch does actually allow you to either expose a CurrentXXXModel off your ViewModel which supports DataWrappers/Validation Rules (IDataErrorInfo) / ViewMode changes / IEditableObject operations, by use of the two Cinch Model classes mentioned above.

But as I also stated above, I no longer recommend that approach, and think that the Model should be left alone, and that you should do all your DataWrappers/Validation Ruless (IDataErrorInfo) / ViewMode changes /IEditableObject operations in your ViewModel.

1.) It is no longer preferred to write a Model that is inherited from a Cinch base class. Models are still used in CinchV2, but binding a View to a Model is no longer preferred.

2.) Write Models as you normally would, but only use DataWrappers and such in the ViewModel.