Some while ago I have posted a short post related to OSGI (OSGi – one of my favourite things in Java world).
Now in this weekend I decided to migrate the Aragon Framework to OSGI, because I think that there is no better and simpler Java module framework around. So I started working on it and I was surprised how simple can be, basically beacuse back than I have followed the service interface and implementation separation practice, and more or less the framework was functioning like OSGI. Yes, there are some issue that need tobe rethinke, but still 90% of the code can be reused. I barelly can wait to finish it.
Today I just read a short article about the Java 7 Module System proposal and its possible impact on the Java world, and I have to say that it troubled me a lot.
Why the hell do they want to ad something to a programming language that is available by choice since quite a while as a separate library, and does not need language change?
Why do you want to force the Java developers to THINK IN MODULES? What if I only want to make a simple Hello World like application?
I like to consider that knowing to program in Java (only based on the syntax) is one thing, and developing module based applications is another. I cannot understand the way Sun thinks. This strange direction is visible from a while. They are continuously adding stuff to the language, with barely no real reason.
Like for example the annotations: I can perfectly understand the point of marking potential programming flaws like (need to override, or some access warnings), but having a code wired up using the annotations, that is the stupidest thing I have ever seen. It is more like something developed by a lazy developer who can only develop with full controlling IDE’s and barely touches the code, and so he(she) does not want to write the wire-up code so it decides to add an annotation and let the compiler of whatever do the rest. Just see the code bellow:
package server;
import javax.jws.WebService;
@WebService
public class HelloImpl {
/**
* @param name
* @return Say hello to the person.
*/
public String sayHello(String name) {
return "Hello, " + name + "!";
}
}
Clear isn’t it? I may be old fashioned but, I still like to see how this code is being connected to the rest of the application part. And the above code is the biggest bulls**t I have ever seen. (excuse my expression).
Now again, I kind of have the feeling like in case of the Nertbeans, or JavaFX, that Sun tries to copy AGAIN something that is already available and way advanced than what they can provide.
So
And my advice:
Sun guys, please try to implement another OSGI or something(whatever you want) separately, as an add-on to the run time, and leave the language as it is.Â
PLEASE LET DEVELOPERS DECIDE WHAT MODULE FRAMEWORK TO USE, AND DO NOT CHANGE THE LANGUAGE.
Happy coding,
N