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.
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
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!
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.
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.
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
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
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. 🧐
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.
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
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.
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
Very beneficial, I know transaction previously but I forgot to use it in some app, the performance has extremely improved, Thanks.
You can also use transaction scope as well
Hey Philipp, i just got your course on testing, thanks for the great content
Happy learning!🙌
I've been following your videos for a long time and I love them all. Thank you
By far the best Android information on RUclips 🙂
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!
Thanks for making our life easier with your mentorship .
Happy Teacher's day Philip 😊
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.
Unfortunately your testing course is so expensive for the people who live in Egypt
Same in India also.
Thanks Philipp! Keep up the good work
Thanks!
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.
good example, to know and understand it requires skills from databases, +1, start to do like that
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
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
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. 🧐
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.
Very Useful Tip
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
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 ?
We need a new vedeo about dagger/hilt ksp migration
Coming
Based on documentation, dagger and hilt are not yet suppressed. Maybe their is a workaround
@@mahmoudabdallah7120 dagger 2.48 has alpha ksp support
Hello brother, I joined Discord but cannot communicate on the channel. Can you tell me why
خیلی عالی بود ❤
Goat
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
Yes, the concept is the same :)
Great !! Your automated test course is amazing I will recommend my friend they enrolled he very happy with that!
❤❤❤
Happy learning!🙌
Can anyone tell me is this new version of Android studio?the UI seems different
they introduced a new experimental ui in the latest version , you can still use the old one
How can I use the new one shown in video?
@@tusharbhatia6777 settings -> New UI
Settings -> Appearance & Behaviour -> New UI
Thanks
Im a simple man
I see dont make this mistake
I click
More clickbaity thumbnail and title. Please
Get ready for the next one 😎