Open muxiangqiu opened 3 years ago
@muxiangqiu unfortunately I'm not sure about updating the way dependency injection works in the system for a couple of reasons:
inversify
does not (the simplification can be debatable).For these reasons I do not believe moving away from inversify is necessary, or should be a high priority.
@vince-fugnitto Thank you for your prompt reply.
The new writing method and Theia's existing writing method are compatible with each other and can coexist. However, it is not a high priority and must be done.
Theia is a project with excellent architecture, such as extensions, IoC, dynamic module assembly, front-end integration, and so on. A lot of inspiration for the Serverless First application development framework Malagu I designed comes from Theia. Malagu made further innovations in some of Theia's ideas. For example, drawing on the design of Spring, dependency injection has been greatly simplified. As follows:
Just import the module that needs to be injected in the module entry file, the code is as follows:
If you need to rebind the default implementation, the code is as follows:
Based on Malagu + Theia, I also made another open source project Cellbang, the demo address is as follows: https://cloud.cellbang.com/.
I wonder if Theia can support similar dependency injection configuration simplification?