+ 12

What is difference between MVVM and MVC ?

What is difference between MVVM and MVC ? And which one is better?

26th Jun 2019, 6:46 AM
Ali Badri
Ali Badri - avatar
7 Answers
+ 2
sneeze Are your working fulltime as a C# developer?
27th Jun 2019, 7:18 AM
David Carroll
David Carroll - avatar
+ 9
In any case, there will always be a model and there will always be a view. What really changes is the way in which the models and views are connected. In the MVC pattern the controller acts as a tool that directly manipulates the data in its given model.The MVC pattern was specifically designed in such way that the view and the model don’t need to know anything about each other. However, the MVC design pattern has its many drawbacks. For one, the use of controllers to manipulate data models creates clutter in the backend. MVVM overcomes these drawbacks but still has other drawbacks.Unlike the controller method, the ViewModel method relies heavily on the frontend of the application.It instead acts as a binder that binds data between the view and model.  The MVC format is specifically designed to create a separation of concerns between the model and view, the MVVM format with data-binding is designed specifically to allow the view and model to communicate directly with each other.
27th Jun 2019, 3:04 AM
Sahana Chowdary
Sahana Chowdary - avatar
+ 8
Yes , I'm an Electrical_Electronic engineer , but 5 years I programming win forms by C# , Sql & Electronic circuit design (analog and digital) I like to learn MVVM and used it in my project
27th Jun 2019, 7:22 AM
Ali Badri
Ali Badri - avatar
+ 4
Unfortunately there are not a lot of c# programmers at Sololearn. Since I am interested in the answer I had a look in google. I am a MVVM user and do have not worked with the other patterns. Have a look at these links https://www.linkedin.com/pulse/understanding-difference-between-mvc-mvp-mvvm-design-rishabh-software/ https://www.oreilly.com/library/view/learning-javascript-design/9781449334840/ch10s09.html What I like about MVVM is the complete separation of data. View is UI View model - is interpretation of data model - is just a description of the data.
26th Jun 2019, 8:47 PM
sneeze
sneeze - avatar
+ 4
Sahana Chowdary Nice attempt in explaining the differences between MVC and MVVM. 😉👌 Ali Badri This answer could be as simple as using analogies to explain the conceptual differences or be incredibly complex with theoretical analysis and implementation details. I'll leave you with the watered down version of this with a link to an analogy I found to be interesting. Ignore the parts about Angular: 😉 https://stackoverflow.com/a/39535189
27th Jun 2019, 6:41 AM
David Carroll
David Carroll - avatar
+ 4
David Carroll Yes, I am a professional developer, I started with Delphi. Which I think is still a beautiful language. Then I moved on to C# winforms, and now I am using WPF. With WPF came MVVM and knowledge about separation. (Ali Badri find it a little offending marking the answer of David Carroll as best, if you want to mark his answer as best, select his other response. This one is not related to the question)
27th Jun 2019, 9:09 PM
sneeze
sneeze - avatar
+ 2
sneeze Oh wow... Delphi is a blast from the past. 👌 Interestingly... in my entire 23 years of working in software, I've not once been involved in a WPF project. I have plenty of colleagues who have. I somehow never seemed to fall into a project requiring a desktop or Silverlight application. Ali Badri I, also, don't believe I provided the best answer here. I would select one of the other answers. I simply provided commentary and a link to another source. And certainly, my off-topic question about working as a fulltime C# developer wouldn't qualify as the best answer. 😉
27th Jun 2019, 11:20 PM
David Carroll
David Carroll - avatar