Don't Make THIS Mistake With Room & Databases on Android

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

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

  • @efeegbevwie9467
    @efeegbevwie9467 ปีที่แล้ว +20

    Very important video.
    Also, Instead of doing a loop and calling your Dao function multiple times, If you have your Dao function that takes a List in an insert operation, I believe room will automatically run this insert in a transaction.

  • @Akshaykumar-xr9yj
    @Akshaykumar-xr9yj ปีที่แล้ว +4

    I was also wondering about same problem while working with databases. But I ignored it becuase probablity of getting such problem is way less but it might happen. This video really helped me. Thank you

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

    You can also use transaction scope as well

  • @hesham4744
    @hesham4744 ปีที่แล้ว

    oh my god , believe it or not i just faced this problem and was confessed what was the issue and now i found you talking about it , thanks so much , keep up the great work!

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

    Happy Teacher's day Philip 😊

  • @abada-s
    @abada-s ปีที่แล้ว

    Very beneficial, I know transaction previously but I forgot to use it in some app, the performance has extremely improved, Thanks.

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

    Hey Philipp, i just got your course on testing, thanks for the great content

  • @SiamakAshrafi
    @SiamakAshrafi ปีที่แล้ว

    By far the best Android information on TH-cam 🙂

  • @monjuremowla8361
    @monjuremowla8361 ปีที่แล้ว

    Thanks for making our life easier with your mentorship .

  • @geanbrandao4987
    @geanbrandao4987 ปีที่แล้ว

    I've been following your videos for a long time and I love them all. Thank you

  • @abacaabaca8131
    @abacaabaca8131 ปีที่แล้ว

    I think i have to learn more about how android handle user input and what is the state it currently in first.
    I think i need to take a look on ViewModel and View Binding first, because in Android, the state is unidirectional.
    And maybe create a second background thread.
    Because usually my program just printed out something into the console.
    But when I have to handle user input, it's different kind of story.
    For example, if the user enter an invalid input, i need to create a loop that points to the first state so it won't crash.
    With a combination of while loop and finite state machine i was able to do that, but now in android, in what type of interface I need to implement and at what method i should override.

  • @hossamqandel5638
    @hossamqandel5638 ปีที่แล้ว +4

    Unfortunately your testing course is so expensive for the people who live in Egypt

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

    Is @Transaction annotation works outside of DAO?
    Here you combine two inserts (Event and Attendees) in EvenDao and it is look like broke single responsibility pronciple.
    If @Transaction works on other level it is better to move this to usecase/repository/interactor level to be Dao related only one entity

    • @coalacorey
      @coalacorey ปีที่แล้ว

      I'd love an answer to that as well. The documentation says "Marks a method in a Dao class as a transaction method" about @Transaction. I've annotated several methods in my repository with the annotation and now I'm not sure if it is doing what I expect it to do. 🧐

  • @DeceptiveRealities
    @DeceptiveRealities 10 หลายเดือนก่อน

    This is all well and good, but what is not covered is that you need to decide what to do if the transaction does fail. You can't just leave it ignored. If you are pulling the data from some outside source then you would need to ask the source to resend you the information that is now missing because the transaction failed. There is far more to this than this otherwise excellent video addresses.

  • @michaelk7942
    @michaelk7942 ปีที่แล้ว

    Thanks Philipp! Keep up the good work

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

    Hello Philip, would you consider selling the course prices more affordable in countries like turkey as steam does? I want to take your courses but as a student it is quite difficult for me to afford.

  • @vibovitold
    @vibovitold ปีที่แล้ว

    Performing the operation within the viewModelScope is already a code smell. Why would a DB operation be tied to the life scope of a certain screen? If some data is supposed to be persisted, we shouldn't rely on the screen being alive for it to complete

  • @ghZTrikz
    @ghZTrikz ปีที่แล้ว

    good example, to know and understand it requires skills from databases, +1, start to do like that

  • @manshalkhatri9289
    @manshalkhatri9289 ปีที่แล้ว

    Very Useful Tip

  • @germenwong
    @germenwong ปีที่แล้ว

    Hello brother, I joined Discord but cannot communicate on the channel. Can you tell me why

  • @glooglee4386
    @glooglee4386 5 หลายเดือนก่อน

    guys i need to learn multiple table database relations that use foreign key, do you guys have reccomendations for a tutorial that i can learns ?

  • @mohammadalighezelbashyan3446
    @mohammadalighezelbashyan3446 ปีที่แล้ว

    خیلی عالی بود ❤

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

    We need a new vedeo about dagger/hilt ksp migration

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

      Coming

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

      Based on documentation, dagger and hilt are not yet suppressed. Maybe their is a workaround

    • @hamzagattal7802
      @hamzagattal7802 ปีที่แล้ว

      @@mahmoudabdallah7120 dagger 2.48 has alpha ksp support

  • @tuhinbhowmick8424
    @tuhinbhowmick8424 ปีที่แล้ว

    Wht if the transactions are paired up with embedded objects and relations , we can then directly create a event with attendees and its too throw an error if @Transaction is not provided

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

    I think Philipp can read my mind: he always releases videos on Android development challenges right when I'm trying to solve them in my head

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

    Goat

  • @tusharbhatia6777
    @tusharbhatia6777 ปีที่แล้ว

    Can anyone tell me is this new version of Android studio?the UI seems different

    • @bruhisbruh000
      @bruhisbruh000 ปีที่แล้ว

      they introduced a new experimental ui in the latest version , you can still use the old one

    • @tusharbhatia6777
      @tusharbhatia6777 ปีที่แล้ว

      How can I use the new one shown in video?

    • @lukalukovic5082
      @lukalukovic5082 ปีที่แล้ว

      @@tusharbhatia6777 settings -> New UI

    • @nz-andrey
      @nz-andrey ปีที่แล้ว +3

      Settings -> Appearance & Behaviour -> New UI

    • @tusharbhatia6777
      @tusharbhatia6777 ปีที่แล้ว

      Thanks

  • @hrc2514
    @hrc2514 ปีที่แล้ว

    Great !! Your automated test course is amazing I will recommend my friend they enrolled he very happy with that!
    ❤❤❤

  • @TheTuxtrons
    @TheTuxtrons ปีที่แล้ว

    Im a simple man
    I see dont make this mistake
    I click

  • @NaVarioneq
    @NaVarioneq ปีที่แล้ว

    More clickbaity thumbnail and title. Please