3 ms·
I think where I was confused is that the applets were already programmable and interactive, so I'm just not sure what throwing JS into the mix brings. But it co
by smcl 3y ago
I think where I was confused is that the applets were already programmable and interactive, so I'm just not sure what throwing JS into the mix brings. But it could be that there's some functionality it gained (XHR, perhaps?) in the intervening period that it lacked at the time.
- bazoom42 3y agoThe thinking was that JavaScript was a scripting language and therefore much simpler to use than Java. So web designers who were not professional programmers could combine a few predesigned Java applets and script them using JavaScript. Of course these days with package managers and build systems and TypeScript, JavaScript is a lot more complex than Java ever was.
- genezeta 3y agoYes, applets were already interactive and programmable. But they sort of ran "in a box", like Flash. So you have this particular rectangle in the page, inside of it something runs and works and does its thing... but outside of it, the rest of the page knows nothing of that. What JavaScript was supposed to bring into the mix was that you might have a Java applet doing some "heavy-lift" stuff and then, you'd use the results of that to operate on other elements in the page. Like maybe you'd update a form, or some data in the HTML, or whatever. Also, obviously, the other way around. You might have some HTML controls that would then feed user data into the applet. Yes, you could do everything inside the applet, but this offered an additional option.