force_it 0.1.0 force_it: ^0.1.0 copied to clipboard
A modern dependency injection like java spring package
Force IT #
Part of the Dart Force Framework.
A library to do dependency injection! It uses the same annotations as in java spring applications.
Walkthrough
To bootstrap your injections call
ApplicationContext.bootstrap();
To configure your classes make a configuration class
@Config()
class SomeConfig {
@Bean()
Counter counter() {
return new Counter();
}
@Bean()
Calc calc() {
return new Calc();
}
}
When you want to access an instance you can call
ApplicationContext.getBean("counter");
You can also define Components by using the @Component annotation
TODO
- add Qualifier annotation
- add Value annotation
Notes to Contributors #
Fork R2D2
If you'd like to contribute back to the core, you can fork this repository and send us a pull request, when it is ready.
If you are new to Git or GitHub, please read this guide first.
Dart Force
Realtime web framework for dart that uses forcemvc & forcemirrors source code
Follow us on twitter https://twitter.com/usethedartforce
Google+
Follow us on google+