Page 1 of 1

(Solved) flash javascript question:

Posted: Wed Sep 02, 2009 12:52 pm
by Isaac
will we ever be able to completely replace flash by improving JavaScript? (maybe by adding opengl extensions)

Javascript video player:
http://www.nihilogic.dk/labs/jsvideo/test1.php

Posted: Wed Sep 02, 2009 7:53 pm
by Sirius
Yeah, there are proposals for things to do that in an open-standards manner. I can't remember whether HTML5 is supposed to include 3D extensions (which would probably be implemented on the local end by an OpenGL renderer anyway) but there was a Canvas control that does the 2D.

JavaScript kind of needs to evolve a bit still, though - it's often a crappy language to do anything much with because the tools tend to be primitive. Then again, my knowledge could be a bit out of date there - it's been 2-3 years since I did very much with it and ... well ... I get the impression Visual Studio might have proper autocompletion/debugging support for it now. Chances are there are other tools that may be at a similar level. (Eclipse? Maybe? Cross fingers?)

JS execution has accelerated too, what with Chrome and Fx3.5. I'm guessing there is some JIT compilation going on now, which is good - because for a big web app there really needs to be. Running masses of code fully interpreted is just going to make stuff choke.

Posted: Wed Sep 02, 2009 10:54 pm
by Isaac
Speaking of tools:
Have you read up on the google web tool kit Java translator? It's suppose to let you write in Java and export your code into javascript. And it allows you to export in 3 modes. One readable by humans (regular) and another that's opimised for performance (impossible for a novice to read). The other I'm unclear on. I've seen Java produce all kinds of applications so I wonder how much can be transfered into a JavaScript app.

Posted: Wed Sep 02, 2009 11:59 pm
by Sirius
That depends entirely on the API. If you could somehow hook JavaScript up with a full-fledged JRE, you could write all the same stuff. If you're just working with an HTML DOM, considerably less so.

Posted: Thu Sep 03, 2009 12:07 am
by Isaac
You're right! I'm sorry. I was talking about eclipse with the google web tool kit.