Monday, March 28, 2011

Announcing CDI Source

We decided to create an organization, named CDISource, to promote the use of CDI. This organization is not tied to any vendor nor to Java EE 6.

It did not take too long digging into CDI before I realized that Java Enterprise Edition 6 really nailed it this time. I have been a long time anti-EJB3 proponent. The interception model was flawed. The DI was flawed (or rather missing). CDI looks much better.

CDI is the Java standard for dependency injection (DI) and interception (AOP). It is evident from the popularity of DI and AOP that Java needs to address DI and AOP so that it can build other standards and JSRs on top of it. DI and AOP are the foundation of many Java frameworks, and CDI will be the foundation of many future specifications and JSRs.

CDI has merit on its own outside of the EJB and JSF space. Of course you can use CDI with JSF 2 and/or EJB 3.1. However CDI has a much wider scope than just Java EE 6 applications.

CDI is a foundational aspect of Java EE 6. It is or will be shortly supported by Caucho's Resin, IBM's WebSphere, Oracle's Glassfish, Red Hat's JBoss and many more application servers. CDI is similar to core Spring and Guice frameworks.

Like JPA did for ORM, CDI simplifies and sanitizes the API for DI and AOP. If you have worked with Spring or Guice, you will find CDI easy to use and easy to learn. 

If you are new to Dependency Injection (DI), then CDI is an easy on-ramp for picking up DI quickly. CDI is simpler to use and learn.

Although the ideas behind CDI are fundamentally sound, there are some missing pieces that can make it hard for adoption. CDISource aims to try to fill some of those missing pieces through tutorials, maven archetypes, and our open source library. We want to make the on-ramp for CDI easier by reducing the learning curve. CDI is nascent yet very promising.

Already CDISource has added support for doing unit testing (out of a Java EE container) with CDI. We did this by providing a standard interface for client side CDI so you can use Resin Candi, Seam Weld or Apache OpenWebBeans (all open source implementations of CDI).

In the last few weeks Andy Gibson, Rob Williams and I (Rick Hightower) (et al)  have been banging away on code, examples and ideas. We have come up with a mission statement (and a lot of working code).

Our mission is to :
  • Promote and facilitate the use of the Java Context and Dependency Injection (CDI) framework in relation to as many aspects of application development as possible.
  • Enable developers to take advantage of CDI independently of Java EE.
  • Provide lightweight, lean and agile access to the underlying CDI container as a core principle in our efforts.
  • Make testing easy without requiring a complex set of tools or complex deployment scenarios.
  • Enhance both Java EE development as well as the use of CDI in non Java EE application where possible.
  • Promote and enable the use of CDI in a vendor neutral environment and maximize the portability of application code across CDI implementations.
  • Not reject the ideas of Java EE but expand the usability of CDI outside the borders of Java EE application servers with frameworks that are not a part of the specification.
  • Not reject other CDI efforts but to provide another venue to promote those efforts. This is an addition. This is another voice in support of CDI.
To support these efforts we have setup the following: tutorials wiki, CDI Advocacy webiste for news on CDISource, blog, vimeo for tutorial videos, tutorial that work with Eclipse WTP, google code project for examples, google group for support, and a github repo for our beancontainer and test frameworks.

CDISource is looking for experts and enthusiasts to sign up and volunteer their time. 

You can start by looking at my brand new introduction to CDI DI over on JavaLobby.

Also look at Andy Gibson's CDISource announcement. He is much more eloquent than I.

There is so much more to come.

    1 comment:

    1. This document can provide with a great start for any developer looking to exploit their Java skills in the mobile arena.
      Take a look at this updated developer's guide. It provides an overview to the platforms, development tools and distribution mechanisms for apps created using Java™ technology for Nokia devices. It also emphasizes on the latest Nokia’s Touch and Type UI and how Java applications may take advantage of its features.
      Java Developer's Guide v1.1: http://www.forum.nokia.com/info/sw.nokia.com/id/aca87303-e7ef-4a5a-9274-7e0973d52e94/Java_Developers_Guide_v1_1_en.pdf.html


    Kafka and Cassandra support, training for AWS EC2 Cassandra 3.0 Training