0

Hello friends i have small doubt and need some clarity on it,,,,why we can't use mvc with wpf ,,,why we are restricted to use mvc with web and wpf with mvvm?

Below is the common answer we found The difference being with WPF application you use windows for GUI's. By using the MVVM design pattern it helps have clear separation between the UI and the View-model (effectively a controller) View-models(vm) (m-v-vm) are used for the functional operations for your UI. This enables your application not to rely upon the UI for functional operations. In essence, MVVM is similar to MVC - but it just caters for WPF applications with use of view-models.

But this answer is common and given on google but my main reason for asking this question why we can't use mvc with wpf the? if someone asks me why you have use mvvm not mvc any solid reason for it?

Harjeet Singh
  • 376
  • 2
  • 5
  • 21
  • mvvm is about binding, knockout and angular use mvvm, same concept, ~ binding concept, but if you expect to bind from client to server directly how would you implement that? – Yuliam Chandra Jul 28 '14 at 10:48
  • 1
    @YuliamChandra that's perfect but we know why we cant use mvc instead of mvvm..what is the urgent need to create a separate pattern for wpf..why we are not able to use mvc? – Harjeet Singh Jul 28 '14 at 10:50
  • wpf was born with binding concept, any reason not to use binding? – Yuliam Chandra Jul 28 '14 at 10:54
  • @YuliamChandra not against to use binding but there must be some reason behind it ..why should we accept the things blindly.we are technical persons..to convince a normal person small answer is perfect but to justify it to a technical person their must be some logic behind it. – Harjeet Singh Jul 28 '14 at 10:57
  • 2
    you can use mvc if you want, but the controller will have dependency to the view, you can use mvp by introducing interface, but there is more code in there, you will end up having a fat controller that combine logic to process the ui and logic to process the data – Yuliam Chandra Jul 28 '14 at 11:06
  • 4
    possible duplicate of [Benefits of MVVM over MVC](http://stackoverflow.com/questions/1593976/benefits-of-mvvm-over-mvc) – Henk Holterman Jul 28 '14 at 11:12

1 Answers1

2

Jason Dolingers video on MVVM is still pretty relevant, sometimes it's nice to watch a video rather than googling around. There is alot of faulty information around, even provided by microsoft, on what MVVM really is.

When I started learning MVVM some 4,5 years ago, this video helped alot.

http://www.lab49.com/wp-content/uploads/2011/12/Jason_Dolinger_MVVM.wmv

Hope it helps! If I remember correctly he is basing his viewmodels on DO's rather than some baseclass (IE Galasoft MVVM light') that uses the INotifyPropertyChanged interface instead.

Hope it helps,

cheers

Stian

Stígandr
  • 2,743
  • 19
  • 35