Nightmare: Java Applet and JavaScript
Author
Zhou Renjian
Create@
2006-10-18 00:21
Modified@
2006-10-24 19:29
I met the same thing about 2 years ago. And many of my JavaScript calls were restricted according to the sanbox of Java Applet, so calls needed to be asynchronized. But my JavaScript calls should be syncrhronous calls. So callbacks were used at that time, and the Applet then became a server! And JavaScript became a browser in fact! Both of server and client were in asynchronous mode! So you can image that mess situation when two restricted synchronous calls should work together with a middle JavaScript DOM action and also with before/after actions? I also had to block the browser user interface and indicate the user with a progress bar in JavaScript/HTML side. Lots of other problems came to me, contributing pains at that time.
Such JavaScript in Applets - Getting Out of the Sandbox technology just remind me that nightmare of integrating Java Applet and JavaScript together. So I recommend you NOT to rush for it until you are ready for nightmares. Actually I recommend NO Java Applet + JavaScript.