Posts Tagged dip

Erich Gamma Discusses Jazz, Eclipse, JUnit and Design Patterns

Good interview from Erich Gamma at QCon London 2008, where he discusses, among other things, the JUnit framework, the Gang of Four book about Design Patterns and the Jazz project. I’ll try to summarize some of his interesting advices and responses here:

Why Eclipse is so successful:

“We focus on stable APIs, so we understood it was a commitment up front and we maintained our APIs, so we tried to really avoid breaking our community..”

About JUnit:

“We always said it would just be as simple as writing System.out.println() but fully automated….I think the key was it makes writing tests as simple as writing this debug statement….”

About Design Patterns:

“In Design Patterns we talked a lot about abstract coupling, that you can couple things by an abstract class, that the reference is only to an abstract class interface..”

“Never use the class names we give in the pattern for it – that’s wrong. Use the domain-specific names, make it very specific to what your use..”

He also gives advices in how to identify design patterns:

  • Something non-obvious
  • The same kind of structure
  • Confidence on multiple uses..

About Dependency Injection:

“I think it could be captured as a pattern. There are a lot of tradeoffs in there, it would fit into the whole creational realm..”

Check the whole presentation on InfoQ here. It’s worthwhile to see.

Tags: , , , ,

Google Guice, dependence Inversion in the Java way

Check out this great video about the new Java based inversion control framework from Google. The guys Kevin Bourillion and Bob Lee explains the concept behind dependency inversion principle (dip) and the core features inside Google Guice, called ‘juice’. The framework embraces and uses annotations instead of string identifiers (heavily used in Spring) to inject dependencies into the code. The most interesting feature is that Guice injects constructors, fields and methods (any methods with any number of arguments, not just setters) . You can also integrate Spring with Guice. Enjoy!

Tags: , ,