Saturday, June 7, 2008

What is JavaScript??

What is Javascript ?
Javascript was designed to add interactivity to HTML pages .The script is computer excutable code and usually embed directly to HTML pages. The script will execute without priliminary compilation and the main advantage is everyone can use it without purchasing license.

What is the relation between Java and Javascript ?

Java and JavaScript are entirely different lanaguages in both concept and design. Javascript copies many Java names and naming conventions . It's official name ECMA script because it is following ECMA -262 standard. Javascript is originally developed by Brendan Eich of Netscape under the name Mocha which is later renamed to Livescript and finally to Javascript. It was first introduced and deployed in the Netscape browser version 2.0B3 in December 1995.


Features
  • Structured Programming : Javascript support almost all the structural programming syntax in 'C' ( eg : if ,while,switch ..etc)
  • Dynamic Programming : Dynamic Typing (type assigning) facility is avaliable and it is heavily object-based. Object are associative arrays, that means obj.x = 5 and obj ["x"] = 5 are equivalent.
  • Functional Programming : Function - level programming is tremondously using in javascript.
  • Protype based : Javascript uses prototype instead of classes for defining object properties, including methods and inheritance. It is possible to simulate many class-based features with prototypes in Javascript.
  • Javascript can react to events : events may be from mouse or keyboard .. etc
  • Javascript can read and write HTML elements
  • Javascript can validate data in a form before it is submitting to server
  • Javascript can be used to create cookies

No comments: