Suggestion: enable "Show taps" on your emulator under developer options so the viewer can see exactly where you are pressing when you are demoing stuff.
Hey Mitch, I am a fan of your tutorials! One question to you for this tutorial: is it a good way to make the repository as a singleton? If that is the way, the singleton instance will be always alive and the livedata inside won't ever be released. I know this makes sense to the demo scenario because it is pure a places app hence we expect the data to be alive for ever. however I think you can explain a little bit for the cases sometimes we don't want to make the repository as singleton, and it should be bind to the lifecycle owner? Just my 2 cents, I am a rookie to Android, especially to LiveData(Jetpack).
I'm confused when you used Singleton Pattern, especially after reading this stackoverflow comment: "An Android Service (sub)class cannot be a singleton since the framework requires access to a default constructor for the class. The only reason I can think of for keeping a static reference to the (last) instance for which onStart was called is to simplify some internal code that may happen to reside in static methods. Considering that onStart was deprecated a long time ago (as of API level 5), this is most likely an example of bad coding style from early days of Android."
I want to. I probably will. Next courses will be: 1) RxJava (Beginner and Advanced/Expert) 2) Unit Testing 3) Building a RestApi with Python (web development) and then making an app to communicate with it
@@Kevin509wisdom I had a deadline and there was little time to fix the bugs, therefore I used the broadcast receiver instead gonna use MVVM on my next project
Hey sir :) i am learning from your tutorials. i have one thing to ask, why we put addnewvalue method to viewmodel? it should be in the repositories i guess? corrent me if i am wrong thanks :)
Hi Mitch , unfortunately, i am bad in android mobile design, would recommend some tips or course that can help me out to improve my skills in this filed. I always try my best but my clines still complain about my design
Hey there again, amazing video. One question: I've read that directly accessing the livedata from the repository is considered to be bad practice because on every new call our UI will need to observe another livedata since it's being recreated. I've read that one should use transformations instead (developer.android.com/topic/libraries/architecture/livedata#transform_livedata, Ctl+F search for "DON'T DO THIS"). Is this correct or am I confusing something? Also if I am correct, how would that change your example?
You can make few optimizations : 1. Optimize the layouts - decrease the layout nesting as much as possible to increase the performance. 2. Remove one dependency (circle image view) since Glide provides an options to transform an image into circular one. 3. Avoid non-static or anonymous instances of AsyncTask - leads to memory leak. 4. Instead of NotifyDataSetChanged that will refresh the whole collection. You can just notify an item position or range that you are updating (NotifyItemInserted or NotifyItemRangeChanged). This will cause less ui calculations and drawing. Cheers!
Each time when I'm thinking about learning some new good stuff - you just upload new great video about it. Keep doing your fantastic job man, your tutorials are great!
Other than ViewModel advantage,configuration change, what's the real benefit of using MVVM considering all the hassle and fuss involved in MVVM along with Retrofit? Assume I was to create a simple app that just makes network request using Volley without the need of worrying screen rotation, and DAO, what's the advantage we are getting for banging head learning complex architecture that can be achieved in just 10 liner code? It's no doubt good for complex projects though since it's well structured and Unit testing friendly. But what for a simple app?
Change: mViewModel = ViewModelProviders.of(this).get(MainActivityViewModel.class); To: mViewModel = new ViewModelProvider(this).get(MainActivityViewModel.class);
The way you describe mvvm, it sounds exactly like mvc. The model is the same, the view is the same, the repository/ DAO/ data layer is the same, and the controller in MVC is a wrapper for the application's business logic. You say that the viewmodel in mvvm has the same responsibility. I am struggling to see the difference.
I just started learning MVVM so sorry if my question is stupid, at 23:49 you are making an example of what would be a server request, here you have a reference to `mIsUpdating` but is my understanding that I should have my api/db access code in the repository right? So If I make a server request on my Repository, how can I change `mIsUpdating`? I guess I could pass a reference of `mIsUpdating` to the repo but this is just me speculating I don't know if it's the best practice
What the actual f__k? Mitch I believe you teach really good and did your best But I guess I have a really thick skull. I sat through the whole video like a monkè
If only the MutableLiveData objects can change and I understand you can "observe" those changes, why would the regular LiveData have the observe method, if it does not change. Are we always supposed to use the MutableLiveData?
Great work Mitch. But i have one doubt as per understanding ViewModel data should clear when we click back button in the mobile and activity is destoryed Right. Iam trying to reopen the app then recycler view Items going on increase. Is there any leak the program.
Awesome video , great Job my friend. Thanks for your smooth English and great explanation, I was really frustrated by Indian videos out there.. glg lglgl gl
I dont understand how the list in the adapter automatically changed. We just call notifydatasetchanged(), but doesn't add the new value to the list in adapter. But somehow when the list in livedata is updated, the list in adapter is updated too. How that's work? The list in adapter is just normal list and we doesn't update it too..
Hi , I am unable to Register into your Official website I am registering for the very first time but still says "Account with this Username already exists".
Do we have to use live data if we are using viewmodel and mvvm ? Like I have some values of user name, address, age etc.. so how to store and retrieve them using viewmodel and mvvm ?
I have a question here, it's about ViewModel. Should I have ViewModel per screen or per entity or per business module? For example, I have a user authentication module in my app(login/signup) and then profile page and dashboard page that shows user information. Now, should I create one single ViewModel that gives me all necessary methods like login, signup, logout, getUserDetails or should I have multiple like LoginPageViewModel (having only login method), SignUpPageViewModel (having only signup method), ProfilePageViewModel (having only getUserDetails) and so on? Also, if a page requires multiple objects like Users and Bookings then what? Should one ViewModel has both the getters or should I have 2 different ViewModels like DashboardUserViewModel and DashboardBookingsViewModels.
Hey Mitch, with repositories, am I supposed to make a single repository for all network operations on my app or multiple repositories with network operations that are relevant to each other?
Sorry I didn't see this comment until now. I would make different repositories to keep it organized. Example: Suppose you had to query "User" account data and also "News" feed data from a server. I would make two repositories. UserRepository and NewsRepository. Each repository would contain all the methods for managing the data from the server.
I have found a bug. Each time the app is restarted the dataSet is duplicated. To avoid this I have added dataSet.clear(); in the method setNicePlaces() Do you noticed this also? Why the array is saved?
The hardest part in implementing MVVM is dealing with different data source like cache and local database and network, so your app can be useful even in situations like poor internet. I hope you use these different data sources in your upcoming tutorial
I'm going to do a rest API integration with MVVM. I'll prob add a cache too. Depends on how many members I get on my website. I can't spend too much time on a single course
Change: mViewModel = ViewModelProviders.of(this).get(MainActivityViewModel.class); To: mViewModel = new ViewModelProvider(this).get(MainActivityViewModel.class);
Line 46 (28:24) - you are getting back the new list from the viewmodel everytime the observer knows about a change but you do nothing with the new list that you receive - so why bother notifying the adapter for any changes as you do nothing with these changes anyway?
Hey Mitch! There's a problem. If I actually call an online API in setNicePlaces() method in Repository class, and set the value of dataset in the onResponse(), the LiveData doesn't update the UI with the received data. How should that be implemented? Please help !!!!
Mitch, why do we need to use postValue(), Instead you should have used setValue() itself, Since onpostexecute runs on the Main thread, setValue should be good enough right? please correct me if my understanding as wrong.
One of the best. Even Better than some paid Tutorials. Can you make some videos on Mokito and Junit Testing for some real scenarios like fetching data from URL, inserting data into Room DB using MVP or MVVM. I have done a demo project but I can't understand few things. If you can make some tutorials on this it would be great. Also sharing the Git Link: github.com/avik1990/NewsApp . My test cases always passes even when I intentionally write failed cases.
Google could have done far worse than to create an MVVM framework, but Google didn’t do anything for naming more grand than following naming as created by Microsoft for the ViewModel class, keeping in context MVVM is a Microsoft creation. Now, if only all the old Microsoft Windows GUI applications were self-consistent for how they were architected for the GUI code versus the rest, with keeping it separated...
I absolutely love your tutorials. So easy to follow and understand. I love your clean and direct explanation of the topics. Great job! Thank you so much!
Hey friend, greetings from Brazil, do you know if there's any project with this MVVM architecture where i can use as template to build up any app in it? Your video is teaching me a lot about this issue, thank you in advance !
Nice job man. I have a question though. I am working with data from an API, and every time the fragment refreshes, the recyclerview is repopulated and thus the items are all @t can I solve that?
Thank you for the movie. One important comment: new nicePlace is added in MainActivityViewModel (and not in NicePlaceRepository). I would like to see how to run postValue from the NivePlaceRepository. Thank you.
Yet another high quality tutorial from you Mitch. I could not understand how MVVM works. The other tutorials go into details of databases and related topics. The result is MVVM basics are difficult to follow and implement. I did have to watch this tutorial five or six times to understand the MVVM concept. To test my understanding, the kotlin recyclerview tutorial (BlogPost) by you was used as a starting point. Following the instructions in this video and the source code for this tutorial, BlogPost source code was converted to the MVVM model used in this tutorial. Along the way I had to jump to google to solve problems when the intended kotlin code did not work as expected. The code I amended now works like this tutorial including adding new blogs by clicking the floating button. Many, many thanks for such a good tutorial. You are one of my go to channels for Android learning. Appreciate the time you take to post these tutorials.
setNicePlaces(); function means a action to get data from webservice, right? it's usually asynchronous, so how data can set in livedata sir? using interface to pass data instead?
They represent different ways to structure your code. MVC, MVP, MVVM. They all have different advantages/disadvantages. But personally I like MVVM for the reasons discussed in this video.
@@codingwithmitch I have seen MVP is used to make test driven development which widen the scope for JUNIT testing , but I never saw MVVM being used for test driven development. So my question is whether MVVM can also be used for TDD ?
So far the only tutorial on MVVM i eventually got working... i understood it better after watching this tutorial... thank you...
maaaan you just took a complicated subject and made it simple
thank you!!
Suggestion: enable "Show taps" on your emulator under developer options so the viewer can see exactly where you are pressing when you are demoing stuff.
dudee...Just excellent this is really what i want
Great video as always, and nice teaching keep it up!
Hey Mitch, I am a fan of your tutorials! One question to you for this tutorial: is it a good way to make the repository as a singleton? If that is the way, the singleton instance will be always alive and the livedata inside won't ever be released. I know this makes sense to the demo scenario because it is pure a places app hence we expect the data to be alive for ever. however I think you can explain a little bit for the cases sometimes we don't want to make the repository as singleton, and it should be bind to the lifecycle owner? Just my 2 cents, I am a rookie to Android, especially to LiveData(Jetpack).
I'm confused when you used Singleton Pattern, especially after reading this stackoverflow comment:
"An Android Service (sub)class cannot be a singleton since the framework requires access to a default constructor for the class. The only reason I can think of for keeping a static reference to the (last) instance for which onStart was called is to simplify some internal code that may happen to reside in static methods.
Considering that onStart was deprecated a long time ago (as of API level 5), this is most likely an example of bad coding style from early days of Android."
Nicely explained, thanks!
Thank you so much, this was more than helpful!
Thanks a lot, man, bro! ;)
thank u for this tutorial. I have a question. If I want to update 'mIsUpdating' variable from the repository, what is the recommended way to do it?
Beautiful.
Mvvm is Beauty
What other things that I need to understand before learning MVVM other than Room,retrofit ?
Man built a rest api to use that in your tutorials. That way you don't have to write this hard coded values every time.
I want to. I probably will. Next courses will be:
1) RxJava (Beginner and Advanced/Expert)
2) Unit Testing
3) Building a RestApi with Python (web development) and then making an app to communicate with it
light IDE hurts my eyes :(
but I do love the video, thanks. I found out today that i'm gonna need MVVM in my company's project :|
Too bad I like white 🕵️
Are you using MVVM in your real project? I mean the company's project. Did you meet many problems? How do you like it?
@@Kevin509wisdom I had a deadline and there was little time to fix the bugs, therefore I used the broadcast receiver instead
gonna use MVVM on my next project
what emulator do you use ?
Hey sir :) i am learning from your tutorials. i have one thing to ask, why we put addnewvalue method to viewmodel? it should be in the repositories i guess? corrent me if i am wrong thanks :)
Ya this is just an example. If you really want to see MVVM in action you should watch my course. codingwithmitch.com/courses/rest-api-mvvm-retrofit2/
How about MVP pattern is it also commonly used?
Yes. I personally prefer mvvm
The view model is for each activity, fragment or for each model?
Yes, usually.
Hi Mitch , unfortunately, i am bad in android mobile design, would recommend some tips or course that can help me out to improve my skills in this filed. I always try my best but my clines still complain about my design
It takes time my friend
can I start this tutorial with my own project that already contains recyclerview ?
Sure why not
一加手机好用吗?
Hey there again,
amazing video.
One question: I've read that directly accessing the livedata from the repository is considered to be bad practice because on every new call our UI will need to observe another livedata since it's being recreated.
I've read that one should use transformations instead (developer.android.com/topic/libraries/architecture/livedata#transform_livedata, Ctl+F search for "DON'T DO THIS").
Is this correct or am I confusing something? Also if I am correct, how would that change your example?
You can make few optimizations :
1. Optimize the layouts - decrease the layout nesting as much as possible to increase the performance.
2. Remove one dependency (circle image view) since Glide provides an options to transform an image into circular one.
3. Avoid non-static or anonymous instances of AsyncTask - leads to memory leak.
4. Instead of NotifyDataSetChanged that will refresh the whole collection. You can just notify an item position or range that you are updating (NotifyItemInserted or NotifyItemRangeChanged). This will cause less ui calculations and drawing.
Cheers!
wow didn't knew there was notifyiteminserted or notifyitemchanged till now been almost 8 months in android thanks man
Any sources/references on how to use Glide to transform an image into a circular one?
For AsyncTask, it's better to give weak reference using interfaces rather than using non-static instances
@@arpitkumar4525 Glide.with(context)
.load(url)
.apply(RequestOptions.circleCropTransform())
.into(imageView);
@@ritvijsaxena7201 How would one achieve point 3)? Even the JSONObjectRequest class from Android uses anonymous instances/lambdas.
Each time when I'm thinking about learning some new good stuff - you just upload new great video about it. Keep doing your fantastic job man, your tutorials are great!
Other than ViewModel advantage,configuration change, what's the real
benefit of using MVVM considering all the hassle and fuss involved in
MVVM along with Retrofit?
Assume I was to create a simple app that
just makes network request using Volley without the need of worrying
screen rotation, and DAO, what's the advantage we are getting for
banging head learning complex architecture that can be achieved in just
10 liner code? It's no doubt good for complex projects though since it's
well structured and Unit testing friendly. But what for a simple app?
Honestly speaking, this video is not for complete beginners.
I'm a big fan of your tutorials man, keep up with the good work !! (Y)
I also learned that if you need the application context in your viewmodel, just extend Androidviewmodel instead of ViewModel
Couldn't that lead to memory leaks? The whole point with the ViewModel is to avoid Context all together.
Hey Mitch, you’re doing a great job!
I’m sure with time you’ll have a ton of subscribers and views.
Please use the dark theme for your IDE... very hard to watch the video during the night
Thank you. Yeah and if anyone is looking for the github link here is it - github.com/mitchtabian/MVVMExample1
Wow, just wow, I can't even begin to explain how you've inspired me. Thank you. :)
All courses should teach using the best practices
you should also make the default constructor of NicePlaceRepository class private. in order to implement the proper singleton method.
Yes you're right
ViewModelProviders.of(context) is deprecated..what to use instead
Change:
mViewModel = ViewModelProviders.of(this).get(MainActivityViewModel.class);
To:
mViewModel = new ViewModelProvider(this).get(MainActivityViewModel.class);
The way you describe mvvm, it sounds exactly like mvc. The model is the same, the view is the same, the repository/ DAO/ data layer is the same, and the controller in MVC is a wrapper for the application's business logic. You say that the viewmodel in mvvm has the same responsibility. I am struggling to see the difference.
These are interesting tutorials. The Java is a little odd to follow, though. Are you going to make versions of these videos in Kotlin?
Logically clear, and it helps me understand MVVM better (Also the English speech is relatively easy so I can get your point well).
GOOD TUTORIAL.
I just started learning MVVM so sorry if my question is stupid, at 23:49 you are making an example of what would be a server request, here you have a reference to `mIsUpdating` but is my understanding that I should have my api/db access code in the repository right? So If I make a server request on my Repository, how can I change `mIsUpdating`?
I guess I could pass a reference of `mIsUpdating` to the repo but this is just me speculating I don't know if it's the best practice
What the actual f__k?
Mitch I believe you teach really good and did your best
But I guess I have a really thick skull.
I sat through the whole video like a monkè
If only the MutableLiveData objects can change and I understand you can "observe" those changes, why would the regular LiveData have the observe method, if it does not change. Are we always supposed to use the MutableLiveData?
Great work Mitch.
But i have one doubt as per understanding ViewModel data should clear when we click back button in the mobile and activity is destoryed Right. Iam trying to reopen the app then recycler view Items going on increase. Is there any leak the program.
Awesome video , great Job my friend. Thanks for your smooth English and great explanation, I was really frustrated by Indian videos out there.. glg lglgl gl
Finally found an awesome Android teacher .
I dont understand how the list in the adapter automatically changed. We just call notifydatasetchanged(), but doesn't add the new value to the list in adapter. But somehow when the list in livedata is updated, the list in adapter is updated too. How that's work? The list in adapter is just normal list and we doesn't update it too..
Hi ,
I am unable to Register into your Official website
I am registering for the very first time but still says "Account with this Username already exists".
Good video! But Android team didn’t come up with the name view model, Microsoft did lol
Just applied your example to my app, and it works. Thank you!
Am I the only one who kept hearing BeautifulLiveData for MutableLiveDate for first 12 mins🤪
:D :D :D :D :D
Do we have to use live data if we are using viewmodel and mvvm ? Like I have some values of user name, address, age etc.. so how to store and retrieve them using viewmodel and mvvm ?
Very good explanation and example, you used a simple problem to explain about live data with MVVM arch, congrats.
Is mAdapter != null in 46 row inside your activity? U init mAdapter only in 50 row....
I have a question here, it's about ViewModel. Should I have ViewModel per screen or per entity or per business module? For example, I have a user authentication module in my app(login/signup) and then profile page and dashboard page that shows user information. Now, should I create one single ViewModel that gives me all necessary methods like login, signup, logout, getUserDetails or should I have multiple like LoginPageViewModel (having only login method), SignUpPageViewModel (having only signup method), ProfilePageViewModel (having only getUserDetails) and so on?
Also, if a page requires multiple objects like Users and Bookings then what? Should one ViewModel has both the getters or should I have 2 different ViewModels like DashboardUserViewModel and DashboardBookingsViewModels.
The same question....
why people always using API for MVVM turoial, please we are newbie hate advanced turoial
I am still confuse with the adapter you have not used data binding in the xml of recyclerView item
Can you do the same video but using kotlin ? It will be more helpful in 2021
Hey Mitch, with repositories, am I supposed to make a single repository for all network operations on my app or multiple repositories with network operations that are relevant to each other?
Sorry I didn't see this comment until now.
I would make different repositories to keep it organized.
Example:
Suppose you had to query "User" account data and also "News" feed data from a server. I would make two repositories. UserRepository and NewsRepository. Each repository would contain all the methods for managing the data from the server.
@@codingwithmitch thanks for replying! Makes sense. That's what I have been doing so far
I have found a bug. Each time the app is restarted the dataSet is duplicated. To avoid this I have added dataSet.clear(); in the method setNicePlaces()
Do you noticed this also? Why the array is saved?
Hello can any one tell me can we use MVVM for real time chat system in android ap?
Please make a video on Rx Android, please please please
It's on my list
Thanks
@@codingwithmitch Looking forward to it.
@@codingwithmitch please ASAP
and thank you for making this video :)
@@Shahzebkhan-mp3fp after I finish the rest API I will do an rxjava course
Anderson Susan Lopez Barbara Walker Shirley
Anyone had a problem with items not showing until you rotate screen ?
Martinez Barbara Lopez Dorothy Perez Mark
Martin Joseph Harris Betty Jackson Carol
The hardest part in implementing MVVM is dealing with different data source like cache and local database and network, so your app can be useful even in situations like poor internet. I hope you use these different data sources in your upcoming tutorial
I'm going to do a rest API integration with MVVM. I'll prob add a cache too. Depends on how many members I get on my website. I can't spend too much time on a single course
The best video for the beginners to understand the MVVM. Thank you
much appreciated i always love your work man! you are a legend.
Thanks for the demo of MVVM
Liked it a lot
Its harder than MVP, thats why I prefer MVP than MVVM.
Thanks man. Very clear explanation.
You are awesome bro!. You might have to do another video because ViewmodelsProviders.of is depricated.
Change:
mViewModel = ViewModelProviders.of(this).get(MainActivityViewModel.class);
To:
mViewModel = new ViewModelProvider(this).get(MainActivityViewModel.class);
Line 46 (28:24) - you are getting back the new list from the viewmodel everytime the observer knows about a change but you do nothing with the new list that you receive - so why bother notifying the adapter for any changes as you do nothing with these changes anyway?
Thank you for explaining difference mutablelivedata vs livedata. I am very confused when to used both of them because they are basically almost same.
I do not find the github repo.
Anyone has the link?
Awesome tutorial!
How to do this in Kotlin?
Hey Mitch! There's a problem. If I actually call an online API in setNicePlaces() method in Repository class, and set the value of dataset in the onResponse(), the LiveData doesn't update the UI with the received data. How should that be implemented? Please help !!!!
Chouf TV a ajouté une vidéo : « بعد تطبيق حالة الطوارئ بالمغرب..تعقيم... »
il y a 9 heures
your video is very helpful and well thought out
Mitch, why do we need to use postValue(), Instead you should have used setValue() itself, Since onpostexecute runs on the Main thread, setValue should be good enough right? please correct me if my understanding as wrong.
One of the best. Even Better than some paid Tutorials. Can you make some videos on Mokito and Junit Testing for some real scenarios like fetching data from URL, inserting data into Room DB using MVP or MVVM. I have done a demo project but I can't understand few things. If you can make some tutorials on this it would be great. Also sharing the Git Link: github.com/avik1990/NewsApp . My test cases always passes even when I intentionally write failed cases.
can you please share this github link of this sample
Google could have done far worse than to create an MVVM framework, but Google didn’t do anything for naming more grand than following naming as created by Microsoft for the ViewModel class, keeping in context MVVM is a Microsoft creation.
Now, if only all the old Microsoft Windows GUI applications were self-consistent for how they were architected for the GUI code versus the rest, with keeping it separated...
Davis Barbara Perez Anthony Martin Margaret
Thats good info u are give to the world for free ... big love
whaaaaaaaaaaat !!!! i made the right decision subscribing you man !!!!
This helped a lot in my understanding of MVVM. Hopefully I can build my own viewmodel soon
I absolutely love your tutorials. So easy to follow and understand. I love your clean and direct explanation of the topics. Great job! Thank you so much!
what the name of the software used to mirror the phone on the screen here ?
Glad I stumbled upon this. Great explanation!
Please continue this topic to adavance..🙏🖤
Hey friend, greetings from Brazil, do you know if there's any project with this MVVM architecture where i can use as template to build up any app in it? Your video is teaching me a lot about this issue, thank you in advance !
Nice job man. I have a question though. I am working with data from an API, and every time the fragment refreshes, the recyclerview is repopulated and thus the items are all @t can I solve that?
Thank you for the movie. One important comment: new nicePlace is added in MainActivityViewModel (and not in NicePlaceRepository). I would like to see how to run postValue from the NivePlaceRepository. Thank you.
Yet another high quality tutorial from you Mitch. I could not understand how MVVM works. The other tutorials go into details of databases and related topics. The result is MVVM basics are difficult to follow and implement. I did have to watch this tutorial five or six times to understand the MVVM concept. To test my understanding, the kotlin recyclerview tutorial (BlogPost) by you was used as a starting point. Following the instructions in this video and the source code for this tutorial, BlogPost source code was converted to the MVVM model used in this tutorial. Along the way I had to jump to google to solve problems when the intended kotlin code did not work as expected. The code I amended now works like this tutorial including adding new blogs by clicking the floating button. Many, many thanks for such a good tutorial. You are one of my go to channels for Android learning. Appreciate the time you take to post these tutorials.
I'm more of a MCVMPICVVM guy? It basically takes 2 years to write a simple app, but, it's worth the wait!
setNicePlaces(); function means a action to get data from webservice, right? it's usually asynchronous, so how data can set in livedata sir? using interface to pass data instead?
Jones Margaret Miller Charles Hall Jeffrey
Look at that I implemented viewmodel into my app last night and this afternoon I see your video!
That sounds so great.
What are the differences between various Android architectures?
What is the proper ways to use them?
They represent different ways to structure your code. MVC, MVP, MVVM. They all have different advantages/disadvantages. But personally I like MVVM for the reasons discussed in this video.
@@codingwithmitch thank you so much sir.
MVP - addressed separation on concerns
MVVM - addressed data persistence that was lacked in MVP
@@theonlyarjun good way to put it
@@codingwithmitch I have seen MVP is used to make test driven development which widen the scope for JUNIT testing , but I never saw MVVM being used for test driven development. So my question is whether MVVM can also be used for TDD ?