You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A typical Porter factory might load many providers to support all use cases of an application, even though only a smaller subset may actually be used during one execution life-cycle. Therefore we would like a mechanism to lazy-load registered providers only when they are required.
One such mechanism may be a factory interface that looks similar to the following.
I think we should not do this because it is trying to solve a problem inside Porter that exists outside of Porter.
Instead of creating one Porter factory that registers all providers, consider creating many Porter instances that load different sets of providers. If all instances of Porter must still be configured the same way, implement the prototype pattern.
A typical Porter factory might load many providers to support all use cases of an application, even though only a smaller subset may actually be used during one execution life-cycle. Therefore we would like a mechanism to lazy-load registered providers only when they are required.
One such mechanism may be a factory interface that looks similar to the following.
The text was updated successfully, but these errors were encountered: