Serial API call in Swift Hindi tutorial | Operation queue | grand central dispatch

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

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

  • @User42023
    @User42023 3 года назад +22

    Ravi bhai why God has not created more people like you?
    Because of You I have 3 job offers in my hand in top US companies. Man I would want to meet you some day

    • @pratikgupta7373
      @pratikgupta7373 3 года назад +4

      Yes he is great in explaining complex topics in simple ways

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

      Congratulations buddy on the job offers and I am happy that the channel was helpful and part of your success journey. Wishing you all the best and lot of success in the coming days 👍

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

      Thank you Pratik 😊

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

      How do approach companies outside india.? I tried sending/applying for posts in different countries like germany, swizz, australia. But not even getting a single interview. If you have some tips, please share.

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

      Let's get the first rule clear because this has been asked by many developers recently, the first rule is
      You simply CANNOT just apply for a job without having a valid work VISA for that country on your passport, once you have a valid work visa only then you should think about applying outside.
      Even if some outside company was interested in you in the interview or email the very first thing they will ask is about your work visa status and if you don't have it they are not going to entertain you.
      You can surely try your luck though because who knows, some company do all the interview and then they may even sponsor your visa so do keep trying but the chances are very thin here but I encourage you to try if you don't try you don't get is what the saying goes.
      VISA stampings are pretty expensive and not only that, before you plan which country you want to go in, you need to calculate your monthly, weekly and daily expenses and plan accordingly and hence it's a wise move if you go via your company and for that, you need to work hard and be the best performer every single day.
      Plus if you are going through your company then you don't get to decide which country you want to go to it's not something we can choose, say you want to go to England but the company has its branch in Singapore then my friend you are going to Singapore. I hope this was helpful.

  • @MrFauad
    @MrFauad 11 месяцев назад +2

    Good luck for nested closure 🤣🤣. I really like your comments cause many times I wanted to say something similar to my team members who say "itna mat socho".

    • @CodeCat15
      @CodeCat15  10 месяцев назад +1

      sochna padta hai agar code clean chaiye aur maintenance k time headache se bachna hai to ye sab sochna padega

    • @SaimIrfan-zn5ru
      @SaimIrfan-zn5ru 9 месяцев назад

      @@CodeCat15 I would love to work as your junior bohot kuch seekhne ko milega

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

    Ravi Bhai and his sarcasm. Makes everything intuitive 😂

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

      just trying to keep the mood light 😁

  • @MandeepSingh-ly3jj
    @MandeepSingh-ly3jj 3 года назад +4

    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. :)))

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

      That’s very nice of you to say but I’ll say it again Mandeep it was your hardwork and passion that got you selected and I just happen to play a small role in your success journey. I am happy for you and this is just the beginning there’s more success waiting for you so do work hard, write test cases and clean code and always think n compare before you code.

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

    Its nice to hear some light sarcasm in the middle while discussing different approaches. !! :D

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

      hahaha well creative developers have really helped me to be a better programmer I used to work in maintenance and oh boy the kind of epic solutions I have seen is crazy

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

    A video full with Logic, every word is gold. Thank you Ravi Sir for being so awesome.

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

      Thank you for the kind words Anil

  • @amaissheikh8812
    @amaissheikh8812 3 года назад +4

    I remember when I kept using nested closures for serial apis and how horrible it seems now. I've got a lot of information from your channel, very much appreciated. Keep it up bro!

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

      nested closure do the job but then we should always aim for code readability and maintainability these two aspects should never be compromised in programming.

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

    there’s a reason why this channel is growing and becoming more and more popular among iOS community. Great work Ravi this is the most common situation we all face and you explained it well specially the semaphore part and why one should avoid it.

  • @RahulKumar-hr2gq
    @RahulKumar-hr2gq 3 года назад +1

    Hello Ravi Bhai, Aap ka explain karne ka tariqa bahut sahi hai aur aap ise aise hi banaye rakhna, Is channel ke through mere bahut se Doubt clear ho gaye hai, please keep it up and thnx bro for doing such kind of help.
    :)

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

      Welcome to the channel Rahul, and thank you for your kind words, koi aur doubt raha to usse zaroor puchna :)

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

    Thanks Ravi for creating such kind of good stuff. I am big fan of your presentation style. I was using nested clousure for such kind of situation.
    Thanks Again!!!

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

      Glad this video was helpful, the next video is going to even surprise you on how we can manage writing clean code without callback hell coz even if you look now with operation queue and dispatch group there’s a ton of code to manage and not to mention if we have to call 3-4 apis back to back then even this code can get messy. In my opinion one should never get to call 2 apis unless they are doing some token based auth.
      One thing i forgot to mention in this video was the wait function of semaphore works differently as compared to the wait function of dispatch group

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

      @@CodeCat15 I am eagerly waiting for your new video. and I am confused when to use semaphore instead of dispatch group? So could you please explain me ?

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

    Your channel is very informative. Thanks mann 😊

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

      Thank you Keertika 😊

  • @unseenSky
    @unseenSky 3 года назад +3

    I am using Dispatch group from the initial stage of my career, i am very curious to learn something new in iOS.
    Thanks for your video, to compare all possibilities.

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

      Glad the video was helpful Somendra, plz feel free to ask questions on the topic and do share the video with your iOS group.

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

      definitely i'll ask you and will share your video

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

    Hey Ravi, great work man! I have faced this situation before and I used function for make it more readable instead of nested 😊.

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

      That’s great Ilesh 👍

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

    Great work bro 😎 Thanks 🙏 . Your videos help me alots

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

      I am glad they are helpful, please feel free to ask questions and do share the channel with your iOS group

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

    This is an eye opener for me to handle api dependency and sequences. And yeah Ravi, we should conduct a meet up sometime. Chai pe charcha

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

      I am all game to talk more on programming and clean coding principles anytime.

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

    good work

  • @rajanmaheshwari
    @rajanmaheshwari 3 года назад +3

    Adding to this, it can also be done using a serial queue and dispatch group. However, OQ provides a little better readability but using a serial queue reduces a little code. The thing I used serial queue here coz at the end we are actually deciding manually in which closure DispatchGroup needs to wait and yes it does wait synchronously till the previous work is done.

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

      Correct Rajan, one should always prefer readability and using the highest level of abstraction if possible.

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

    Waiting for the next video :)

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

    Hi Ravi, new subscriber of yours. Loved your presentation style. I was hoping to start a channel with similar content when my brother directed me to your channel. Great work. Wish you the best.

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

    Hi Ravi your work is simply amazing and I have one request like can you create a video on Git and Github in detail and How a experience developer can maintain their project with their team. Please Explain it like Branch, Stash, Conflicts and merge etc... Best of your industry experience. A proper Version control management in ios developement.

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

    RESPECT++ RAVI :)

  • @anantdesai3293
    @anantdesai3293 Год назад

    Hey Ravi, hope you are doing well. I guess in last approach (Dispatch Queue + Operation Queue) you forgot to remove dependency, because you are using group.wait(). So if you are using group.wait() method, then addDependency() method is not required. Let me know if I am wrong. Thanks for this nice informative video.

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

    Hi Ravi. Great Videos. can we do this with only dispatchGroup (as we can use the wait() function which is what is making us wait for the response and so our output is now printing in the order we want) and not operation queue or block operation ?

    • @CodeCat15
      @CodeCat15  Год назад

      You could but then concurrent operation never complete in the order in which they start, so maybe it works in order on your machine but the order could be disrupted totally if you run it in a single core machine or some other machine.

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

    i love you man 😄

  • @rameshK-yx8nz
    @rameshK-yx8nz 3 года назад +1

    Using completion handlers we can handle these kind of scenarios or Call the second api in the successful response of the first api.

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

      Good question Ramesh, I have made a video on nested closure vs dispatch group where I am displaying the performance difference so that video may answer your question in detail and if not then please ask more questions
      Link: ruclips.net/video/HucU2jBQffc/видео.html

    • @rameshK-yx8nz
      @rameshK-yx8nz 3 года назад

      @@CodeCat15 thanks

    • @rameshK-yx8nz
      @rameshK-yx8nz 3 года назад

      @@CodeCat15 one doubt, according to data structures linked list are better than arrays but why everyone prefers using arrays ? Is it just because arrays are easy to understand and implement? And also people don't prefer to use trees and graph concepts in iOS app.

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

    Hi Ravi Sir ,
    explanation is very good and informative and always I am watching your videos for swift concepts . I am new to iOS development so what are the best resources and programming best way to write code in iOS I am able to understand code but could able to write code . Can you please guide me on this

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

      We all are learners here, and I think the best way to learn to code is first take a pen and paper and write break down the steps that you want your code to achieve and then work on those steps one by one, you see its a process and it takes time and worst thing is its a slow process filled with frustration but have patience and learn from your mistakes, because only if you learn from your mistakes you will be able to adapt and be better next time.

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

    Can we use Serial async 12:26 ?

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

    Ravi can you provide the link of video where you explained PARAMETER BASED DEPENDENCY

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

      Please reply ASAP bro it’s urgent

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

    Please make a video on how to solve parameter based dependencies.

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

      there's a video on dependency injections in the channel, have you seen that also can you provide more context on this like if you have any specific scenario in mind that would be help me to cover more grounds in the video
      Dependency video link: ruclips.net/video/C3eJwwCV_yI/видео.html

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

    how can we convert async request to sync request.

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

      Can you provide more context to it please

  • @superNovaThere
    @superNovaThere 9 месяцев назад

    So what's the best way to solve this problem?

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

    Can you pls create simple OAUTH 2.0 login or suggest some simple 3rd party(I don't like either)

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

    Parameter based dependency is said to be explained in next part. Could not find where is that part. #CheersToCodeCat15

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

      I was about to make that video using async-await but unfortunately I discovered a bug in the beta version of swift 5.5 with that feature so had to drop the ball on that one, but I will make it using what we have available in the framework for now, this video could take time as my prime focus now these days is combine, maybe I will try to slide this in with combine