• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
GuiceCon 2011 - Sisu
 

GuiceCon 2011 - Sisu

on

  • 1,897 views

Overview of the Sisu container, which builds on Guice 3, and possible future ideas / features.

Overview of the Sisu container, which builds on Guice 3, and possible future ideas / features.

Statistics

Views

Total Views
1,897
Views on SlideShare
1,892
Embed Views
5

Actions

Likes
0
Downloads
17
Comments
0

3 Embeds 5

http://twitter.com 2
http://www.linkedin.com 2
https://twitter.com 1

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

GuiceCon 2011 - Sisu GuiceCon 2011 - Sisu Presentation Transcript

  • Sisuhttps://github.com/sonatype/sisu
  • Sisu Finnish for Perseverance JSR 330+ Plugins Shims Wouldn’t It Be Nice If...
  • sisu-inject-bean <dependency> <groupId>org.sonatype.sisu</groupId> <artifactId>sisu-inject-bean</artifactId> <version>2.2.0</version> </dependency> Guice Extension Compatible with Guice 3 OSGi Bundle Only 235k :)
  • JSR 330+ @Named( "hint" ) @EagerSingleton class SomeComponent { @Named } @Typed( SomeType.class ) class AnotherComponent { }@InjectList<Component> componentList; @Inject Map<String, Component> componentMap; @Inject @Named( "${dbdriver}://${dbhost}:${dbport:-5432}/${dbname}" ) URL databaseURL;
  • PluginsInjector per-pluginBean Locator Aggregates injectors Sorts bindings by rankNon-local dependencies bound via Locator
  • maven-core (Plexus) BeanLocatormaven-compiler-plugin maven-jar-plugin maven-install-plugin
  • Wire Module Leans heavily on Guice SPI Finds and Binds missing dependencies new WireModule( new SpaceModule... ) Can be re-used! Extend + Override wiring method
  • Space Module Based on Class Space abstraction Scans classes for @Named components Supports caching and indexing Can be re-used! Extend + Override visitor method
  • Ranked Bindings Sorts using Rank + UID Supports concurrent iteration+mutation Re-positions iterator as necessary Sources of bindings are also ranked Lazy lookup, unrolling as necessary
  • Shims Maven3 + Plexus Both <XML/> and @Component Nexus Plugins Hudson + SezPoz ... Mix and Match!
  • Basic Shim Approach Map bindings to canonical form (Guice) Cache additional metadata Use Type Listeners: Custom injection Custom Lifecycle (be careful of dependency cycles!)
  • Wouldn’t It Be Nice If ... Lifecycle Support IDE Support Component Catalogue ...?