Sunday, 12 August 2012

A Tale about JavaScript

Filled under:


A long time ago, JavaScript was called LiveScript. In a classic “if you can’t dazzle them with brilliance, baffle them with marketing” move, Netscape changed the name to take advantage
of the burgeoning interest in Java (another programming language that Netscape partner Sun Microsystems was developing at the time). By all accounts, the strategy worked. Unfortunately, many newbies still mistake JavaScript for Java, and vice versa.
Here’s the scoop: Java is similar to JavaScript in that they’re both object-based languages developed
for the Web. Without going into the nitty gritty details of syntax, interpreters, variable typing, and just-in-time compilers, all you have to remember about the difference in usage between
JavaScript and Java is this: On the gigantic client/server application that is the Web, JavaScript lets you access Web clients (otherwise known as browsers), and Java lets you access Web servers. (Note: In some cases, you can also use Java for Web client development.)
This difference might seem esoteric, but it can help you determine which language to use to create the Web site of your dreams. If what you want to accomplish can be achieved inside the confines of a Web client (in other words, by interacting with HTML, browser plug-ins, and Java applets), JavaScript is your best bet. But if you want to do something fancier — say, interact with a server-side database — you need to look into Java or some other server-side alternative.

0 comments:

BthemesandTricks is loading comments...