Salta Dependency Injection Framework

 

Passes JSR330 (javax.inject) Technology Compatibility Kit (TCK)

FAMILIAR


To make things easy for developers, the configuration API of Salta was copied from Guice (without the SPI). The concepts of modules, bindings, JIT bindings and scopes was taken over as well. Thus, if you know Guice, the learning curve is very gentle.

The only truly new concept added is the Creation Rule, used to construct injection point specific instances.

FAST


Classpath scanning is slow for big applications. Salta helps to avoid it by providing fully customizable creation of just in time (JIT) bindings.

Care has been taken to make sure the order in which the JIT bindings are constructed can not affect the outcome. Otherwise, different runs of your program would lead to different objects beeing injected.

To instantiate objects fast, Salta relies heavily on bytecode generation, resulting in a speedup between 10x and 30x over Guice.

Bytecode generation does not lead to slow startup speed. Salta is consistently slightly faster than Guice.

FLEXIBLE


Salta has been designed from ground up to be flexible:

  • customize JIT bindings
  • customize injection points
  • no fixed annotations
  • injection point specific instances
  • custom scopes

The wiki contains more information about extending and customizing Salta.

Copyright © 2015 Salta Team. Design by TemplateGarden