CDI
Are you familiar with CDI events? Really?
Well, then you might skip the beginning of the article
You think you know everything about CDI events… Think again!
by Antoine Sabot-Durand. He gives a great overview about how CDI events work and their (current) drawbacks. And he gives a small sneak peak at the changes we can expect with CDI 2.0.
This is by far the best overview about CDI events I have read so far. Everyone who is using them, should have a look at it.
The
Apache DeltaSpike team released version 1.0 this week. You can find the release notes
here and a short overview about the different modules in
this posting by Rafael Benevides.
DeltaSpike looks really interesting and seems to provide several features I have missed or found quite complicated to implement. I have never used it so far, but I am planning to change that. If anyone of you has some real world experience with it, please write a comment. I love to hear about it.
Java 8
Oleg Shelajev takes a critical look at the
usage of default methods introduced with Java 8. His main point is, that the usage of default methods can make it really difficult to understand your code. If you combine default methods of different interfaces with inheritance, it can become really difficult to find which method implementation will be executed. Therefore, you should think carefully before using default methods everywhere. Quiet often you can use inheritance to get to the same result.
I really liked his post. It is tempting to use new features as often as possible. But we always need to be aware of possible drawbacks. And a loss of readability and an increased complexity of our code can be a massive drawback if you or one of your colleagues has to change or analyze the code.