Last Updated: February 25, 2016
·
1.856K
· Smotko

Use Java to prototype your Javascript webgl app

This sounds insane right? Why would anyone use a verbose and bloated language like Java for prototyping an application that will be written in Javascript? The reason why you should consider doing this is code hot swapping. Java can replace the code of your application while it's running - allowing you to see changes in real time. I've written a blog about this if you want to know more: http://smotko.si/hotswapping/

Hot swapping is very very useful, especially for creating OpenGL applications. And you can create a Java application which uses OpenGL ES 2.0 API - the same API version as WebGL.

Yes, because Java is statically typed and generally more verbose, you'll probably have to make a few more keystrokes, but if you are using Eclipse which, can auto complete most of the repetitive typing, I don't believe this to be a problem.

You also don't need to create a complicated hierarchy structure with multiple interfaces, abstract classes and so on. You can keep your application simple.

As an added bonus it will be easy for you to port your application to Android!

1 Response
Add your response

Google's V8 engine supports code hot swapping, hence you can modify your application live from Chrome Developer Tools!

See for example The Chrome Javascript editor can do hot swapping

over 1 year ago ·