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

Поделиться
HTML-код
  • Опубликовано: 27 ноя 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

  • @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.

  • @amiralichangizi1611
    @amiralichangizi1611 Год назад +2

    You can also use transaction scope as well

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

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

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

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

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

    By far the best Android information on RUclips 🙂

  • @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!

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

    Thanks for making our life easier with your mentorship .

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

    Happy Teacher's day Philip 😊

  • @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

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

    Thanks Philipp! Keep up the good work

  • @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.

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

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

  • @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

  • @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. 🧐

  • @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.

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

    Very Useful Tip

  • @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

  • @glooglee4386
    @glooglee4386 6 месяцев назад

    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 ?

  • @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

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

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

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

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

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

    Goat

  • @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

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

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

  • @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

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

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

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

    More clickbaity thumbnail and title. Please