title: Google Guice vs. JSR-299 CDI / Weld
body: <p>Weld, the JSR-299 Contexts and Dependency Injection reference implementation, considers itself as a kind of successor of Spring and Guice. </p>
  
  <blockquote>
    <p>CDI was influenced by a number of existing Java frameworks, including Seam, Guice and Spring. However, CDI has its own, very distinct, character: more typesafe than Seam, more stateful and less XML-centric than Spring, more web and enterprise-application capable than Guice. But it couldn't have been any of these without inspiration from the frameworks mentioned and lots of collaboration and hard work by the JSR-299 Expert Group (EG).</p>
  </blockquote>
  
  <p><a href="http://docs.jboss.org/weld/reference/latest/en-US/html/1.html" rel="noreferrer">http://docs.jboss.org/weld/reference/latest/en-US/html/1.html</a></p>
  
  <p>What makes Weld more capable for enterprise application compared to Guice? Are there any advantages or disadvantages compared to Guice? What do you think about Guice AOP compared to Weld interceptors? What about performance?</p>
  
  <p><strong>My choice</strong></p>
  
  <p>In the end I decided to use Guice because I like the clean programming model which comes almost without annotations besides @Inject by default. It is much easier to use external libs with Guice than with CDI. AOP is also pretty simple with Guice.</p>