-
Notifications
You must be signed in to change notification settings - Fork 268
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
"Injecting Typhoon Itself" not quite correct #303
Comments
Thanks for the comment. Will update. by the way, the only thing typhoon can really inject in this regard is the TyphoonComponentFactory. However using late binding messages from our assembly interfaces are handled, so it looks as though we have an activated assembly. We're going no to move the handful of methods from TyphoonComponentFactory that are useful at runtime onto the TyphoonAssembly interface. |
I noticed that |
Tell us about that? defaultFactory can be useful especially for integrating DI into a legacy app, but it's usually preferable to inject the assembly. |
Right — that's the thing. I want to integrate Typhoon into a legacy app. I thought the first thing to replace was going to be my use of singletons (probably not the best idea actually) and so I went ahead and tried.
I think it's only possible through the |
Wow. Okay. I just realised all that writing, and all I was missing was the As much of a hack as it is, I think it's worth documenting! |
(facepalm) Documentation for that actually get removed during recent overhaul. Will put back. |
@jasperblues fantastic. xD |
@fatuhoku Docs corrected, please review and close or comment. |
Typhoon is the name of the framework. By saying "Typhoon can inject itself", readers end up confused: how can a DI framework inject a DI framework into code?
https://github.com/appsquickly/Typhoon/wiki/What%20can%20be%20Injected#injecting-typhoon-itself
Instead, it should be made clear that the DI framework is able to inject Typhoon ASSEMBLIES (or
ComponentFactory
s but I think there are plans to make that private soon).The text was updated successfully, but these errors were encountered: