Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Google I/O 2009 - Big Modular Java with Guice

Loading...

Sign in or sign up now!
108,795
Loading...
Alert icon
Sign in or sign up now!
Alert icon
There is no Interactive Transcript.

Uploaded by on Jun 3, 2009

Google I/O 2009 - Big Modular Java with Guice

Dhanji R. Prasanna, Jesse Wilson

Learn how Google uses the fast, lightweight Guice framework to power some of the largest and most complex applications in the world. Supporting scores of developers, and steep testing and scaling requirements for the web, Guice proves that there is still ample room for a simple, type-safe and dynamic programming model in Java. This session will serve as a simple introduction to Guice, its ecosystem and how we use it at Google.

For presentation slides and all I/O sessions, please go to: code.google.com/events/io/sessions.html

Link to this comment:

Share to:
see all

All Comments (24)

Sign In or Sign Up now to post a comment!
  • The presentation shows Hollywood sign :)

  • @4:15 Another way would be to have overridable (i.e. non-final) methods that return a Shortener (and another one that returns a Tweeter). That way, you can write a subclass that overrides those methods with their own implementations that return mocks, or whatever.

  • @7:38 But if you are using JUnit (and it looks like you are), you can (and probably should) perform setup and tear down in the setUp and tearDown methods.

  • @Discofunk007 You can now use annotations provided by JSR-330, such as javax.inject.Inject. If you don't want to do that, you can always fall back on writing a @Provides method for constructors that you want to inject, but that don't aren't annotated with @Inject. For example, @Provides TweetClient provideTwitterClient(Tweeter tweeter, Shortener shortener) { return new TweetClient(tweeter, shortener); }

  • You stole my name: Jeffrey Pipes Guice!!!! Check out my Facebook page called Jeffrey Pipes Guice.

  • At 44:58 he says "ninety" like a robot.

  • Don't like that there is a dependency on Guice for the annotations (or is there?). Should default to use the constructor with the most parameters

  • @eelakh

    True, but javac don't so it depend on which compiler you use.

  • At around 7th minute Jesse says if you compile a module you have to compile everything that it depends on?!!! it's not true. Test for yourself if you don't believe me. Define a class and inside one of the methods call another class that you've defined compile it. Then see the time of creation of the class files. Then go back and change the dependent class and compile again. It will still work without needing to compile the other class again. IDEs also keep track of these dependencies

  • Hollywood principle "don't call us, we'll call you."

    Bollywood principle "call us, we won't call you. No balance dude!"

    Haha... No offense, just a joke!

Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more