Monday, March 7, 2011

CDI Advocacy: Why we got started with this!

My friends and I were excited about CDI. We felt CDI has a lot of potential.
For some reason, it is part of Java EE 6. It could be part of Java SE as far as we are concerned.

CDI is a rethink on how to do dependency injection and AOP (interception really).
It simplifies it. Reduces it.

CDI is to Spring and Guice what JPA is to Hibernate, and Toplink.

We really like the ability to provide extensions for CDI.
We also like the fact that it is the standard so that other standards can build on top of it.
We were not sure why Java did not have a standard DI and AOP implementation already.

Why do we feel the need to advocate it?

Good question.

First, the examples from the WELD site were not runnable without downloading the entire WELD project. (WELD is the reference implementation for CDI.) Then the build was very complicated. We decided to create an easy to use build with easy to use examples. The build required a lot of knowledge of how maven worked. You might say you had to be a maven maven. We want to make the examples more approachable. We created simple, standalone maven projects that are easy to use. We also plan on creating some ant build files for those of us who hate maven.

Then we looked at the examples that shipped with Glassfish. They require that you download and install Glassfish and Netbeans. We just don't know anyone who uses Netbeans. We felt the examples should work in Eclipse. The last time we checked, everyone uses Eclipse.

eclipse java, netbeans java Job Trends graph


We want to create a place where we can push CDI for CDI's sake--not CDI for Seam or CDI for Netbeans/Glassfish. There is nothing wrong with Seam or Netbeans, but we feel CDI has merit on its own.

This is just a brief taste. There is more to come.

We created a webiste, a blog, a vimeo account for videos, a tutorial, a google code project, a google group, and more. Let's get it started! Please join us.

2 comments:

  1. Did you have a look at CODI, the Apache Myfaces extensions to CDI? http://myfaces.apache.org/extensions/cdi/

    ReplyDelete
  2. Great to see a new initiative around CDI! :)
    I've been also blogging for some time about various CDI extensions:
    http://www.warski.org/blog/?category_name=cdi

    Maybe you'll find some content from there useful.

    All of our extensions are open-source and available on
    https://github.com/softwaremill/softwaremill-common

    Adam

    ReplyDelete