Nested closure vs Dispatch group swift iOS Hindi tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 พ.ย. 2024

ความคิดเห็น • 33

  • @MandeepSingh-ly3jj
    @MandeepSingh-ly3jj 3 ปีที่แล้ว +3

    Huge Respect for Ravi Sir, He is genius Guy, With the help of him videos related to an iOS , I was selected in reputed company , and now I have around 2year of experience and salary package is also great . all credit to Ravi sir. Salute to this man bcz I was selected in covid time and also I supported to my family with my earning. Again Really thanks from my heart. :)))

  • @asura9923
    @asura9923 3 ปีที่แล้ว +3

    This tutorial saved my time for calling multiple API, thanks a lot

    • @CodeCat15
      @CodeCat15  3 ปีที่แล้ว

      Glad this was helpful

  • @akanksha2143
    @akanksha2143 3 ปีที่แล้ว

    I like that you provide code in the description box. It helps a lot. Thanks

  • @shubhambhadauria
    @shubhambhadauria 3 ปีที่แล้ว +1

    Great Explanation......Big hats of too you....

    • @CodeCat15
      @CodeCat15  3 ปีที่แล้ว

      Hey Shubham, welcome to the channel and thanks for your comment

  • @mohammadzeeshan2025
    @mohammadzeeshan2025 3 ปีที่แล้ว +1

    Bro u r doing an awesome job... I was looking for such videos since years.

    • @CodeCat15
      @CodeCat15  3 ปีที่แล้ว

      I am glad this was helpful Zeeshan, welcome to the channel :)

  • @amitjoshi6137
    @amitjoshi6137 3 ปีที่แล้ว +1

    Your each video reveals new things

    • @CodeCat15
      @CodeCat15  3 ปีที่แล้ว

      Hehe thanks Amit, am glad you found it helpful. Do feel free to ask questions on this topic and do share the video with your iOS group on WhatsApp or Facebook

  • @icodingschool9018
    @icodingschool9018 3 ปีที่แล้ว +1

    perfect explanation RAVI

    • @CodeCat15
      @CodeCat15  3 ปีที่แล้ว

      Glad you liked it

  • @DeepakSingh-tp8bb
    @DeepakSingh-tp8bb 3 ปีที่แล้ว +1

    Well explained and choosing between one of them mostly depends on our scenarios.

    • @CodeCat15
      @CodeCat15  3 ปีที่แล้ว

      True, if there’s dependency i would not go for dispatch group, however I won’t even go for nested closure too coz there’s a better way to handle nested dependencies in the iOS world. 😊

  • @nagarajvrao7249
    @nagarajvrao7249 3 ปีที่แล้ว +1

    Make videos on Combine framework (how it is better than operation queue for networking).
    For example: syncing the data (simultaneously)

    • @CodeCat15
      @CodeCat15  3 ปีที่แล้ว +1

      Thanks for making that video request, its there in my radar but then to understand that we must understand the core basics of combine like how it publishes its event and how an observed object reacts to it once we know that with a little practice we can achieve wonders with combine. I am working on one more video on threading and then there will be combine videos all back to back

  • @polu9132
    @polu9132 3 ปีที่แล้ว +1

    Very informative. this video will help us to reduce data loading time in apps, which will lead to performance optimisation. Thanks a lot Sir.

    • @CodeCat15
      @CodeCat15  3 ปีที่แล้ว +1

      That is true Polu, its always good to know the performance impact about the tools we are using so that we can make the right technical decisions.

    • @polu9132
      @polu9132 3 ปีที่แล้ว

      @@CodeCat15 yes. will keep it in mind.😀

  • @vamsi3877
    @vamsi3877 3 ปีที่แล้ว +2

    Great episode thanks 👏

    • @CodeCat15
      @CodeCat15  3 ปีที่แล้ว

      I am glad this was helpful Vamsi, please do feel free to ask questions and do share the video with your iOS group

  • @JunaidKhan-ny8tu
    @JunaidKhan-ny8tu 3 ปีที่แล้ว +2

    great Explanantion :-)

    • @CodeCat15
      @CodeCat15  3 ปีที่แล้ว +1

      Thanks Junaid, I am glad this video was helpful :)

  • @rohithnayak4475
    @rohithnayak4475 3 ปีที่แล้ว +1

    Very Helpful

    • @CodeCat15
      @CodeCat15  3 ปีที่แล้ว

      I am glad this was helpful 😊

  • @fitdevelopertv5148
    @fitdevelopertv5148 3 ปีที่แล้ว

    As DispatchGroup is async in nature then there is no guarantee of the sequential ending of the task. this can be a difference between dispatch group and semaphore.

  • @AnkitSoni30
    @AnkitSoni30 3 ปีที่แล้ว +1

    It means there is no sequence in Dispatch Queue? Means API C may call first then A and B

    • @CodeCat15
      @CodeCat15  3 ปีที่แล้ว +1

      no there's no sequence in using dispatch group or queue as a matter of fact, if you want to call them in order or if there's a dependency then you should look at operation and operation queue class and not GCD.

    • @AnkitSoni30
      @AnkitSoni30 3 ปีที่แล้ว +1

      @@CodeCat15 Okk, so can please tell us what is the difference between dispatch group and concurrency looping? both looks same to me

    • @CodeCat15
      @CodeCat15  3 ปีที่แล้ว +2

      @@AnkitSoni30 in dispatch group you can add up tasks and once all tasks are completed it will notify the main thread using the notify function whereas a concurrent loop is more like fire and forget and don't even care to notify the main thread about task completion.
      Dispatch group runs in a separate thread whereas for concurrent loops we need to take care of not running it in the main thread else it's going to be a pain and not to mention if you plan to update a variable inside these concurrent loops then I guess we are responsible to handle the value change not sure about this last one I have to check its been a while I looked at them.

    • @AnkitSoni30
      @AnkitSoni30 3 ปีที่แล้ว +1

      @@CodeCat15 thanks...

  • @ashislaha1302
    @ashislaha1302 2 ปีที่แล้ว +1

    This is not the right way to compare. For the first example (nested api) you call API B after finishing the API A where as for dispatchGroup you call both A and B at the same time. Definitely by logic, the nested closures are working sequentially and the time should take A + B + C ... whereas for dispatchGroup as all are happening concurrently, it will take max(A, B, C).

    • @CodeCat15
      @CodeCat15  2 ปีที่แล้ว

      if you look at my earlier video on dispatch group I did mention that it calls all the api in one go and must be used accordingly, this video was made on request of comparing nested closures with dispatch group. Hope it helps plz feel free to ask questions I will be happy to answer them 😊