Dependency injection and why Java sucks

Jamis Buck reminds me why I dislike Java in his Net::SSH revisited post.

It’s not that Java is bad. It’s quite a nice language with a good solid foundation of available classes and libraries. No, the problem is all the frameworks and design patterns you need to use to be able to work at the same level as what come as default in a language in Ruby.

Dependency injection is a good example. I remember then it was the latest hype in Java-land a few years back. In Java it helps you write modular code without tight coupling between the components. And that’s a good thing, right?

However, in Ruby this is a non-issue. You can accomplish the same in Ruby without using a framework and extra libraries.

This is what I dislike with Java. It holds me back! With Ruby I feel I have an incredibly amount of power available at my finger tips. I can concentrate on the fun thing; solving the problem at hand. No need to fuss around with frameworks, support libraries and what not, just to have the ground to build upon.

So to summarize. Ruby makes you happy. Ruby makes you smile. Ruby gives you all you need.