Posts Tagged java webapp gwt

Monolinguistic development

Speaking you mother tongue is undoubtedly much easier than speaking any foreign language. But is speaking 5 foreign languages harder than speaking just one of them?

When developing a Java based web application it turns out that apart from Java you have to use some sort of SQL to obtain the data, some XML to define your build system and perhaps even some essential elements of the application (like Spring beans), and of course a mixture of HTML and JavaScript to code a rich user interface. Not surprisingly, there are many developers who claim that this sucks (see http://lofidewanto.blogspot.com/2011/10/why-is-polyglot-programming-or-do-it.html for example). They are probably right.

I got really excited when I first saw GWT. Guys at Google have done a damn good job providing a Java-to-JavaScript compiler. I could finally make my apps speak one language (with a small exception for maven’s pom.xml). The Criteria API offered by JPA and GWT for the user interface made it finally possible. I was even thinking of writing an extension to maven polyglot to teach it how to speak Java.

I’m much more sceptical about the idea today, however. The March 2012 issue of the Technology Radar by ThoughtWorks put GWT on hold. They somehow believe it’d be better to replace Java with JavaScript on the server side than to do it the other way round (Node.js by the way seems to be ascending on their pictures) . Though, I don’t think it’s really important that Java is inferior/superior (choose one according to your preferences) to JavaScript. The real question is if any multi-purpose language can beat two problem specific languages when performing two distinct tasks. I’d say, it’d be pretty hard.

Pure Java is just not good to code a user interface – those who used Swing know perfectly than things get messy at some stage. And no matter how good your imagination is, modelling a view with an xhtml tool is a much more intuitive task than any imperative based solution.

‘I love you’ in Klingon just doesn’t sound good.

 

 

Leave a comment

%d bloggers like this: