DEV Community

[Comment from a deleted post]
Collapse
 
theimpulson profile image
Aayush Gupta

why you'd use those static "StoreHelpers"

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.

Collapse
 
theimpulson profile image
Aayush Gupta

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.