What is MVVM (Model-View-ViewModel) Pattern?

Published 2017-11-14
Confused about MVVM? Watch this video.

🔥Get the COMPLETE COURSE: bit.ly/2ITWcyL

All Comments (21)
  • @Paintology
    I would argue that MVVM is important throughout the lifecyle of app development irrespective of size or complexity. All the frameworks we have today are designed to produce interested groups of people within a domain such as data modelling, frontend programmers etc. Software tools have been designed to serve these groups further seperating the disconnect between the data model and use cases. I am working on a new shift in this thinking with the development of the Paintology app which makes use of the model that I am talkng about. The technology is based on Java/Kotlin, Firebase and cloud functions.
  • @0ttt3R
    If you're looking for a good intro to MVVM with C# then this video really misses the mark!
  • @heraldo623
    Regarding the tests, I think you do end-to-end or integration tests and discards unit tests. One drawback is that you may write a lot of code before be able to test anything, in case of end-to-end testing you must develop the whole thing! With that you are not able to catch errors earlier, so you may spend time developing a broken software. Another drawback is that it will be hard to spot the broken code in case of bugs, with unit tests you can spot easily which object of the system is broken and do it early in development.
  • @techdan7098
    Great introduction to the MVVM concept with the benefit of going more in-depth for a small fee. I heard some controversial statements start at about 2:15 but besides that it's still a great introduction. People on here complaining about it being a preview to a paid course should try making some videos themselves. Love the fact that there was some code shown here.
  • @shaihulud4515
    Mosh, wouldl you say, the use of MVVM (use it when you want unit testing) also applies for desktop applications with wpf? I currently try to wrap my head around this, and I am kinda frustrated. Coding is a well loved hobby of mine, but wpf gives me the creeps, when it comes to MVVM. I own some of your courses over at Udemy. I would LOVE to see a indepth course about wpf, MVVM and a database application (SQLite would be perfect, because most hobby coders don't need or use client based databases).
  • @chitol1
    This is the best comment/assessment on NVVM
  • @stevengao8345
    thanks for this tutorial, isn't when you use mvvm you can apply different view to same model, like within a table view some row may display different stuff from another ? kinda new to MVVM, or maybe MVC can do the same thing. thanks
  • "What is MVVM"? "Well, you got Code-behind, Xamarin, and POCOs!" "Thanks!"
  • @ConquerJS
    Can I ask what software you use to make those simple animated diagrams with elements that fade in and out?
  • @mr.es1857
    well i know that this question would out of context but... i´m having problems when i try too shutdown my app im using the property of ShutdownMode in the App.xaml. Putting it's value to "OnLastWindowClose" and it does't work. When i close the app and look for it in my computers task manager i can see that the app is running in second plane. other question is : How can i work with the events of controls like a button or something like that ?? i know how to usea aa "command" to treat the simple click event but in mvvm how do we treat the other events ???
  • @mosth8ed
    I am new to using MVVM, but even I know there are more and better reasons to use MVVM than simply "if you want to write tests". Then for this to simply be an ad for a paid course, that definitely does not give me confidence that the course would be worth my time, especially a paid course, when there are plenty of great free ones out there which (based purely on your ad here) are probably a more complete and well rounded and open minded explanation of all the reasons and ways you might want to use MVVM. That is just what I gathered from this ad though. Mind you, I was also forced to watch an ad... in order to watch this ad...
  • @heraldo623
    MVVM decouples the display from the displayed data, so you can have several displays (even throught different UI libraries) that shows the same data (ViewModel). Tests are not optional, they are a must for professionals. Only an amateur lets the software break on production. I would not buy a course just to see a "Hello World" of MVVM.
  • is "structural" and "architectural" pattern used interchangeably?
  • I have to disagree with the concept here that a ViewModel is only good for unit tests. It is more for separation of concerns and scalability. This video nails it https://youtu.be/Lu24lZsUreg and this video https://youtu.be/JJT1xykf1do is in the ballpark but is more related to Entities and Data Transfer Objects, which IMO, takes the View out of the equation and is just between two models, one that is exposed to the database and one that is exposed to the user. Long story short, both videos show that there are more practical use cases than just unit testing.
  • @r1pfake521
    I just wasted 10 minutes to watch this video, only to find out that it is just a "preview" of a paid course.
  • @hansregli8678
    The reason for needing a ViewModel is missing another point: If you have a VM you can save the state of your app easily if the app is quit and reload it. I never coded any app without a VM just for this reason. The Testing ability is another quality, but 90% of the testing is done with the Model, not the ViewModel.