Protocol Oriented Programming (Swift 5) MVVM & Unit Test

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

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

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

    I used to do unit testing before; I haven't had the chance with recent employers. Tomorrow I have a case study to send for a job interview and this helped me a lot to remember everything. All simple and nicely done. Thanks Kelvin.

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

    Dude!! YOU ARE AWESOME, I was looking from long time for such explanation and you Nailed it. Bro plz keep up the good work and plz keep sharing such information, it's very helpful for developer like me. I will be grateful Bro, if in coming days you can cover few more crucial topics like:
    1. combine instead of Result type
    2. CI/CD
    3. Git process what developers do in real companies like, taking a pull, creating a separate branch, sending a code for Pull Request to team lead and then fix conflicts and then merge to main branch
    4. async/ await in Swift
    THANKS A TON BRO for such informational videos.

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

      Hey Imagine, Kelvin already has created a video on Combine and async await. check his video listing.
      But Kelvin an informative video from you on CI/CD & Git pull Push branch merge process could be very helpful for community. Like which can help letting us know how the process is followed in a company. Thanks 🍻

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

    Great video, really helpful in how to tie two different concepts that go hand in hand - How using design patterns help make your code more testable. My only point of discussion is if this is closer to MVP than MVVM as in MVVM, the VM usually doesn't have a reference to the view or an abstraction of the view where as with MVP it does. The VM usually binds to the View using closures or RXSwift or Combine, however these are just technicalities. Wonderful video none the less and helped me.

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

    Good video Kevin !!. not many could explain this concept as clearly as you did.

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

    Thanks Kelvin, this video helped me a lot

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

      Glad it helped! Subscribe for more!

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

    Good initiative and tutorial… would love to see more like 1) MVVM with actual XCode project 2) Custom/ Complex UI… thank you so much

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

    Thank you for the time and effort making this video. I learned a lot

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

    this was immensely helpful!!!!

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

      Glad it helped! Consider this then ruclips.net/video/o_mbaXYnU1M/видео.html

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

    Amazing Video!!! Thanks

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

    Hi Kevin.. wonderful 47 min I have spent on a MVVM tutorial. I just had one question, why didnt we need to use expectation when we are writing unit test case for fetchUser in this case, if you can explain. Anyway, keep up the good work!!

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

    Awesome material, thx for that

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

    Thanks for awesome video and effort

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

    4 minutes and I press like) predict nice video))

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

      Glad it helped!

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

      @@kelvinfok I am currently learning how to make viewController cleaner, and I just move code to another files and this is where delegation and protocols are helpful so we can use protocol types instead of particular class type) I will recommend your video to people who learn swift together with me)

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

    making a superb video. subscribed ✅

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

      Glad it helped! And welcome!

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

    思路很赞,有学习到。

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

    What is the realtion between UserViewcontroller and the File unit test when we change the default value to imageUrl when fail api, i still not understand this, i mean when we change 512 to 1024, file test get the change value , how can we archive this

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

    Hi kelvin, I am new to MVVM using POP and dependency Injection and trying to learn from your video, this is very helpful to me. I am getting error but couldn't find the solution. Error is "Fatal error: init(coder:) has not been implemented". Any help would be appreciated. Code is almost same as your tutorial but i am using storyboard. Please help.

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

      You won’t be able to do dependency injection when you init the view controller with the storyboard unfortunately. You can explore property injection via calling a function and passing in a protocol. But I would suggest not to use the story board.

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

    Hey Dood, I like to code in POP. This tutorial is awesome 😉with real time project. Can u do some pop videos in future like this ...

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

      Sure, I’ll add more to my list of future videos!

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

    Good one

  • @carringtonmanyuchi4985
    @carringtonmanyuchi4985 18 дней назад

    Still relevant

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

    Shouldn’t super.setup be on top since it’s in sequence?

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

      It should be at the top if there are no dependencies. Otherwise it should be at the bottom.

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

      @@kelvinfok Usually I see that the sequence of teardown is the reverse direction of setup, e.g. Setup super, A, B, Teardown B, A, super. Maybe I misunderstood something

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

    Test shouldn't request data from network. Instead Spy, or Stub would be better to test its behavior

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

    The tutorial was way too long

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

      Thanks for the feedback. I’ll try to do shorter videos.