Factory design pattern in swift | Hindi tutorial

Поділитися
Вставка
  • Опубліковано 11 лип 2024
  • Factory design pattern is a creational design pattern and is used for the creation of objects. Factory pattern is a very basic pattern that can be used very easily but is not a silver bullet to be used everywhere.
    Design patterns help us to create maintainable software with flexibility, and there are multiple design patterns to choose from but one must understand what problem they solve and why to use them.
    In this session, we will discuss what are creational patterns and why we should use them along with a basic example of the factory pattern.
    If you can use factory patterns in your iOS interviews then please take the opportunity and use them as it will create a good impression on the code reviewer.
    Given are the chapters that are covered in today’s session
    0:00 introduction
    0:45 topics covered in this video
    1:01 architecture vs design patterns
    1:37 what are creational patterns
    2:59 why to use creational patterns
    4:12 advantages of creational patterns
    4:46 what is the factory pattern
    5:25 code review of the view model
    7:02 praises for creative developers
    7:18 implementing the factory pattern
    9:00 how factory pattern promotes loose coupling
    9:45 cleaning the code
    10:45 constructor injection with factory
    11:51 comparing before and after of the code
    12:08 why does the factory return a protocol
    13:36 drawback of the factory pattern
    14:00 like share and subscribe
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ✅ Subscribe to the channel and stay ahead of everyone by following the right way for writing clean code in swift. 🔥🔥🔥🔥🔥
    🔗Click on the link to subscribe: ua-cam.com/users/codecat?sub...
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    -----------------------------------------------------------------------------------------------------------------------
    📥 Download the source code from
    Github: github.com/codecat15/UA-cam-...
    Google Drive: drive.google.com/file/d/1gVhF...
    -----------------------------------------------------------------------------------------------------------------------
    Given are the link discussed in the video
    1. Architecture vs design pattern: • Architecture and Desig...
    2. Open close principle: • Open Closed Principle ...
    ############################################
    Connect with me on social media
    Instagram: / codecat15
    📧: codecat15@gmail.com
    🐦: / codecat15
    Facebook: / code.cat.792
    Github: github.com/codecat15
    ###########################################
    #factoryPattern #designPattern #swiftHindiTutorial

