Grouping data in a class that works on a similar object but as they don't depend upon each other they are static
What were the reasons to go this approach
The article is simply demonstrating how one can use the objectbox to work with a local persistent database. I do agree that I should have gone with a singleton pattern to create a Store instance or should have added a note for that. Just did now after seeing your comment.
Ah, I get what you meant with static methods. Yeah, they don't need to be static considering the store and box variable is being repeatedly used, it can be moved to a class-level variable.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Grouping data in a class that works on a similar object but as they don't depend upon each other they are static
The article is simply demonstrating how one can use the objectbox to work with a local persistent database. I do agree that I should have gone with a singleton pattern to create a
Store
instance or should have added a note for that. Just did now after seeing your comment.Ah, I get what you meant with static methods. Yeah, they don't need to be static considering the store and box variable is being repeatedly used, it can be moved to a class-level variable.