|
Monday, April 3, 2006 |
I've been wondering for a while if we would get some consolidation in the IoC/Dependency Injection space so that component developers can adopt a single approach which would work in any Ioc/DI container such as Spring, HiveMind, EJB3, SCA, XBean etc. One of the goals of IoC/DI has always been that the container is invisible; though right now we tend to have different container/spec specific annotations and APIs so I've been wondering if we can come up with a single DI contract we can all adopt.
So my first braindump of a possible approach is called AnDI; Annotation based Dependency Injection and tries to unify the very popular spring style with EJB3 style; using standard annotations from JSR 250. Note that its a wiki so comments/edits are most welcome.
There's not a whole lot new here; its based on existing practices in various DI containers and is quite similar to the DI model in EJB3 - its more my attempt to unify the various camps to try get us all using the same contract going forward. Incidentally you can happily use annotations on Java 1.4 by using retrotranslator on your code. Incidentally it'd take probably an hour to implement AnDI in the standard Spring distro.
Update: BTW many thanks to Hani Suleiman for help creating to this document and giving feedback from the JSR 250 expert group.
10:12:55 AM
|
|
© Copyright 2007 James Strachan.
|
|
|
|
|
|
April 2006 |
Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
|
|
|
|
|
|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
|
|
|
|
|
|
Mar May |
|
|
|
|
|
|