JavaScript Development Tools.

Within JavaScript, access to a debugger becomes invaluable when developing large, non-trivial programs. Because there can be implementation differences between the various browsers (particularly within the Document Object Model), it is useful to have access to a debugger for each of the browsers that a web application targets.
Script debuggers are available for Internet Explorer, Firefox, Safari, Google Chrome, Opera and Node.js
Three debuggers are available for Internet Explorer: Microsoft Visual Studio is the richest of the three, closely followed by Microsoft Script Editor (a component of Microsoft Office), and finally the free Microsoft Script Debugger which is far more basic than the other two. The free Microsoft Visual Web Developer Express provides a limited version of the JavaScript debugging functionality in Microsoft Visual Studio. Internet Explorer has included developer tools since version 8 (reached by pressing the F12 key).
Web applications within Firefox can be debugged using the Firebug add-on, or the older Venkman debugger. Firefox also has a simpler built-in Error Console, which logs and evaluates JavaScript. It also logs CSS errors and warnings.
Opera includes a set of tools called Dragonfly.
Web Kit's Web Inspector includes a JavaScript debugger, which is used in Safari. A modified version called Blink Dev Tools is used in Google Chrome.
Node.js has node-inspector, an interactive debugger that integrates with the Blink Dev Tools, available in Google Chrome.
Some debugging aids are themselves written in JavaScript and built to run on the Web. An example is the program JSLint, developed by Douglas Crock ford who has written extensively on the language. JS Lint scans JavaScript code for conformance to a set of standards and guidelines. 

Version History.

The following table is based on information from multiple sources.
VersionRelease dateEquivalent toNetscape
Navigator
Mozilla
Firefox
Internet
Explorer
OperaSafariGoogle
Chrome
1.0March 19962.03.0
1.1August 19963.0
1.2June 19974.0-4.053
1.3October 1998ECMA-262 1st + 2nd edition4.06-4.7x4.05
1.4Netscape
Server
6
1.5November 2000ECMA-262 3rd edition6.01.05.5 (JScript 5.5),
6 (JScript 5.6),
7 (JScript 5.7),
8 (JScript 5.8)
7.03.0-51.0-10.0.666
1.6November 20051.5 + array extras + array and string generics + E4X1.5
1.7October 20061.6 + Pythonic generators + iterators + let2.028.0.1500.95
1.8June 20081.7 + generator expressions + expression closures3.011.50
1.8.11.8 + native JSON support + minor updates3.5
1.8.2June 22, 20091.8.1 + minor updates3.6
1.8.5July 27, 20101.8.2 + ECMAScript 5 compliance4911.606.00
Legend:
Old version
Latest version

Criticisms.

JavaScript is a loosely typed language (see Dynamic typing above). Loose typing places a majority responsibility for static type management on programmer discipline, very little on the compiler, and late reporting of type safety violation on the run-time. The result is a development environment where type bugs can be easily introduced due to human fallibility. The bugs may be difficult to detect or may go undetected by the run-time for several reasons:
  • Bugs may never be detected due to host code never being exercised.
  • Bugs may not be detected due to unreachable host code.
  • Bugs may not be detected due to not meeting governing business rules, even though technically correctly typed.
Criticism based on loose typing then cautions programmers to be aware of the need for greater programmer discipline and project schedule impact because both detected and undetected bugs increase production time at unpredictable rates. 

Related Languages And Features.

JSON, or JavaScript Object Notation, is a general-purpose data interchange format that is defined as a subset of JavaScript's literal syntax.
jQuery is a popular JavaScript library designed to simplify DOM-oriented client-side HTML scripting along with offering cross-browser compatibility because various browsers respond differently to certain vanilla JavaScript code.
Under score.js is a utility JavaScript library for data manipulation which is used in both client-side and server-side network applications.
Mozilla browsers currently support Live Connect, a feature that allows JavaScript and Java to intercommunicate on the web. However, Mozilla-specific support for Live Connect is scheduled to be phased out in the future in favor of passing on the Live Connect handling via NPAPI to the Java 1.6+ plug-in (not yet supported on the Mac as of March 2010). Most browser inspection tools, such as Firebug in Firefox, include JavaScript interpreters that can act on the visible page's DOM.
asm.js is a subset of JavaScript that can be run in any JavaScript engine or run faster in an ahead-of-time (AOT) compiling engine 

Use As An Intermediate Language.

As JavaScript is the most widely supported client-side language that can run within a web browser, it has become an intermediate language for other languages to target. This has included both newly created languages and ports of existing languages. Some of these include:
  • Objective-J, a super set of JavaScript that compiles to standard JavaScript. It adds traditional inheritance and Small talk /Objective-C style dynamic dispatch and optional pseudo-static typing to JavaScript.
  • Processing.js, a JavaScript port of Processing, a programming language designed to write visualizations, images, and interactive content. It allows web browsers to display animations, visual applications, games and other graphical rich content without the need for a Java applet or Flash plugin.
  • Coffee Script, an alternate syntax for JavaScript intended to be more concise and readable. It adds features like array comprehensions (also available in JavaScript since version 1.7) and pattern matching. Like Objective-J, it compiles to JavaScript. Ruby and Python have been cited as influential on Coffee Script syntax.
  • Google Web Toolkit translates a subset of Java to JavaScript.
  • Scala, an object-oriented and functional programming language, has an experimental Scala-to-Javascript compiler.
  • Pyjamas, a port of Google Web Toolkit to Python (translates a subset of Python to JavaScript)
  • Dart, an open-source programming language developed by Google, can be compiled to JavaScript.
  • Whalesong, a Racket-to-JavaScript compiler.
  • Emscripten, a LLVM-backend for porting native libraries to JavaScript.
  • Fantom a programming language that runs on JVM, .NET and JavaScript.
  • TypeScript, a free and open-source programming language developed by Microsoft. It is a super set of JavaScript, and essentially adds optional static typing and class-based object-oriented programming to the language.
  • Haxe, an open-source high-level multi platform programming language and compiler that can produce applications and source code for many different platforms including JavaScript.
  • Clojure Script, a compiler for Clojure that targets JavaScript. It is designed to emit JavaScript code which is compatible with the advanced compilation mode of the Google Closure optimizing compiler.
  • Kotlin, a statically-typed language that also compiles to Java byte code.
  • JavaScript And Java.

    A common misconception is that JavaScript is similar or closely related to Java. It is true that both have a C-like syntax (the C language being their most immediate common ancestor language). They also are both typically sand boxed (when used inside a browser), and JavaScript was designed with Java's syntax and standard library in mind. In particular, all Java keywords were reserved in original JavaScript, JavaScript's standard library follows Java's naming conventions, and JavaScript's Math and Date objects are based on classes from Java 1.0, but the similarities end there.
    The differences between the two languages are more prominent than their similarities. Java has static typing, while JavaScript's typing is dynamic. Java is loaded from compiled byte code, while JavaScript is loaded as human-readable source code. Java's objects are class-based, while JavaScript's are prototype-based. Finally, Java did not support functional programming until Java 8, while JavaScript does, as it contains many features based on Scheme.

SHARE THIS

Author:

Previous Post
Next Post