КОМЕНТАРІ • 58

  • @darshantelang1535
    @darshantelang1535 2 роки тому +14

    Anyone watching this channel for expanding your understanding of the concepts for free, please know that it matters when you hit Subscribe, Like, Comment and Share the video. It definitely helps the creator in keeping their content on top of search results and also to get some good ads that leads to payback of energy and time invested to make these quality videos.
    So If any video over here helped you in any manner in your work-life; as gesture of gratitude kindly Subscribe to channel, Like the videos and comment your views and keep the channel engaged.
    Disclaimer: I'm not doing any marketing for the channel.
    This is my way of showing gratitude to the creator of this channel as the content watched have helped me a lot :)
    Cheers mate🥂

    • @CodeCat15
      @CodeCat15  2 роки тому +6

      I don't know what to say here but this comment means so much to me because its not like I just make some ppt and just sit in front of my system there's a lot of planning done like scripts and how to speak what and when specially when the channel content has proven and helped in cracking interviews and solving problems it kind of becomes a moral responsibility.
      what you said is accurate, the subscription number helps in motivating me to bring out more of such content for free and I am thankful that many folks understand this but then the UA-cam analytics shows some different story and it's kind of demotivating at times and hence I ask to comment and share the channel and subscribe coz it doesn't cost anything.
      I am thankful for your comment and gratitude.

  • @virat027
    @virat027 8 місяців тому +1

    Love you Bro. you are a great teacher ❤

    • @CodeCat15
      @CodeCat15  8 місяців тому

      Thank you so much 😀

  • @kapilgoyal7808
    @kapilgoyal7808 2 роки тому +1

    Very simple explained video about Factory Design pattern, Thanks. You are a very good Explainer. i see many videos but when i see you video. it clicks on my mind quickly. 🙏🙏

    • @CodeCat15
      @CodeCat15  2 роки тому

      Thank you Kapil for your kind words it means a lot to me.

  • @electrowave8012
    @electrowave8012 2 роки тому +1

    Thanks! I was waiting for your video. In your every single video there is something to learn.

    • @CodeCat15
      @CodeCat15  2 роки тому

      Thanks 😊 do share the channel with your iOS group too and feel free to ask questions

  • @chaitanyadaphane2854
    @chaitanyadaphane2854 Рік тому

    Very well explained man 💯👍🏽

  • @BeWithNarendar
    @BeWithNarendar 2 роки тому

    PERFECT !!

  • @sfc138
    @sfc138 2 роки тому +2

    I have not learnt this much from any other videos than yours. You are totally the best teacher ever and I can't thank you enough for making difficult concepts this much easier to understand for us. I have also a request for you, I would be very thankful if you make video on Clean Architechure + MVVM and can use Realm as Local Database and use some api also. Thanks in advance.

    • @CodeCat15
      @CodeCat15  2 роки тому +1

      I am honored thank you, I'll surely see what I can do here as I am also itching to make a project in SwiftUI because that would give a broader vision of SwiftUI + Combine

  • @shubhamgupta8093
    @shubhamgupta8093 2 роки тому +2

    Great explanation of Factory Pattern…🙌🙌 thanks 🙏🏻

    • @CodeCat15
      @CodeCat15  2 роки тому +1

      Glad it was helpful, do implement it in your project and let me know if you face any issues with the implementation.

  • @darshantelang1535
    @darshantelang1535 2 роки тому +2

    The first step of code clean up generally starts with creating factory classes. Once the developer gets used to it, he'll then understand how to handle this on multiple layers i.e., creating a factory of factories. As explained in the video trade of violating Open Close principle is acceptable in this case.
    Overall neat and clean explanation of the pattern. I appreciate the energy the maker puts in making such quality stuff despite the usual work like any other developer.

    • @CodeCat15
      @CodeCat15  2 роки тому

      This means a lot to me, specially the last part thank you for your bright words Darshan and making me smile.

  • @mepolob
    @mepolob 2 роки тому +1

    Another GEM added on this channel

  • @Objrevs
    @Objrevs 2 роки тому +1

    Neatly done and well explained.

    • @CodeCat15
      @CodeCat15  2 роки тому

      Am glad this was helpful thank you

  • @sohelyadav
    @sohelyadav 2 роки тому +1

    Thank you so much for your time and effort to make such a wonderful tutorial.

  • @kumbharabhishek
    @kumbharabhishek 2 роки тому +1

    Neat and clean explanation of the pattern, Thank you so much for your time and effort to make such a wonderful tutorial.

    • @CodeCat15
      @CodeCat15  2 роки тому +1

      I am glad the content was helpful, plz do feel free to ask questions and do share the video with your iOS group.

  • @sagardaundkar3931
    @sagardaundkar3931 2 роки тому +1

    Very nicely explained !!

    • @CodeCat15
      @CodeCat15  2 роки тому

      Do feel free to ask questions on this topic and do share with your iOS group

  • @Abdulmoiz-ww3dj
    @Abdulmoiz-ww3dj 2 роки тому +1

    Great Ravi !

    • @CodeCat15
      @CodeCat15  2 роки тому

      Thank you, feel free to ask questions and do share the same with your iOS group

  • @iosselfhelp6123
    @iosselfhelp6123 2 роки тому +1

    Just found your channel via a LinkedIn post and this is my first video, I don't know how I was missing on your channel till date, subscribed immediately. You have a great technique of explaining things, please keep uploading :)
    P.S: Will be binge watching your channel this long weekend..

    • @CodeCat15
      @CodeCat15  2 роки тому +1

      I am glad the channel is helpful, do share the channel with your iOS group as well and feel free to ask questions. Thank you

  • @atmaramsawant6127
    @atmaramsawant6127 2 роки тому +1

    Nice explanation Ravi.

  • @JunaidKhan-ny8tu
    @JunaidKhan-ny8tu 2 роки тому +1

    This is lit 🔥 Ravi Thank you so much 😊 but the video is "The epitome of perfection." ❤

  • @osaimsyed4099
    @osaimsyed4099 2 роки тому +1

    Interesting topic

    • @CodeCat15
      @CodeCat15  2 роки тому +1

      Indeed it is and also adds good impression if you use them during interviews or to make the code more manageable

  • @TheSachinAlam
    @TheSachinAlam 2 роки тому +1

    Thanks for this vidro

  • @ArjunGovt
    @ArjunGovt 2 роки тому +1

    I have subscribed from my two accounts.. Double subscription to banta hai Ravi k liye.

    • @CodeCat15
      @CodeCat15  2 роки тому

      thank you bhai 🙏😊❤️

  • @priyagarg5261
    @priyagarg5261 2 роки тому +1

    This video helps me a lot.your way of teaching is very good. I wants all creational pattern video .as well as abstract factory vs factory.
    Thanks in advance 👍

    • @CodeCat15
      @CodeCat15  2 роки тому

      I am trying to introduce patterns slowly one by one, there's more to come. I am glad this video was helpful, do share the same with your iOS group too

  • @amitjoshi5798
    @amitjoshi5798 2 роки тому +3

    You are Leo Messi of iOS.

    • @CodeCat15
      @CodeCat15  2 роки тому +1

      just sharing what I know buddy, thank you for your comment and do share the video with your iOS group

  • @shanumishra170
    @shanumishra170 2 роки тому +1

    Great video. I usually wait for your videos. Please come up with adapter and momento pattern please 🙏

  • @nasir519
    @nasir519 2 роки тому

    Please continue this kind of architecture content, it really helps to lot of us.
    Please include ads in videos, at least I ll watch ads so that I can support your content indirectly

  • @puneetpal1466
    @puneetpal1466 2 роки тому +1

    thank you Ravi for nice explanation please make video on all design patterns

    • @CodeCat15
      @CodeCat15  2 роки тому +1

      I will try to add them one by one, thank you for the comment

  • @sarikapaghdal6150
    @sarikapaghdal6150 2 роки тому +1

    Once upon a time, I was a CREATIVE DEVELOPER😆

    • @CodeCat15
      @CodeCat15  2 роки тому

      we all start as creative developers, even I was a creative developer but then to be a responsible developer we must adhere to good coding principles. I am glad now you will code with more responsibility.

  • @apekshachaubey944
    @apekshachaubey944 2 роки тому

    @codecat - Ravi - plz make video on VIPER design pattern.

  • @shubhamdeshmukh9287
    @shubhamdeshmukh9287 Рік тому

    sarcasm level is on fire XD XD XD. Now I know why you enjoy making videos.

  • @MaheshKumar-ss4ob
    @MaheshKumar-ss4ob 2 роки тому +1

    Bro I've been following your videos for 3 months.It's a nice platform to learn something new
    Could you please explain about avkit avfoundation like how to retrieve the audio n video from server and play it!!

    • @CodeCat15
      @CodeCat15  2 роки тому

      it should be the same as fetching any response from the server, but then I think that's not how it works really because you want to play the song and keep on loading it at the same time for good performance, will surely check this one out sounds interesting.

  • @yogeshdate99
    @yogeshdate99 2 роки тому +2

    You are right and great video
    But jara ungali kam karte ja dusaro ki khamiya mat nikal tu yesa dikha raha he ki tuze sab ata ye baki me sab c he

    • @CodeCat15
      @CodeCat15  2 роки тому +6

      Thank you for your comment dude.
      creative devs vo log hai jinhe malum hai ki code galat hai fir bhi vo us code ko ya khud ko nahi sudhaarte.
      Aur maine kabhi ye nahi bola ki mujhe sab aata hai, programming mai aap kuch topics mai mere se jayada jaante rahogaye and vice versa.
      dusro k code mai galtiya nikalna kab se guna ho gaya? Jo galat hai vo galat hai.
      agar koi dev video dekhta hai aur video se aapni galtiya sudharta hai to ismai uski samajhdaari hai.
      Lekin video ko dekhne k baad bhi agar koi nahi sudhar raha to ab usse C for Creative na bole to kya bole

    • @umairahmad4368
      @umairahmad4368 2 роки тому +1

      @@CodeCat15 You are absolutely right.