v0.5 NEW Release on April 2nd 2013
Silk DI
a lightweight
Java
Dependency Injection tool
With Silk your code is no longer cluttered by @annotations to guide the dependency injection.
Everything is described in external pure Java declarations provided through a fluent interface.
Show me some code
protected void bootstrap() {
install( Silk.class );
}
protected void declare() {
bind(Awesomeness.class).to(YourApp.class);
}
- Silk DI
- vs. Spring Ioc
- vs. Google Guice
- vs. Pico container
- Lightweight
- Pure Java
- Application code stays independent
- Says NO to magic and pain
- Sequence of declaration is irrelevant
- Pushes for constructor injection
- Injectrons
- Cross-functional programming
Silk allows DI without making your application depend on the DI framework!
100%
Independent
- Configuration by pure Java code
- Separated from your application code
- No further runtime dependencies
- No annotations in your code
Silk avoids techniques that are hard to understand, debug or maintain.
No "Magic"
- No XML
- No AOP
- No proxies
- No annotations
- No overrides
- No dependency cycles
- No accessible mutable state
- No code generation
Silk has all the features that often require additional libs in other frameworks.
Feature-Rich
Silk provides few concepts to configure an app in a predictable and maintainable way.
- Sequence of declarations is irrelevant
- Each part can be considered in isolation
- Simple predictable configuration concepts
- It is easy to remove what you don't like
- Fast bootstrap
Silk is designed for easy development where refactoring does not break an application.
Robust
- No importance to sequence of definition
- Safe renaming
- Largely Type-safe
- Excellent Unit-testability
- Pushes for immutability
- Data driven with Value Objects
- A configuration never changes at runtime