Architecture: The UI layer - MAD Skills

Поділитися
Вставка
  • Опубліковано 30 вер 2024

КОМЕНТАРІ • 65

  • @Leeteor
    @Leeteor Рік тому +21

    After watching about 2 hours of videos, yours is the one that finally makes me understand the purpose of ViewModel. Thanks!

  • @miguelol
    @miguelol Рік тому +6

    Great video! Nice Kurzgesagt easter-egg by the way!

  • @RickertBrandsen
    @RickertBrandsen 2 роки тому +9

    Rocking the kurzgesagt shirt :D

  • @angelernesto80
    @angelernesto80 2 роки тому +4

    another fan of Kurzgesagt! ❤️😄😄👏👏👏

  • @Narazgul
    @Narazgul Рік тому +2

    Nobody noticing the Kurzgesagt Merch? Ten points for Gryffindor, my friend! :D

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

      what does Kurzgesagt have to do with Harry Potter?

  • @nuculabs
    @nuculabs 10 місяців тому +3

    I was confused by View and ViewModel and Model but now it's so nicely explained that I can say that I finally get it, thank you!

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

    Tj's speaks so lovely. Thanks for this tip Cheers :D

  • @brianquigley1940
    @brianquigley1940 5 місяців тому +1

    Am I the only person who had to turn on captions? This guy has a lovely sounding voice, but I - me, personally! - had trouble with some of his pronunciation... e.g. I had never heard of Jetmuse (i.e. Jet News). NEVERTHELESS, it is a great video with a very clear explanation. Nice.

  • @Warlax
    @Warlax 2 роки тому +15

    Great series. Will you guys cover the Domain layer?

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

      Yes! It's coming soon :)

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

      It's here :) ua-cam.com/video/gIhjCh3U88I/v-deo.html

  • @12nileyfan
    @12nileyfan Рік тому +3

    Thanks for these series of videos. they are indeed very useful to understand all the concepts in App Architecture.

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

    You should also talk about navigation at some point ...

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

    As someone who is trying to learn Android Development, this is too over my head. It needs to be broken down more. After watching this, I still do not know what a UIState is.

  • @paulndibe250
    @paulndibe250 2 роки тому +11

    Nice, I hope there will be a code lab for after this series

  • @도시들깨
    @도시들깨 Рік тому +1

    Oh!!!!! I Really Understand!!!

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

    Those architecture videos are very interesting! Thanks!

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

    Domain Layer. When?

  • @brianquigley1940
    @brianquigley1940 5 місяців тому

    When did "consume" become a synonym for "reads"? (e.g. consumes the new UI state.) Or "observable" and "exposed" for "API"? (e.g. exposed in an observable data holder.) Man, programming "terminology" evolves quicker than new programming languages!

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

    This is all well and fine with simple examples. But what if the UI state is more complex, for example with lists of objects containing other lists or even maps. Managing this with immutable data classes results in rather complex nested .copy() operations. What would be a best practice to break this up?

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

      If you do the threading right, you won't have any negative impact on the performance. When you have a complex UI state, the complexity should be moved over to the domain layer (or even data layer) and you should be exposing multiple data sources to the ViewModel and just collect them as needed. However, you should be able to figure out the minor tweaks you need to do in order to match your own requirements and make your UI state more manageable.
      I would say that they just want to emphasize, through these simple examples, what is the best approach to make your app bulletproof and bug-free considering the platform limitations. If you ever encountered an Android app codebase that did not have an architectural rules and the state was managed everywhere across the codebase, you probably had lots of subtle issues that were not that easy to reproduce and that is something they are trying to help us with.

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

      @@martinmihalic8612 Thanks, your response got me thinking. I may not yet fully embrace the role of my ViewModel classes. Perhaps I'm enforcing too much of the domain relations onto the ViewModel classes.

  • @mirianfonkam
    @mirianfonkam Рік тому +1

    Wait, which Ed Sheeran song? 😂

  • @danielSafonyan
    @danielSafonyan 11 місяців тому +1

    Best lecturer so far, thank you!

  • @nima7605
    @nima7605 Рік тому +1

    Thx for the great explanation.

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

    Would you please add subtitles in future videos?

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

    Isn't it wrong to call an activity an UI object?isnt it a controller and more akin to a main function. It's more of a has UI than is UI.

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

      It's considered UI as its only purpose should be to display state accordingly, not manage it (which is a fundamental root cause to Android app performance, and state management issues [multiple source of truths]).
      Your "main function" in Android is actually your Application class, not Activities.
      Retrieving and transforming state for display should be delegated to state holders. Resist the temptation to operate on data in your Activities and Fragments. The most you should do, is use it as common source (if you hoist state), to pass down callbacks from your state holders.
      If you need Context, look to your Application Context.
      These updated series of videos and documentation explains it all very well. Adopting UDF principles has been the direction the Android team has been heading since they took a stance on Architecture back when they launched Architecture components.

  • @mubaraknative
    @mubaraknative 9 місяців тому

    Ividiyo enolwazi kakhulu evela kusayithi lonjiniyela

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

    great series , keep it up , follow you from Sudan

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

    Very nice episode, short with all the important info.

  • @erinwolf1563
    @erinwolf1563 3 місяці тому

    Love the Edsheeran U.N.I part hehe 🥰

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

    🇨🇴🙋🏻‍♂️👍🏼🤝🏼 Saludos desde Colombia

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

    I see a Kurzgesagt fan here 😆

  • @AndresMedina-n6h
    @AndresMedina-n6h Рік тому

    What others state holders exists, aside of viewModels?

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

    mannn i keep focusing on the pyramid up there!!!

  • @rizriz4247
    @rizriz4247 2 роки тому +7

    Is that a kurzgesagt shirt?

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

      And a kurzgesagt duck

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

      Haha, it is!

  • @heshansandeepa9471
    @heshansandeepa9471 5 місяців тому

    awesome

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

    Just a quastion, why you're using FlowState instead of ComposeState??

  • @michaelappiah-kubi2829
    @michaelappiah-kubi2829 Рік тому

    Finally got this flow, thanks

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

    Nice points. Thanks.

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

    Nice Kurzgesagt shirt

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

    Greeat!!! Thanks

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

    Great TJ

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

    nice

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

    Who's Ed Sheeran?

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

    I think the better practice is should replace StateFlow by LiveData, because the StateFlow doesn't keep the last value of state or IU data like LiveData

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

      You're wrong, StateFlow keep last value of data, StateFlow is very similar with SharedFlow(replies=1)

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

      @@sysadm85 sorry, i think there is my mistake. When restart fragment, the state flow will be initialized again, it will not keep the previous data. Anyway, it will be re-updated when re-fetching data and being observed inside lifecycle scope block.

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

    Great video! Looking forward to the next episode!

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

    1 st comment

  • @НадеждаБурова-ж5й
    @НадеждаБурова-ж5й 2 роки тому

    Боольшое спасибо автору,классное видео)

  • @АмелияФедосеева-ю6ч

    Спасибо автору,классно видео

  • @ПолинаСеменова-г7с

    Боольшое спасибо автору,классное видео)

  • @WaheedKhAn-mw8fo
    @WaheedKhAn-mw8fo 2 роки тому +1

    Awesome explanation waiting for the next episode.

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

    Yes Sir..ok very good info