Tuesday, October 16, 2007

Monolingual web toolkits: Phobos vs. GWT

The Java Virtual Machine is well on its way to becoming a multi-lingual environment with support for Java, Javascript, JRuby, Groovy, etc. but I have to admit harboring concerns about polyglot programming within a single project. If at all possible, I prefer to use one language per project, but with browser-based applications that's been very tough to do. I've usually ended up with Java on the server side and Javascript on the client.

Fortunately, I can now dump either one language or the other... If I want to ditch Java I can pledge my allegiance to the GlassFish Project Phobos. If I want to ditch Javascript I can pledge my allegiance to the Google Web Toolkit (GWT).

Phobos looks really, really neat... you should really check out their screencast... but I have not had the bandwidth to even play with it. GWT also looks really neat... some of my colleagues at work have published their favorable experiences with GWT versus Dojo, and it certainly looks compelling... but once again I haven't even played with it yet.

Is it really worthwhile to use a monolingual tool? I think it is, particularly when you are trying to learn how to program. Once you've mastered one programming language it's fairly easy to pick up another, but mastering two (or more) at once seems to me like a bad idea.

As I might have mentioned before, I'm interested in teaching "normal" people how to program. Back in the good old days before that darn-old Internet things were pretty simple... I remember teaching a neighbor "enough" Visual Basic to "get by" in a few evenings. Learning "enough" to build a browser based application is dreadful by comparison...

I am thinking that Phobos might change that... Javascript seems simple enough for anyone to grok... but maybe I am kidding myself. Even Javascript has a lot of cruft.

On the other hand, GWT does liberate Java programmers from all of those nasty browser inconsistencies. For those who've mastered Java it seems like a natural... but Java seems like a poor choice for a first language to teach someone.

What do you think? Teach them Java or teach them Javascript?

No comments:

Post a Comment