Joine Music

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Monday, 19 May 2008

The Future of Guice - BOF-6400

Posted on 06:11 by Unknown
DISCLAIMER:
These are the tidied up notes I took from the session at the JavaOne 2008 conference in San Francisco, California. There may well be mistakes and ommissions. I will come back and correct them once the conference has completed. However my first priority is to get the information published before the backlog gets too large and swamps me. All comments welcome. Enjoy!

"Crazy" Bob Lee, Kevin Bourrillion andJesse Wilson (of Glazed Lists fame)

Guice 1.0
- it was v. popular
- it recently won a jolt award
- there are two books already available

Philosophy
- back to basics
- @inject is the new "new" - it has the brevity of "new" but the flexibility of a factory
- Fail early but not too early (validate all your dependencies at startup.)
- Make it easy to do the right thing
- Types are the natural currency of Java - do everything with types (early versions were String based) which means that your existing IDE (without plugins) still work
- Prefer annotations to convention - i.e. it's not just a naming convention
- Singletons aren't bad, but the typical implementations are
- Focus on readability over writeability
- Maximise the power-to-weight ratio - the Guice API is very small. If you'll never use it, the API does not expose it. Thus it is simple to maintain compatibility between versions
- Balance - just because you can doesn't mean you should

Goals for 2.0
- Releive pain points - implementing custom factories (maintainability)
- Compatability with 1.0 -but we may break where you want us to, e.g. they forgot about inner nested classes
- Extensibility - 1.0 made it easy to build a "Guicy" app. Now it's easier to extend it
- Tool support - There was an Eclipse plugin developed last year by a Google intern. They will provide all the hooks a tool needs to have
- Shooting for a summer 2008 release

Guice 2.0 Core
- Mirror API - SPI for Guice. If you want deep integrations with Guice to extend it or to hook it into a third party tool. Deep access to what's going on in Guice
- Tool stage - a mechanism to create injectors for tools to use. Possible since Guice uses Java code to specify its injection but in a shallow way - it won't start your singletons etc.
- Binder.getProvider()- if your module needs a binding to another module. This is an API so your module can get at other dependencies in other modules
- Class/Constructor Listeners - if you build an arbitrarily complex system (EJB 3.0) you can use Guice as a hosting environment. You will be able to do all the cool APOO reflection without all the weight. Powerful way to write aspect code. Its not APO, but it allows you to get a handle on a newly created object befiore its returned from construction
- Multibindings - lets you bind the same type n times which allows Guice to do another job in your system
- Constant Type Converters - you can already take a file of properties; but unless your properties are booleans or integers etc. you inject Strings. now you can register a converter for e.g. HTML converters and inject actual colour objects from a properties file.
- @Nullable - Now you can inject null
- Enhanced Error Reporting - it was really really good. It's now even better
- Specified exception reporting - whatever you throw from provider.get() method is a ProviderException.
- Module Overrides - Someone else gives you a module which has a dependency which you don't want. Whenever it binds to this type, you can swap out the pieces you don't want

Provider Methods
- These are all tidied up now. Now they're all beautiful and terse

Hierarchical Injectors
- A building block for power features
- Private bindings
- capability based security a la
- Just think robot legs
- Struts 2 plugin
- Business Logic vs. View Layer - one injector for each, ensuring the injectors for one area don't pollute the namespace for the other

Beyond 2.0
- Compile-time Guice - if you hate reflection (i.e. Mobile and embedded ot GWT) then you can take a Guice module and compile it to code which you can use
- Third party extensions
- Warp
- Guiceberry - Useing Guice to inject unit, functional, and integration tests
- Peaberry OSGi
- Platform support
Email ThisBlogThis!Share to XShare to Facebook
Posted in guice javaone 2008 | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • EJB 3.0 Outside the Container, Inside the JVM - Part 2: Configuring JPA Declaratively
    Welcome to part two of this blog entry introducing using EJB3.0 inside the JVM. Click here to view the first part. As we've seen, JPA ...
  • (no title)
    The Significance and Importance of Quotes in JSTL EL I just spent a few hours debuggung a null pointer in a Portlet JSP I'm writing. It...
  • Project Wonderland BOF (BOF-1306) @ JavaOne 2007
    These are my notes which I took during the Project Wonderland BOF at JavaOne 2007. Enjoy. Paul Byrne - Lead of Wonderland What is project w...
  • Maven 1.0.2: Adding a resource to a jar
    Want to add a resource such as an xml config file to your generated jar in Maven 1.0.2? Create a directory called ./resources in the base di...
  • EJB 3.0: One Model Inside and Out (Pt. 2) - The POJO Model Itself – Annotations and Relationships
    Please note, this blog entry is based heavily on many other things out there on the web at the moment, most particularly this tutorial on ne...
  • (no title)
    List Insert Based on CompareTo Here's some code I've had to write more than once. It inserts something into a list at a position ba...
  • The Goods Delivered – SOA Suite “ant-sca-compile.xml” File Simplified (Plus Ivy Dependency Management)
    As promised in my last post , I’ve been continuing to work on getting Oracle SOA Suite (11g) projects to build outside the JDeveloper IDE.  ...
  • Booting Apache Derby ("JavaDB") with your Java App's Startup
    If you're embedding the Derby RDBMS with your java desktop application and want it to start when you start your app, you need to make th...
  • EJB3: Listing the Complete Contents of a Table
    It took me a while to work this out. Here is is for posterity: String queryString = "SELECT r FROM Recipe r WHERE r.id > 0"; Q...
  • EJB 3.0 Outside the Container, Inside the JVM - Part 3: Wrapping the Model
    Welcome to part three of my blog on using EJB3.0 / JPA and Derby inside the JVM. The previous parts can be found here and here . We're...

Categories

  • 0
  • 2008
  • ant maven pimp build javaone 2008
  • apple ipod touch
  • asm
  • blog new ruby
  • blogtag list
  • bond casinoroyale mashup mi6 film movie
  • build
  • bytecode
  • CI
  • cobertura
  • communityone 2008 nutter jvm scala jruby groovy davinci
  • communityone 2008 opensocial socialsite
  • communityone javaone keynote oreilly
  • configuration
  • cowley
  • css div layout column ie firefox safari example
  • custom
  • darkstar mpk20 wonderland java3d commaboration SL
  • dashboard rss communication news development
  • db2 database SQL max min howto tip
  • db2 database ibm lessons tips
  • db2 database load batch howto example
  • db2 import upload data howto command
  • debt technical java annotation
  • debugging tips javaone 2008
  • development web2.0
  • findbugs JavaOne 2008 pugh
  • findbugs JavaOne BOF notes
  • gafter closures java javaone notes
  • google trouble patriarchal patriarchy
  • groovy metaprogramming javaone 2008
  • grubby oss data generation project announce
  • guice javaone 2008
  • gwt maven howto example simple
  • howto
  • hudson
  • hudson CI javaone 2008
  • ibm
  • invokeDynamic jvm dynamic ruby javaone
  • itinerant web2.0 portable desktop
  • jacl was websphere wsadmin trace logging
  • james gosling sun java open source tech days second life SL
  • jar java manifest properties config howto tip
  • java
  • java applet javaone 2008 reloaded jnlp
  • java javafxscript javaone 2008 fxscript
  • java javaone 2007 07
  • java javaone 2008 bytecode cobertura asm singleton testability
  • javaone
  • javaone keynote gage schwarz javafx
  • javaone semantic web bof notes web3
  • jazz
  • jruby rails javaone charlesnutter thomasenebo
  • jruby ruby netbeans development
  • kill dead laptop computer rebuild restore
  • lessonslearned
  • mac osx java gui shellscript classpath problem solution
  • maven plugin unittest test packager
  • mylin mylar javaone eclipse 2008
  • netbeans development ide
  • netbeans development ide RC
  • netbeans maven2 profiling
  • netbeans ruby sun tech days visual web pack roman strobl
  • ola bini java javaone 2008 thoughtworks ruby jruby
  • openjdk java javaone javafx wonderland
  • overheard
  • pojo ejb3.0 jpa orm java example howto
  • rant
  • rest restful jsr311 java web2.0 javaone ts-6411
  • rome rss feed blog rss atom propono java javaone
  • rsa uml profile plugin howto
  • ruby inheritance example
  • ruby jruby rss xml hpricot
  • ruby unless example
  • scm
  • setup
  • subversion svn xp windows cleanup
  • sun java soa web2.0 netbeans opensource javacaps
  • sun tech days java derby database rdbms london
  • sun tech days london impressions
  • terracotta java javaone 2008 android gwt
  • tip
  • tips
  • vwp netbeans JPA howto
  • was jython scripting nfr ibm pmi jvm
  • was tpv jython scripting nfr ibm pmi
  • webrick ruby jruby actadiurna investigation code howto
  • workitem

Blog Archive

  • ►  2012 (1)
    • ►  October (1)
  • ►  2010 (8)
    • ►  November (1)
    • ►  October (3)
    • ►  June (1)
    • ►  May (1)
    • ►  February (1)
    • ►  January (1)
  • ►  2009 (9)
    • ►  December (1)
    • ►  November (5)
    • ►  March (2)
    • ►  February (1)
  • ▼  2008 (22)
    • ►  December (1)
    • ►  November (3)
    • ▼  May (15)
      • JavaOne 2008 - Java Recrystalised
      • CommunityOne 2008 - Open Social For Your Website
      • CommunityOne 2008 - The Road to Babel: Bringing th...
      • JRuby at Thoughtworks - BOF-4807
      • Boldly go where the Java programming language has ...
      • Using Findbugs in Anger - TS-6590
      • Overview of JavaFX Script - TS-5152
      • Mylyn: Code at the Speed of Thought - TS-6421
      • Pimp My Build - TS-5596
      • Improving the Engineering Process through Automati...
      • The Future of Guice - BOF-6400
      • Applets Reloaded - TS-6290
      • Advanced Enterprise Debugging Techniques - TS-6072
      • Groovy: The Red Pill (or Metaprogramming : The way...
      • Practical Applications of Static Bytecode Analysis...
    • ►  March (1)
    • ►  January (2)
  • ►  2007 (53)
    • ►  December (1)
    • ►  November (3)
    • ►  September (3)
    • ►  August (2)
    • ►  July (3)
    • ►  June (1)
    • ►  May (12)
    • ►  April (5)
    • ►  March (13)
    • ►  February (7)
    • ►  January (3)
  • ►  2006 (35)
    • ►  December (8)
    • ►  October (1)
    • ►  August (1)
    • ►  July (5)
    • ►  June (8)
    • ►  May (3)
    • ►  April (7)
    • ►  March (2)
Powered by Blogger.

About Me

Unknown
View my complete profile