DEV Community

Discussion on: Introducing: Timecard

Collapse
 
craigmc08 profile image
Craig McIlwrath

Personally, I don't really see the difference between global variables and static classes for storing the state.

But, the size of this project means trying to engineer a more robust solution would probably be overkill, and if you like working with static classes the best, that's the right choice.

Great job with this 👍

Collapse
 
codemouse92 profile image
Jason C. McDonald

You're correct that there isn't a huge difference. I think the main difference is that, with global instances of objects, you have to worry about checking if they're None throughout most of the code. Static classes don't have that worry (as long as you architect that code right).