Lazy initialize object with Proxy Pattern
Sometimes, you want to lazy intialize an object such as websocket to make it’s only connected when needed, (virtual) proxy pattern can help.
Instead of initializing directly:
Using the Proxy:
Sometimes, you want to lazy intialize an object such as websocket to make it’s only connected when needed, (virtual) proxy pattern can help.
Instead of initializing directly:
Using the Proxy: