Added: 2 years ago
From: GoogleDevelopers
Views: 108,261
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (24)

Sign In or Sign Up now to post a comment!
  • Comment removed

  • 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.

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

  • what about just making one big singleton factory instead of the guice-module/injector for the case of a medium large application... seems like a good solution for me, instead of many small factorys ;-) but nice project btw :-D

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

  • Comment removed

  • 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

  • @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); }

  • 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

  • @eelakh

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

  • 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!

  • Comment removed

  • guice-servlet module, seems to be like going back. we moved the configuration from servlet code to XML in early 2000 and now we are going back..

  • gwt juniorsatanas muito bom !

  • Nope, he couldnt use else in this method, because text local variable can be changed in the first if block of code (see: text = shortener.shorten(text);).

  • It would still have been a direct dependency, every class that goes into an if block has to be imported (i.e. loaded and initiated).

  • Great video... Made me try my first GUICE servlet with Google App Engine. Looking forward to use GUICE more... thanks guys

  • I love Guice but don't quite like the infomercial style of making every other way look so ugly at the beginning of the video.

  • But unfortunatelly it is, at least, painfull

  • great vid!

  • Good presentation ! thanks

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