iOS 15: Introducing MVVM into your SwiftUI project - Bucket List SwiftUI Tutorial 11/12

  Рет қаралды 24,899

Paul Hudson

Paul Hudson

Күн бұрын

Пікірлер: 21
@shim2dawg
@shim2dawg Жыл бұрын
Thank you for stating MVVM is a terrible name. I have always been confused by it and it's nice to be validated.
@carlsmith358
@carlsmith358 Жыл бұрын
This video really improved my understanding of how to use MVVM in SwiftUI, along with the benefits it has.
@acjazz01
@acjazz01 2 жыл бұрын
You've created a wrong connection between ViewModel and ContentView by putting the VM inside of an extension of the ContentView, and actually MVVM says that the ViewModel must be agnostic, as it can be used in any view.
@HaraldSchubert
@HaraldSchubert 2 жыл бұрын
Perfect explanation of MVVM and application to SwiftUI!
@maple3226
@maple3226 2 жыл бұрын
I'm having a warning when I'm declaring the viewModel variable saying "Expression requiring global actor 'MainActor' cannot appear in default-value expression of property '_viewModel'; this is an error in Swift 6". Is there a different approach to remove this warning?
@JeffreyConcerto
@JeffreyConcerto 2 жыл бұрын
Paul, why is it better to save the data via documents directory here instead of using CoreData?
@Ipat639
@Ipat639 Жыл бұрын
I am struggling with binding viewModel's private(set) var string and ContentView's TextField, any idea?
@igorsevtsenko655
@igorsevtsenko655 3 жыл бұрын
Hi. Could you make please video about VIPER with SwiftUI. Very interesting to watch how can we use protocols for modules connections and SwiftUI property wrappers
@mykytakhlamov
@mykytakhlamov Жыл бұрын
Thank for this video and your work! I have one question: How to proper test this ViewModel via UnitTesting?
@jamesm.6874
@jamesm.6874 Жыл бұрын
You are an excellent teacher, thank you so much!
@rileybarabash221
@rileybarabash221 2 жыл бұрын
Since we're migrating our logic from structs into classes, doesn't this have a negative affect on performance?
@obelix8477
@obelix8477 3 жыл бұрын
MVVM is not an acronym. Acronyms are pronounced like words. Think radar, ASCII, modem. MVVM is an abbreviation. Probably a greek or latin base somewhere in there. Also, if your fans are confused with "belts and braces" they may know braces as suspenders. This is an analogy for the parts that hold your program together. They keep the "pants up" so to speak. But this means using two ways to ensure your pants don't fall down.
@prashank
@prashank 3 жыл бұрын
Ty Mr. Doggo
@shotaworld
@shotaworld 3 жыл бұрын
Great video! Could you make a video about the redux pattern? For example, the store, actions, reducers and dispatch. Thanks!
@tinkering.online2007
@tinkering.online2007 2 жыл бұрын
I think someone should file a bug for that disappearing of the file contents :-) But XCode gets angry at me too sometimes.
@RajeshSharmaIndia
@RajeshSharmaIndia Жыл бұрын
View model is an independent component which should not have any information regarding views, by creating the view model class inside the view extension we are encapsulating the view model class which is resulting in tight Coupling. What problem are you solving by creating the view model class inside view extension?
@twostraws
@twostraws Жыл бұрын
I’m struggling to find the inclination to reply to this level of rudeness, however I will at least say this: you’re facing a problem known as Chesterton’s Fence, and might want to take a little more time to think before posting these sorts of comments.
@RajeshSharmaIndia
@RajeshSharmaIndia Жыл бұрын
With a very polite manner I am saying that I learned so many thing from your video and article , but at some point if I have doubt in something or I found its not a good way to do the thing, so its no harm that creater accept i did wrong or if you didn't ,so you had to explain the reason why you choose that approach. Lots of people followed you and apply the approach in projects . i hope you didn't find the truth is rude.
@Ipat639
@Ipat639 Жыл бұрын
it is not tight coupling, it is a reminder that this view model normally should be used with this view. And it is a class declaration not a concrete object, you can instantiate it and use where you want to use.
5 Steps to Better SwiftUI Views
31:19
Paul Hudson
Рет қаралды 56 М.
Кто круче, как думаешь?
00:44
МЯТНАЯ ФАНТА
Рет қаралды 6 МЛН
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 36 МЛН
How many people are in the changing room? #devil #lilith #funny #shorts
00:39
SwiftData Basics in 15 minutes
15:18
CodeWithChris
Рет қаралды 51 М.
Coding a FULL App with AI (You Won't Believe This)
15:19
Creator Magic
Рет қаралды 229 М.
I Made an iOS App in MINUTES with This AI Tool!
13:20
Creator Magic
Рет қаралды 297 М.
8 Common SwiftUI Mistakes - and how to fix them!
28:05
Paul Hudson
Рет қаралды 50 М.