Re: A couple of question
"Ken T." <nowhere@home.com> writes:
I agree with all of this, but it still drives me up a wall. I shouldn't
have to use JavaScript in web development. The choice of language should
really be up to the programmer. So why isn't anyone fixing this issue?
The Microsoft? Internet Explorer can be programmed using COM,
which is language neutral. But one can not access all functions
that are accessible using JavaScript.
Possibly, Microsoft, Inc., also has taken some effort to create
an API for scripting. IIRC, one can also use VBScript in a web
page displayed via the Microsoft? internet explorer, and possibly
every other language implementing some scripting API (I guess).
But this might not work with other browser. So the use of JavaScript
might make it easier for both authors of web pages and of web browser
to choose a scripting language, because there only is one. Otherwise
one might have to worry about whether browser X supports scripting
language Y. (There already were or are some differences between
JavaScript dialects in browser.)
I know at least one site that starts a hidden Java applet when
a user starts a visit. It seems that then JavaScript is used as
a glue code between this applet and the DOM. The applet then
communicates with the server and changes the DOM - that is, it
kind of replaces the browser part that is handling the communication
and uses the browser only as an HTML renderer - like AJAX, but
involving Java. So, if you take some care and effort to establish
such a framework, then you should be able to use Java on the
client side to do what usually is done with JavaScript.
Another means to use another language than JavaScript is to use
a compiler that can compile to JavaScript.