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

preview_player
Показать описание
Confused about MVVM? Watch this video.

Рекомендации по теме
Комментарии
Автор

If you're looking for a good intro to MVVM with C# then this video really misses the mark!

tttR
Автор

Holy cow man!!
super easy, now I get it
Thanks for this!!!

headoverbars
Автор

I just wasted 10 minutes to watch this video, only to find out that it is just a "preview" of a paid course.

rpfake
Автор

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.

Paintology
Автор

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.

techdan
Автор

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

stevengao
Автор

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.

heraldo
Автор

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 ???

mr.es
Автор

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).

shaihulud
Автор

This is the best comment/assessment on NVVM

chitol
Автор

"What is MVVM"?
"Well, you got Code-behind, Xamarin, and POCOs!"
"Thanks!"

MissionFailed
Автор

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.

heraldo
Автор

is "structural" and "architectural" pattern used interchangeably?

zerosandones
Автор

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...

mosthed
Автор

Can I ask what software you use to make those simple animated diagrams with elements that fade in and out?

ConquerJS
Автор

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.

benjamingarrard
Автор

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.

hansregli
Автор

I feel like this video's title does not match the content.

blackasthesky
Автор

This is good, I would like to see more videos on this.

timhogston
Автор

Ok for unit testing problems but I dont think that MVVM is useful just for unit testing

elandaloussiishrak