iOS Dev 34: MVVM Design Pattern Explained with Example | Swift 5, XCode 13

preview_player
Показать описание
In this video we learn about the Model View ViewModel (MVVM) Design Pattern.
We start by understanding how each component connects with themselves, then we implement an example project (Login Page) using the MVVM pattern.
We also learn how to bind our View with our ViewModel using the Observable method.

Additional Materials:

Say Hi on Social Media:

Video Content
1. Introduction 00:00
2. What is MVVM? 00:18
3. Starter Project Explained 08:38
4. ObservableObject Class 14:20
5. Create Network Service 22:16
6. Implement LoginViewModel 26:00
7. Implement Binder 30:52
8. Test Example 37:22
9. Implement HomeViewModel 39:44
10. Conclusion 46:25
Рекомендации по теме
Комментарии
Автор

I mentioned you as being a great resource for beginning iOS developers. You do have the BEST explanation of MVVM on YouTube for people who are just starting out. Keep up the great work.

followerOfJesus
Автор

This saved my day! I like your teaching style that's keeping the boilerplate code to minimum and is straight to the point! Great tut!

DaisakuEjiri
Автор

one of the best IOS channels out there, so underrated man.. commenting to make YT algorithm stronger <3

easthastings
Автор

This explanation finally set everything straight. Thank you!

kindofexistentialist
Автор

very nicely explaining the MVVM architecture.

Sakshisharma-ktmt
Автор

been looking for a clear tutorial for so long, thanks a lot bro, please make a video about mvvm with cordinator pattern

abanoubashraf
Автор

Thanks for the time and effort you put to these videos, greetings from an Emanuel of Argentina!

emanuelditzel
Автор

Very good explanation with appropriate examples, but it will be very handy if you would post also end version of project

andreipripa
Автор

Great video, very useful. One comment on the error observable - it seems like a not great pattern to observe the error and take an update with nil to mean logged in; we could have a bug if say the error was re-initialized to nil and the login hadn’t actually even been attempted yet, cause nil is the default state. What I’d suggest would be something like a isLoggedIn property on the view model that is defaulted to false, and observe that to decide to proceed if it gets set to true

GK-eemw
Автор

Don't stop doing these, you're tutorials are my favorite

zachdavis
Автор

Hi Emmanuel, This was indeed a very good explanation, but one thing i want to point out that, whenever you initialize your view model, and you have subscribe it in setup binder, then Observable object will call with nil value as well. Since you have used listener(value) in bind method as well. A simple print statement would do. Even before clicking on button goToHomePage method will call.
Let me know if i am missing something.

preetipandey
Автор

Many thanks, that's the best explanation I've seen

ArdakDev
Автор

hello Sir, I accidentally bumped into your channel and I have to say that I really enjoy your amazing teaching style and would love to see you make RxSwift and Combine !
Also I hope you can make a in depth video about the situation where it allows multiple binding happens. Appreciate it

raychen
Автор

Merci beaucoup Emmanuel !! So nice to finally get it !! it would be so good to hear your approach on RxSwift or combine :)

damsobaba
Автор

Great video bro! Your explanation is very easy to understand! Keep doing these!! Thank you!!

thagionjack
Автор

You are amazing. Thank you for big font and your style of teaching!

AlexPeresedov
Автор

Thanks for good Video! I started MVVM pattern recentry, this video was so good for me! Explained stroy was so good understanding.
I want to know about one thing, Beginning of this video, you said listener(s) get this →[  ] .
How to attach it this code I didn't know...
And main storyboard was there, should I make it in MVVM pattern ?
If you have a time please teach me about this pattern in new video I think!
Anyway I wish your new videlo anything!
Thanks!!

shinitiomit
Автор

Please make an updated video where you show an array of listeners in an observable object.

followerOfJesus
Автор

Passing data from view to another view's viewModel - Users List Page -> User Detail. How we pass data from view controller -> Detailed View controller ? - > Directly we can assign from Main to Detail view?

subinkk
Автор

great explanation emmanuel is this binding technique called the "Box" Technique?

jameelshehadeh
visit shbcf.ru