Model view controller MVC design pattern in Swift iOS (Hindi tutorial)

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024

Комментарии • 74

  • @U-and-Mee
    @U-and-Mee 2 месяца назад +1

    Next Level Video, Thanks.

  • @saif287
    @saif287 3 года назад +1

    Totally agree with your point Ravi. I am working on iOS for more than 10 years . MVC is not bad, the way we write code makes it bad. And lastly we start complaining MVC is massive view controller. Love the way u explains things

    • @CodeCat15
      @CodeCat15  3 года назад +1

      One more thing that I wanted to add to this video was how some creative devs just to try new patterns defame an old pattern and I think that's not a good approach. We should know in detail about the patterns, what problem they solve, how to implement them in their respective technology with good software engineering principles, else it would be the classic case of removing a screw by using a hammer, a hammer is used for a different case to remove a screw we need a screwdriver. I am glad this video was helpful to you Saif, please do share this with your iOS group

    • @saif287
      @saif287 3 года назад +1

      @@CodeCat15 totally agree. Surely I will share it .

  • @akhilgupta6883
    @akhilgupta6883 2 года назад +1

    Do you have any video on VIP or VIPER ? If Not can you make it, though I have gone trough several tutorials but missing your simple/clean explanation.

  • @rishilund4120
    @rishilund4120 2 года назад

    are bhai kya mast banate ho videos zbardat

  • @akhilgupta6883
    @akhilgupta6883 2 года назад +1

    Very clean and simplest explanation I have ever seen. Thanks a lot Code Cat.

    • @CodeCat15
      @CodeCat15  2 года назад

      Glad you liked it 😊

  • @kapilgoyal7808
    @kapilgoyal7808 8 месяцев назад +1

    Very Informative and clean understanding, I have ever seen.👍

    • @CodeCat15
      @CodeCat15  8 месяцев назад

      Feel free to ask questions on the topic and do share the content with your iOS group. I hope this channel provides more insights and details for every topic that you search.

  • @vyankateshshivnikar7932
    @vyankateshshivnikar7932 Год назад +1

    Very nice explaination....Thanks Ravi...

  • @aniltodakar6449
    @aniltodakar6449 3 года назад +1

    A very nice, experienced person can also take help from this.

    • @CodeCat15
      @CodeCat15  3 года назад

      I am glad the video was helpful Anil, welcome to the channel

  • @jabraham08
    @jabraham08 3 года назад +1

    thanks. finally, it is making sense.

    • @CodeCat15
      @CodeCat15  3 года назад

      Do checkout the second part of the video which is decomposition in mvc to see how you can arrange your code and make it less tightly coupled

  • @rohandhankani3962
    @rohandhankani3962 3 года назад +1

    Than you ravi. I appreciate the effort

    • @CodeCat15
      @CodeCat15  3 года назад

      I am glad these videos are helpful

  • @prataprana2963
    @prataprana2963 2 года назад

    👍🏼👍🏼👏🏻👏🏻Great Video

  • @hardipgajera2316
    @hardipgajera2316 3 года назад +2

    very informative and waiting for the next session. 👌

    • @CodeCat15
      @CodeCat15  3 года назад

      Thanks Hardip am glad this video was helpful do feel free to ask questions on this and share it with your iOS group on WhatsApp or Facebook

  • @bishalram481
    @bishalram481 3 года назад +1

    Thanks for your excellent explanation

    • @CodeCat15
      @CodeCat15  3 года назад

      Welcome to the channel Bishal, I am glad this video was helpful do watch the second part of this video which is decomposition with MVC, I am sure you will get more insights in that video as well. Do share the video with your iOS group on whatsapp or facebook and feel free to ask questions

  • @iamwaseem99
    @iamwaseem99 3 года назад +2

    Great explanation as always ✌️.

    • @CodeCat15
      @CodeCat15  3 года назад

      Thanks waseem am glad this was helpful, do ask questions on this and feel free to share it with your iOS group

  • @rishilund4120
    @rishilund4120 2 года назад +1

    Perfect bhai cant thanks much for this

    • @CodeCat15
      @CodeCat15  2 года назад

      Happy this video was helpful Rishi 👍

  • @GaneshPatil-qu3be
    @GaneshPatil-qu3be 3 года назад +1

    Apart from explaining things in such a detail 👌..
    You always introduced us with some new terms and concepts. 🤘✌

    • @CodeCat15
      @CodeCat15  3 года назад +1

      I am glad this video helped, and the concepts were already there from day 1 and it's quite sad that nobody reads the documentation where apple has mentioned a ton of good practice to improve our code
      Part of the problem is we just jump to code rather than doing system design or how your code flow will be if we all start doing that the code quality and the productivity of the team will drastically increase.
      Please do share this video with your friends and help them to learn MVC using the right techniques and as always feel free to ask questions :)

  • @pratikgajbhiye5354
    @pratikgajbhiye5354 3 года назад +1

    Thank you so much for this video

    • @CodeCat15
      @CodeCat15  3 года назад +1

      I am glad this was helpful pratik do feel free to share this video with your iOS group and do feel free to ask questions on this topic

  • @twinsbaby5774
    @twinsbaby5774 2 года назад

    very good

  • @shahbazkhan-pb3un
    @shahbazkhan-pb3un 3 года назад +1

    Nice
    This is show your hard work

  • @RohitSharma-ps1dx
    @RohitSharma-ps1dx 3 года назад +1

    very good explanation

    • @CodeCat15
      @CodeCat15  3 года назад

      Thanks Rohit, please do feel free to ask questions and do share it with your iOS group on WhatsApp or Facebook

  • @ernishant11
    @ernishant11 3 года назад

    I really appreciate the way you explain things. Thank you so much!!

  • @akashrevanna5327
    @akashrevanna5327 3 года назад

    Thank you for sharing knowledge 🤝

    • @CodeCat15
      @CodeCat15  3 года назад

      I am glad it was helpful Akash

  • @RohitSharma-ps1dx
    @RohitSharma-ps1dx 3 года назад +1

    Could you please make a video regarding MVVM also.

    • @CodeCat15
      @CodeCat15  3 года назад

      Hello Rohit welcome to the channel, i did make 3 videos on mvvm and here’s the playlist for the same
      Playlist mvvm: ruclips.net/p/PLb5R4QC2DtFs8CsVZztGSJ0TM8J2URfg7

  • @Deepakkumar-bi8hf
    @Deepakkumar-bi8hf 2 года назад +1

    i am having one doubt how it is different from MVVM . mvc me controller and mvvm me view model both are handling same thing suppose i have a validation which i can create diff file for validating and other logic related things in separate file i can call from controller or view model then how is it different not able to understand what is the difference ..BTW nice video i liked your explanation

    • @CodeCat15
      @CodeCat15  2 года назад

      controller should have one responsibility which is to request data for its UI components and that's all anything you add extra in the controller is a complete violation of its responsibility. Apple has its own flavor of MVC to tackle few things as you may have seen in the video but then too everyone just dumps everything inside the controller and then blames how troublesome MVC is, and if you think MVVM is awesome well now whatever creative devs dumped inside the controller making it massive now the same dumping is happening in view model, so it all boils down to understanding the responsibility of those layers and implementing them accordingly.

    • @deeprajchowrasia6090
      @deeprajchowrasia6090 7 месяцев назад

      bro but what should be the appropriate answer for the difference between MVC and MVVM, specifically with respect to ios development@@CodeCat15

    • @pravinnashte9514
      @pravinnashte9514 4 месяца назад

      @CodeCat15 waiting for your reply here for answer for the difference between MVC and MVVM, specifically with respect to ios development, please reply

  • @bhabanishankarbehera8476
    @bhabanishankarbehera8476 3 года назад +1

    it was good, and i can't wait for next part of it. so can you tell me when will it come?

    • @CodeCat15
      @CodeCat15  3 года назад

      Hey there, welcome to the channel am glad this video was helpful to you. I will try to release the second part by Sunday or max by Monday next week. Until then plz do feel free to ask questions on this topic and do share it with your iOS group on WhatsApp or Facebook 👍

    • @bhabanishankarbehera8476
      @bhabanishankarbehera8476 3 года назад +1

      Ok thanks, 👍

  • @pratikgajbhiye5354
    @pratikgajbhiye5354 3 года назад +1

    Which is the best way to create view, xib or programmatically

    • @CodeCat15
      @CodeCat15  3 года назад +1

      I think it depends, you can use storyboard and xibs for uikit based project.
      For larger projects i would never recommend storyboard coz for larger projects they give rise to a different problem, but if you look at swift ui i think apple wants us to use code for creating ui.

  • @dheerajgupta5830
    @dheerajgupta5830 2 года назад +1

    One quick question, as you said in the video that we need separate layer for Business logic, Validations and api calls which is valid but how do you convince this to the interviewer because as per MVC, business logic is a part of Model.
    Please clarify and support your explaination with apple point of view.

    • @CodeCat15
      @CodeCat15  2 года назад +1

      What happens when you want to share the same business logic with 10 models?
      What will be your approach if you keep BL (business logic) inside models?
      You will end up copy pasting the same code in all those layers breaking DRY principle and this is bad
      Not only that, the code is now tightly coupled to all those models and we have zero reusability.
      Your business logic is now scattered across the entire application than being centralized
      Imagine what happens when the BL needs to change? What then?
      A new developer can easily mess things up if they forget to make change to all those 10 models same goes for the dev who worked in the project
      I agree to most of what apple mentions in their docs but then I disagree that BL should be inside models and the above is my technical reason for the same.

    • @dheerajgupta5830
      @dheerajgupta5830 2 года назад

      @@CodeCat15 Thank you so much for quick reply and also for the descriptive explanation. Also, putting your reviews/opinion in the end of the video helps, you don't only read the said things, you also optimize by including the last part.

  • @suhaspathak6319
    @suhaspathak6319 3 года назад

    Nice explanation , Is there any disadvantage for MVC?

    • @CodeCat15
      @CodeCat15  3 года назад +1

      I don’t really think so, if a dev is facing issues like massive view controller or anything else its probably because they have not structured their code well or followed any design patterns.

  • @poojanegi9786
    @poojanegi9786 6 месяцев назад +1

    I am at 14:09 and if i see image and my room, both are same.

  • @sahutarun50
    @sahutarun50 3 года назад +1

    Second part kb aayega? Excited for that. ✌️

    • @CodeCat15
      @CodeCat15  3 года назад +1

      mostly next week, next week to clean code pe hoga but what's really interesting is the container and child view controller concept coz using those two concept the UI code can be managed more effectively, Apple's documentation is very detailed on that concept I did share the link in the video description for the same

    • @sahutarun50
      @sahutarun50 3 года назад +1

      Yes i want to know that. I have Idea of mvc and mvvm but this basic logics are must have to know.

    • @CodeCat15
      @CodeCat15  3 года назад

      Yup, i think i did see latest and old video and blog tutorials and they do not explain model controllers and container views its only when you know about these two terms you can search them, i wanted to make sure i atleast introduced them in this video so that i can remember to make videos on them later

  • @markme7092
    @markme7092 3 года назад +1

    Waiting for SwiftUI content? I think you should make 3 to 5 video in a week.

    • @CodeCat15
      @CodeCat15  3 года назад +2

      Man i only wish that was the case coz i love to do that but i am not a full time youtuber and i get time only on weekend to make videos due to work but i been working and learning swift ui and must say its really amazing

  • @dheerajgupta5830
    @dheerajgupta5830 2 года назад +2

    Sorry to bug you again, but can you please share a git project or a video to show how mvc following project with hierarchy should look like? Its fine, even if the files and folders are empty but hierarchy is what i need to know.

    • @CodeCat15
      @CodeCat15  2 года назад

      Let’s do this, add in your understanding of this hierarchy and I’ll add corrections to it if needed.

  • @MrVirani123
    @MrVirani123 3 года назад +1

    Hello Ravi
    Suppose, in my project uses 40-50 apis. then i create 40-50 resource file. is this oky?

    • @CodeCat15
      @CodeCat15  3 года назад +1

      Hey Bhavesh thanks for asking this. The answer is NO. Out of those apis there will be few which belong to the same entity like for example
      1. Get employee
      2. Update employee
      3. Delete employee
      4. GetEmployeeWithDepartmentId
      so these are 4 separate APIs but they belong to the same entity which is Employee so you create a single resource file for them with the name EmployeeResource and add these 4 Apis there same goes for any other entity.
      Let me know if that answers your question and if not plz feel free to ask more

    • @MrVirani123
      @MrVirani123 3 года назад

      @@CodeCat15 Thanks Ravi

    • @MrVirani123
      @MrVirani123 3 года назад

      Hello Ravi,
      I understand this but if more entity in project and so i create more file that is any disadvantage.
      My question is separate class has separate file.

    • @CodeCat15
      @CodeCat15  3 года назад

      So is your concern creating more class in your project? Or creating more swift files?

    • @MrVirani123
      @MrVirani123 3 года назад

      @@CodeCat15 its nearly 100 entity. so create 100 separate file for each class. It is oky?
      I was google but some person say it good to decompation and some says not to longer good.

  • @U-and-Mee
    @U-and-Mee 2 месяца назад