You would have already come across something called GWT ( Google Web Toolkit ). Basically it compiles your Java code to JavaScript and HTML. Very interesting as it takes care of all the nuisances of the browser incompatibility ( specially IE ) and hand coded HTML.
But what came across my mind is that why can’t we have a compiler that compiles Java to one the ugliest ( second to perl ) langauges. Yup I’m talking about PHP.
PHP has huge market share becuase it’s quick and dirty. All you want is set up is a simple page, obviously your preferred language of choice will PHP. No question about that and yes it’s very handy. But again don’t expect it to go beyond that quick and dirty job of yours. There are several pros and cons and this blog isn’t about that.
What I’m trying to say is for Java developers who love the language, platform and tools can we have something that basically alleviates them from writing PHP.
KIRA is one of the compiler that is trying to solve this problem. But little is known at this point of time.
It’s not a Java to PHP compiler, but it compiles a functional langauge to PHP. It’s built using ANTLR which is again a compilers compiler built in Java.
Wouldn’t it be fun to have a library together with GWT that compiles Java to JS, HTML and PHP in one go. Just deploy that anywhere on Apache ( running mod_php )and there you go…a fully functional application all written in Java that runs in PHP platform.