How to Use MVVM (Model View ViewModel) in Swift & iOS - 2023

preview_player
Показать описание
Model View ViewModel is a popular design pattern used in iOS Development. Learn the ins and outs of MVVM through a real world example. Build sustainable, maintainable, and large scale projects with this awesome coding approach!

iOS Academy offers the #1 course for iOS Development for Beginners. Learn to create iPhone and iPad apps from scratch. Everyone these days has an app idea; learn the important skill of making those apps, make yourself more marketable, change industries to get a different job, and enjoy the ride!

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

without zooming in and out all the time would be easier to follow. getting dizzy here 😀

multitudes
Автор

Quickly history lesson:
Apple acquired NeXT Computer in 1996
Before Xcode, there was Project Builder and Interface Builder. nib = NeXT Interface Builder.
Xcode merged Project Builder and Interface builder into one app and nib file format changes to XML. xib = XML Interface Builder.

NSString = NeXT Step String.

michaelsanford
Автор

Hi, The tutorials is very helpful and informative, bu the zoom level is too close and i got lost and difficult to catch the actions. @ios Academy: - Please try to zoom out for easily understandable and follow the procedures.

muhammadharoon
Автор

Hi! Thank you so much. If you have time please expand this. Like how do we arrange the project structure using MVVM?. Thanks. Am I too demanding? Sorry lol but I really like your pace and how easy to understand your explanations. Thanks again, we really appreciate it.

hustlasever
Автор

Thanks. Your videos really help me. Can you explain mvvm using an api call ?

yashuttekar
Автор

Hi! Thank you for the tutorial! I was wondering, how does the viewModel you introduced make the ViewController less massive? Thank you :)

markyjordan
Автор

why you compiled first before doing some code? is any reason behind that?

Rafaglg
Автор

I love how you sum things up in a video shorter than 20 minutes. Keep on doing the good work please

hasanbasriozturk
Автор

Xib is the XML file, the nib is the compiled one, which is the one copied on the application bundle.

rondamon
Автор

Should the ViewController still hold a reference to the model array (Person in this example) in MVVM? Also do network calls go in VC or VM?

xchen
Автор

Thanks for the video. Great content! Here's my note:


The view controller class had more lines now. I could have left it accessing the model object directly and take what property I want. I didn't get why having a middleware object which is the view model makes the code cleaner. Even if the person object had 100 properties I can still get the 2 I wanted without having to implement a view model object.


Because I'm still a beginner in iOS development (only about a year into it), maybe I need to work on more projects to see its value.

alobaili
Автор

Great tutorial, thank you for sharing the information. Like you said 1. Can we use MVVM for large/bigger projects which are going to use the app in millions? 2. Is this design pattern useful for any specific domain apps? Please advise me on the Pros and Cons.

aparnarvd
Автор

Amazing stuff very well done!, nice and concise video on MVVM. I really got this easily.
One feedback is do zoom but just a little bit zoom so we can know where you are. However you are doing great.

afaaqahmedsaqi
Автор

Answering your 10 years old question, in ancient OS X days, nibs where native files. In OS X 5, the changed the format to xml, hence Xib.

camelectric
Автор

good one for a beginner. It would be better if you explain MVVM with Combine or RxSwift. Your explanation is simple and make sense. :)

ashwina.u
Автор

Hello, great tutorial. A small request kindly please make video without using storyboards, because many companies does not hire ios developer who use storyboards, programmatically is the best way to learn. May be it's hard to learn to code everything like to create tableview or etc, but companies want those candidates who create an app without using storyboards.
If you have complete beginner tutorials that creates an ios app then please shar the link.
You are a very good teacher and I want to learn from you...

Diadem
Автор

Thanks for the video, very well explained.

Ravikanth_
Автор

Thanks ! So the view-model is pretty much just the entire data that will be held/used by a component along with it's custom functions. In bigger apps would a screen with custom components all be separated into their own view-models ?

cuevas
Автор

How can we update the model from user action lets say I'm showing some list which has a fav button so when the user clicks on fav in the cell I want to update the model, So what's the best way to update using MVVM, ?

IraniyaNaynesh
Автор

In MVVM, don't we try to avoid having any instance of Model in the View/View Controller? Shouldn't it be an instance of Model in the View Model, and an instance of View Model on the View/View Controller?

BABEENGINEER
welcome to shbcf.ru