Android MVP - Part 1 (VIEW)

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ม.ค. 2025

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

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

    Finally, found this video after watching tonnes of lengthy videos which only depicted benefits of MVP without explaining how to actually implement it. Thanks Santos

    • @Renaro
      @Renaro  6 ปีที่แล้ว

      I am happy that it helped somehow =)

  • @samsquest1009
    @samsquest1009 7 ปีที่แล้ว +1

    The clearest explanation about android MVP architecture I've yet found on TH-cam. congrats ;)

    • @Renaro
      @Renaro  7 ปีที่แล้ว

      Thx sobhan. Glad you liked it.

  • @tooper
    @tooper 5 ปีที่แล้ว +1

    Congrats Renato, this help me to reduce the size of my Activity!

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

      Haha Valew Rafael!

  • @bgoncal
    @bgoncal 7 ปีที่แล้ว +1

    Amazing explanation, waiting for part 2

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

      Thanks Bruno!

  • @backsdevelopers9917
    @backsdevelopers9917 5 ปีที่แล้ว +1

    I watch many videos but i check never write code in presenter class. some writes in model or some create new extra class so can you tell me why not write login in presenter class?

    • @Renaro
      @Renaro  5 ปีที่แล้ว

      Hey, usually people say to do not put UI stuff(that uses android libraries) in the presenter so you could easily unit test it, using JUnit for example, otherwise you would have to write UI tests, and also because it makes the code cleaner to read.

  • @SociedadAndroide
    @SociedadAndroide 6 ปีที่แล้ว

    Love those images from uncle bob books :)

    • @Renaro
      @Renaro  6 ปีที่แล้ว

      haha also love it :)

    • @SociedadAndroide
      @SociedadAndroide 6 ปีที่แล้ว +1

      @@Renaro Thanks for this awesome project, I'm using it to understand mvp and maybe do some Spanish tutorials from it with another implementation :) , one question , did you writes the methods inside BasePresenter by hand ? Because since it does not extends nothing you can't override

  • @roni_c_castro
    @roni_c_castro 7 ปีที่แล้ว +1

    Hi Renaro. This method below can throws a NullPointerException, can't it? If so, you'd show a Toast with an error message in the view, right?
    In Activity:
    public void showNegativeVote() {
    mSwipeList.getTopCardListener().selectLeft();
    }
    In Adapter:
    public FlingCardListener getTopCardListener() throws NullPointerException {
    if(this.flingCardListener == null) {
    throw new NullPointerException();
    } else {
    return this.flingCardListener;
    }
    }

    • @Renaro
      @Renaro  7 ปีที่แล้ว

      Hi Roni, all exceptions caused by the 'view'(animations, adapters, scroll) should be handled in the VIEW, because it has Android Dependencies, you will only send those errors to the Presenter if it is related to the presenter rules, for example, you run out of cards and wants to show an empty state, this behavior should be handled by the presenter.

  • @ArchanaKumari-lf1kb
    @ArchanaKumari-lf1kb 7 ปีที่แล้ว +1

    nice video ,with clear explanation..............

    • @Renaro
      @Renaro  7 ปีที่แล้ว +2

      Thanks Archana, soon I will post the part 2

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

    THANK YOU

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

      Happy to read!

  • @OsmaelSousa
    @OsmaelSousa 7 ปีที่แล้ว +1

    Excelente explicação! Parabéns!

    • @Renaro
      @Renaro  7 ปีที่แล้ว

      Obrigado Osmael!

  • @papanoob8
    @papanoob8 7 ปีที่แล้ว +1

    Hi, is the MVP same with clean architecture from uncle bob?

    • @Renaro
      @Renaro  7 ปีที่แล้ว

      Yogie Putra Hi Yogie. I am a big fan of Uncle Bob, specially the Clean Code book. The MVP is a architecture, there are many ways to implement it, the concepts of Clean Code from Uncle Bob will guide how to code the Architecture. But yes, since I liked his book you will be familiar with some patterns he describes.

  • @robsonlirayou
    @robsonlirayou 7 ปีที่แล้ว +2

    Olá Renaro boa noite, muito bom vídeo vais continuar? eu estou tentando entender MVP, bem na verdade entendi que os meus códigos estão uma mistura danada de regras de negócio, obter dados etc.....

    • @Renaro
      @Renaro  7 ปีที่แล้ว +1

      E ai Robson, blz? Que bom que gostou. Vou continuar sim, ainda essa semana lanço a Parte 2. Baixa o projeto lá do Github e da uma olhada melhor.

    • @Renaro
      @Renaro  7 ปีที่แล้ว

      Abraços

  • @attilatoth1396
    @attilatoth1396 6 ปีที่แล้ว +1

    Thanks a lot!

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

      Thanks you!

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

    احسنت.🖒

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

      Thanks!

  • @bisujin1685
    @bisujin1685 7 ปีที่แล้ว +1

    channel subscribed, thx

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

      Thanks!