Introduction to JavaScript

JavaScript was first developed by the Netscape company, with the name "Live Script", a scripting language that extended HTML capabilities, offers a partial alternative to using a large number of CGI scripts to process forms and information that add dynamism to web pages.
After the release of Java, Netscape began to work with Sun, in order to create a script with a similar syntax and semantics of Java, and for marketing reasons the name of the new scripting language was changed to "JavaScript:".
JavaScript has emerged from the need to that the logical and intelligent be on the client side too, not only on the server side. If all logic is server side, all processing is done at the server, even for simple things, such as data validation. Thus, JavaScript makes it endows the client relationship to be a true client-server system.

HTML Web page authors offer some flexibility, but static. HTML documents can not interact with the user in other things more dynamic than it provides links to other resources (URLs). Creating CGI's (Common Graphics Interface) - [programs running on Web server and accept incoming information from the website and returns HTML] - led to the enrichment of work opportunities. Thus, an important step to interaction was made by JavaScript that allows to insert scripts that run within the web page, specifically in the user's browser, thus easing traffic between server and client. For example, a page for collecting data from the user can add JavaScript scripts to validate the accuracy of introduction and then the server sends only datas to be processed correctly.
JavaScript contains a fairly extensive list of features and commands to help with mathematical operations, string manipulation, sounds, images, objects and browser windows, checking URL links and data entries of the forms. The code for these actions can be inserted into the web page and executed by the visitor's computer.
After its launch in December 1995, JavaScript has attracted support and key industry vendors such as Apple, Borland, Informix, Oracle, Sybase, HP and IBM. It developed further, obtaining recognition of most browsers. Understanding the importance of web site scripting, Microsoft wanted to provide support for JavaScript. Netscape has chosen to license Microsoft's technology in place to sell, so Microsoft has analyzed JavaScript, and relying on public documents, created its own implementation, "Jscript", which is recognized by Microsoft Internet Explorer.
Jscript 1.0 is roughly compatible with JavaScript 1.1, which is recognized by Netscape Navigator. However, later versions of JavaScript and specific differences between browsers platforms have started to give web developers enough problems. Netscape, Microsoft and other vendors have agreed to pass the language of international standardization organizations - ECMA, it finalized a specification language known as ECMAScript, recognized by all distributors. Although ECMA standard is useful, both Netscape and Microsoft have their own implementations of the language and continue to expand beyond the standard basic language.
Besides Jscript, Microsoft has introduced a competitor to JavaScript, called VBScript, designed to facilitate penetration of VB programmers on the web. VBScript is a subset of Visual Basic. However, JavaScript became known as the standard for web scripting language. It is generally considered that there are ten fundamental aspects of the JavaScript language that any programmer in the language should knows:
  1. JavaScript can be included in HTML - JavaScript code is usually hosted and executed inside HTML documents. Most JavaScript objects have HTML tags that represent, so the program is included on the client side. JavaScript uses HTML to get into the web application working.
  2. JavaScript is dependent on the environment - JavaScript is a scripting language; the software program which is actually running is the web browser (Firefox, Opera, Netscape Navigator, Internet Explorer, Safari, etc..) It is important to consider this dependence browser when you use aplicatiiJavaScript.
  3. JavaScript is an entirely interpreted language - the script code will be interpreted by the browser before being executed. JavaScript does not require compilation or preprocessing, but remains part of the HTML document.
  4. JavaScript is a flexible language - In JavaScript we can declare a variable of some kind of type, or we can work with a variable although we not know the specified type before running.
  5. JavaScript is based on objects - JavaScript is an object oriented programming language like Java, but more accurately, is "based on objects" JavaScript object model is based on the instance and not on inheritance.
  6. JavaScript is event driven - most of the JavaScript code responds to events generated by user or system. HTML objects, such as buttons, are enhanced to support event handlers.
  7. JavaScript is not Java - The two languages have been created by different companies, the reason of these similar name is just marketing.
  8. JavaScript is many-functionally - this language can be used in a variety of contexts to solve various problems: graphics, mathematical, and others.
  9. JavaScript is evolving - JS is an evolving language, a positive thing, but it can generate problems, the programmers need to always check what version to use for applications that can be available for a larger number of users of different browsers.
  10. .JavaScript covers diverse contexts - this programming language is directed mainly towards the client side, but we can use JavaScript on server side too. JavaScript is the language native to some web development tools like Macromedia Dreamweaver or IntraBuilder Borland.

This course teaches the basics of JavaScript and how to work with this language, as an initial course that is best suited for beginners in web programming, which wants to learn this scripting language.