Hello! I was reading a lot about MVP, all resources constant is that Model and View not interacting with each other. And even in the beginning of this video where were shown MVP Pattern, there is no line between Model and View. At 13:53 you create instance of Model inside View and I can't understand is this still can be called MVP?
Yes, there is an issue directly creating user instances inside the view controller means you are connecting view to model, which is against the rule MVP. The user's instance should be inside the presenter and with the help of the presenter's instance, it should be used inside the view controller.
Yes It does, please note The MVP design pattern has two variations: Passive View - in this strategy the view is not aware of the model, and it is updated by the presenter. Supervising Controller - in this strategy the view interacts directly with the model to bind data to data controls. The presenter updates the model and manipulates the view only if necessary.
I had a discussion about who was an artist, and almost everyone said writers, singers, dancers, ...., it's a pity that there's no too much people able to recognize the art of doing something like you do in this tutorial.... for me it's real art...
Hello, Good Job really thanks, but I have some concerns, is it good to import UIkit at the presenter? what I mean is that the view controller only should Import UIKit to deal with the view. 2- the view Controller shouldn't include the user Model it should just display data so the table view configuration is better to be done at the presenter.
Your content is as always really insightful, but I’m confused over this video... doesn’t importing UIKit in the presenter break the rule of keeping the presenter completely agnostic, or is this considered as an accepted practice?
Agreed. I've seen tutorials on MVP where they advice against mixing UI code inside the presenter. Personally, I think I like that approach. So that we can make the presenter testable.
Please note, The MVP design pattern has two variations: Passive View - in this strategy the view is not aware of the model, and it is updated by the presenter. Supervising Controller - in this strategy the view interacts directly with the model to bind data to data controls. The presenter updates the model and manipulates the view only if necessary.
MVVM and MVP they both look similar, Its just that "view model" is mediator in MVVM and "presenter" is mediator in MVP. Could you make a video differentiating these two patterns!
yeah is the same thing, the difference in concept is that mvvm uses observers and mvp uses protocols and a delegate, at the end we could say is the same shit. You could add an escaping closure to all the "presenter" functions and avoid all the delegate and protocols boilerplate. This is actually like react, except that you *implicity* "pass functions through the delegate" to the "handler component" and the handler component executes those functions.
When I embed our UsersViewController in Navigation Controller and then start the application, I get a message in console: [Assert] UINavigationBar decoded as unlocked for UINavigationController, or navigationBar delegate set up incorrectly. Inconsistent configuration may cause problems. navigationController=, navigationBar= delegate=0x16081da00. In cause of this problem at the end of the project, when I ran the app, I can see the navbar but can't see any tableview and data. What I need to do to fix this problem?
i believe if the UI related things could stay in ViewController class because the end result is that we want to separate functionalities (UIKIT relates to ViewController/View , presenter for business logic and model is as per its name) . Resr depends on personal choice Regards
This guy is helping us a lot, don't just watch, let's comment and follow so the channel can grow and he can keep doing great material for us.
Yes
Thanks, waiting for another's Design Patterns
Clean Swift + MVVM...
Coming soon
Good example, thanks
Youre welcome
Lovely, thanks a lot for explaining MVP in a simple way. This was a lot helpful. Keep the good work. Cheers !!!
Youre welcome!
Hello! I was reading a lot about MVP, all resources constant is that Model and View not interacting with each other. And even in the beginning of this video where were shown MVP Pattern, there is no line between Model and View. At 13:53 you create instance of Model inside View and I can't understand is this still can be called MVP?
Yes, there is an issue directly creating user instances inside the view controller means you are connecting view to model, which is against the rule MVP. The user's instance should be inside the presenter and with the help of the presenter's instance, it should be used inside the view controller.
Yes It does, please note The MVP design pattern has two variations:
Passive View - in this strategy the view is not aware of the model, and it is updated by the presenter.
Supervising Controller - in this strategy the view interacts directly with the model to bind data to data controls. The presenter updates the model and manipulates the view only if necessary.
I had a discussion about who was an artist, and almost everyone said writers, singers, dancers, ...., it's a pity that there's no too much people able to recognize the art of doing something like you do in this tutorial.... for me it's real art...
I always have said code is art! I appreciate it
You are pretty weirdo
Much Appreciated ❤
I have a question. Why your MVP presenter do the same work as MVC Model?
Man.. that's really great video... 😇😇
Thanks
Hello, Good Job really thanks, but I have some concerns, is it good to import UIkit at the presenter? what I mean is that the view controller only should Import UIKit to deal with the view.
2- the view Controller shouldn't include the user Model it should just display data so the table view configuration is better to be done at the presenter.
Its a bit subjective
Really nice ..!
Thanks!
Thanks for the great tutorial!
Youre welcome
VIPER, MVP 😊. I learnt a lot from your videos, thanks ❤️
Youre welcome
Nice tutorial!!
Thanks!
Thanks. It will be great if you make a video where you create one app with a different design patterns.
Coming soon
Good content, Thanks.
But how we can test the business logic layer (presenter) with unit test. Can someone help?
Youre welcome
there's a lot of little things apart from the main topic, that's nice
Glad you liked the video
I don't understand why you code " & " in " UserPresenterDelegate & UIViewController ". Could you explain or give me keyword for that ?
It basically means an object that is both types
Your content is as always really insightful, but I’m confused over this video... doesn’t importing UIKit in the presenter break the rule of keeping the presenter completely agnostic, or is this considered as an accepted practice?
Agreed. I've seen tutorials on MVP where they advice against mixing UI code inside the presenter. Personally, I think I like that approach. So that we can make the presenter testable.
Please note, The MVP design pattern has two variations:
Passive View - in this strategy the view is not aware of the model, and it is updated by the presenter.
Supervising Controller - in this strategy the view interacts directly with the model to bind data to data controls. The presenter updates the model and manipulates the view only if necessary.
Thank!!!
Youre welcome
@@iOSAcademy i understand engish bad,Nevertheless it is so usefull for me. you do great job!
Thanks..
Difference btw MVVM and MVP
Youre welcome
Great tutorial as always🔥. The idea for the next videos is maybe server-side-swift? Docker, Vapor, Kaitura? What is Moya🤔?
Thanks for the idea!
Thanks for the explanation and demo! Very helpful
Awesome explanation :) May I suggest a vip pattern as well?
How prevalent is this pattern in IOS dev ? I have seen it in .NET frequently.
Its not super common but def exists
Is that not a memory leak with the controller referencing the presenter and the presenter referencing the controller?
weak link
MVVM and MVP they both look similar, Its just that "view model" is mediator in MVVM and "presenter" is mediator in MVP.
Could you make a video differentiating these two patterns!
yeah is the same thing, the difference in concept is that mvvm uses observers and mvp uses protocols and a delegate, at the end we could say is the same shit. You could add an escaping closure to all the "presenter" functions and avoid all the delegate and protocols boilerplate. This is actually like react, except that you *implicity* "pass functions through the delegate" to the "handler component" and the handler component executes those functions.
Amazing very good explanation. I could understand, it made things looks simple 😊
Thank you
Thank you
@@iOSAcademy 😉
When I embed our UsersViewController in Navigation Controller and then start the application, I get a message in console: [Assert] UINavigationBar decoded as unlocked for UINavigationController, or navigationBar delegate set up incorrectly. Inconsistent configuration may cause problems. navigationController=, navigationBar= delegate=0x16081da00.
In cause of this problem at the end of the project, when I ran the app, I can see the navbar but can't see any tableview and data. What I need to do to fix this problem?
soooo basically its VIPER without an interactor and router?
Basically
Waiting for Clean Swift architecture.
Soon
i believe if the UI related things could stay in ViewController class because the end result is that we want to separate functionalities (UIKIT relates to ViewController/View , presenter for business logic and model is as per its name) . Resr depends on personal choice
Regards
Make a vídeo with vip/clean swift architecture please?!!
how to create MVP in swiftUI?
Presenter do the same work as Model in MVC.
Nothingness, zero, nil, null, nothing, void, that's how I describe how I understand the difference between MVC and MVP.
Definitely prefer MVP over VIP or VIPER.
than you only have worked on small apps.. what about universal deep link or deep linking where complex navigation is required??
I feel like I'm at the level on which it's way easier to read documentation then watch.
Great place to be!
there is no apple documentation for design patterns..
@@developer-juice-Khailenno do not read apple’s documentation on MVP then. There is a bunch of material on the internet.
Presentor should not contain Uikit
First
First reply! 🙃