You should always create a class as if it were used in a non-static environment.
Then you can use it as a Singleton with a lazy instantiation. Or even as an instance of the Static class. Or even as a standalone instance of an object. You later decide what to do with it.
If you start by declaring all members to be static, you basically just cover a bunch of global variables inside an illustrious namespace known as a class. You also statically allocate the memory used by this class, even if you do not call it or use it in your code.
So, just write as a class, then you decide what to do with it. Static / Non-Static. Singleton / Instance. Factory Sample or not. Allocator X / DLL memory is linked or something else.
The only exception is the static members used for accounting with respect to instances of objects; things like reference counting, caches and the like. This is a good thing about static / non-static, you can mix and match some smart actions.
What if later you need another request? Or what happens if you can create multiple ones because you are in a multi-threaded environment? Things will become really strange once you go this route with static.
Rui
source share