Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should the Configurator be singleton? #3

Open
onmyway133 opened this issue Dec 15, 2015 · 2 comments
Open

Should the Configurator be singleton? #3

onmyway133 opened this issue Dec 15, 2015 · 2 comments

Comments

@onmyway133
Copy link

Like in https://github.com/Clean-Swift/CleanStore/blob/master/CleanStore/Scenes/ListOrders/ListOrdersConfigurator.swift

You said that "There should be only one configurator for each scene, and the connection setup code should run once and only once" (http://clean-swift.com/clean-swift-ios-architecture/)

Why not let it be instance? Just create it (or DI) and let it do the job?

@basememara
Copy link

+1 for DI, but no singletons pls.. let's keep it clean ;)

@basememara
Copy link

I wonder if we can build a DI mechanism into Clean Swift like this:
https://github.com/orakaro/Pure-Swift-Dependency-Injection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants