Sunday, February 05, 2012

Run Anywhere

Another key bullet point in the evaluation of a new general-purpose programming language is this: does it execute where my client's need it to execute?

Two key trends influence this point:
  1. Web apps are moving from server-heavy to browser-heavy. There is no getting around it. In order to create modern web apps with the features user's want, much of the code must move from the server to the browser*.
  2. Mobile phones.
So, for any new programming language: it may have the most elegant syntax in the world, but if it doesn't run in a browser (or translate into something that runs in the browser) and/or doesn't run on a mobile device then i don't want it.

Only 2 languages (that I know of) run on the server (window/linux/unix), the browser and mobile devices:

  1. Java. Runs on browser via GWT**. Runs on phone via Android.
  2. JavaScript. Runs on browser (duh), server (node.js) and phone (assuming browser apps).

* When i say run in a browser in this post, i mean browser without plugins (as in Applets, Flash, Silverlight). Not my decision. It just seems to be the way the world is moving.

** By translating java into javascript

2 comments:

Philip Yurchuk said...

Looks like a LOT of people are trying to solve this problem:

https://github.com/jashkenas/coffee-script/wiki/List-of-languages-that-compile-to-JS

Since you're a Google fanboy, I just talked to a guy from a startup consisting of all ex-Googlers who are using Closure (not Clojure):

http://code.google.com/closure/

They're also using Play Framework (Java version).

Anonymous said...

I understand your point but some might read your post as indicating Java can actually run in a browser (outside the applet sandbox). The GWT compiler translates Java source on the server side into JavaScript that runs on the client side.