Did web browsers support any form of VM bytecode for client side languages? And how did javascript become the exclusive language for the web?
Edit: I should have clarified. Is JavaScript the only language for operating on the HTML DOM?
Client-side code is written using HTML, CSS, and JavaScript — it is run inside a web browser and has little or no access to the underlying operating system (including limited access to the file system).
JavaScript isn't, and never was “the only client-side language”. At most, for a certain period of time, JavaScript was the only programming language with built-in support in all major browsers. Given the popularity of the Web, that made JavaScript very successful. How can you write cleaner code in Javascript?
Python is one of the most popular alternatives to JavaScript for backend development. The Python language has a very simple syntax that easy to grasp for the newbies too. It gives more clarity as the language is very easy to read and anyone working with you on your code can easily understand it.
Besides, running Python scripts on the client-side has several benefits. We can get the full potential of Python without having to convert it into JS as we do in Tensorflow.
Check out CoffeeScript. It is compiled to JavaScript so can be used anywhere JavaScript can be used.
JavaScript being the target of compilation is now the VM of the Web. 15 years ago it was Java that was to be the language of the Web, but it failed for various reasons.
If you're interested why, I recommend watching the talks by Douglas Crockford.
The main other one is VBScript, which is supported by IE. There are also several languages that compile to JavaScript, including Pyjamas (Python), GWT (Java), and CoffeeScript
Highly recommend sticking with javascript. Its very easy to use once you get the hang of it and it gives you a foundation for other things like actionscript which is used with Flash and other Adobe technologies.
Yes.
Three others are currently used fairly frequently: Flash, Java, and Silverlight.
With the exception of Flash for Google Chrome and VBScript for Internet Explorer 7 and below, web browsers haven't supported any other client side language out of the box.
To answer your question about how JavaScript become so widely used, please see this question and its answers:
https://softwareengineering.stackexchange.com/questions/28947/how-did-javascript-become-popular
Edit
Java, Flash, and Silverlight cannot interact with the DOM directly, but they can manipulate the DOM interacting with JavaScript. If your question is limited to languages that can directly interact with the DOM, you're left with only JavaScript and the now-defunct VBScript.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With