9 ms·
Acting like java or flash are or ever were alternatives to javascript is displaying a very profound ignorance of what javascript is for. How do I manipulate th
by asdasf 13y ago
Acting like java or flash are or ever were alternatives to javascript is displaying a very profound ignorance of what javascript is for. How do I manipulate the DOM in java? Oh I don't? It is not an alternative option then. Javascript absolutely is the only option, and people have no choice. That is why people invest so much time in writing LANGUAGE_X to javascript compilers, so they can write code in a less terrible language even though it has to be deployed as javascript.
- b0rsuk 13y agoThis is a good point. It reminds me of SQL. ORMs are everywhere and everyone is trying hard not to write any SQL.
- cbsmith 13y ago> How do I manipulate the DOM in java? That's kind of Applet's 101: http://docs.oracle.com/javase/tutorial/deployment/applet/manipulatingDOMFromApplet.html http://docs.oracle.com/javase/tutorial/deployment/applet/man... Flash has similar (arguably much better) API's for this as well. There are graveyards filled with other attempts. > Javascript absolutely is the only option, and people have no choice. Being the most broadly supported and most integrated solution doesn't mean developers have no choices. It just means they JavaScript might be their best choice. On almost any platform there are going to be certain programming languages that are more integrated and better supported. > That is why people invest so much time in writing LANGUAGE_X to javascript compilers, so they can write code in a less terrible language even though it has to be deployed as javascript. And there you have it. JavaScript wins by virtue of being a better deployment platform in the browser space. At one time Java used to enjoy an even broader advantage. Acrobat, Flash, VBA, Bourne Shell, MSI, Unix DBM, SQL, sendmail, PHP, MySQL, Windows, Linux, C, POSIX, PostScript, XWindows, etc. have all ridden these kinds of waves. Some are more successful than others, and certainly the web browser is probably the most ubiquitously deployed runtime environment ever, but really, if anything this is normal and the broad diversity is not. It's not unfair or unusual, so much as inevitable.
- asdasf 13y ago>That's kind of Applet's 101 So, write javascript to trigger a java applet that changes the dom is a reasonable alternative to writing javascript to change the dom? >Being the most broadly supported and most integrated solution doesn't mean developers have no choices Yes, it literally does. When presented with one option, you have no choice. >And there you have it. JavaScript wins by virtue of being a better deployment platform in the browser space Are you serious? >It's not unfair or unusual Nobody said it was. Just that javascript sucks and we're stuck with it against our will.
- cbsmith 13y ago> So, write javascript to trigger a java applet that changes the dom is a reasonable alternative to writing javascript to change the dom? Depends on what you mean. These days people often have Applets disabled. But if you have an Applet with the access to do so, you can manipulate the DOM as much from it as you could from JavaScript. > Yes, it literally does. When presented with one option, you have no choice. There are lots of options, its just one is better than the others. >> And there you have it. JavaScript wins by virtue of being a better deployment platform in the browser space > Are you serious? Absolutely. People made a go of it with Applets. Once they realized they could get the job done with JavaScript, they dropped Applets like a hot potato, to the point where Applets are being dumped. Most other in browser programming environments are platforms in their own right that talk to browser platform. JavaScript's platform is the browser, and that turns out to make a big difference. > Just that javascript sucks and we're stuck with it against our will. Depends on you who define as "us". You're going to want to get familiar with "worse is better": http://www.jwz.org/doc/worse-is-better.html http://www.jwz.org/doc/worse-is-better.html
- cbsmith 13y ago> So, write javascript to trigger a java applet that changes the dom is a reasonable alternative to writing javascript to change the dom? Actually, I missed one important aspect of what you were saying: "So, write javascript to trigger a java applet that changes..." No, there is no requirement for any JavaScript at all. You just use an applet tag (well, these days you use the object tag, but you get the idea...).