Tuesday, January 11, 2011

javaScript 101

8 comments:

  1. Playing around creating blog entries

    ReplyDelete
  2. Completed Task2 writing a small javaScript

    ReplyDelete
  3. Still have to complete task2, watching the videos and writing small report in this blog

    ReplyDelete
  4. Ever since its inception in 1992 by Jim Goslin, working at Sun Microsystem, javaScript has evolved into becoming the most popular and most widespread functional programming language. Needless to say that during the past twenty years the language has gone through some major growing pains which not only included name (Oak-HotHava-LiveScript-Eich-JScript-ECMAScript – javaScript), design and implementation, but also ownership changes (Sun Microsystem-Netscape-Microsoft). But still to this day javaScript is still the most miss-understood language due to some early faulty design decisions. As with all things Microsoft the company entered the fray of web development, took the current language implementation and actually did a good job of reverse engineering the language. Microsoft named their design JScript to avoid trademark issues with Sun Microsystem. Sounds very similar looking at Java and J++. Netscape was worried about Microsoft's work and applied to the European Computer Manufacturing Association to have their javaScript language rubber stamped (Standardized) but early on Microsoft dominated the standardization process and Netscape had to concede. Yet, even by doing a good reverse engineering job Microsoft carried over some of the early design flaws.

    ReplyDelete
  5. One of javaScript's key feature is load and go delivery where source code is directly deliver as text to the medium, in this case a web browser (web browsers are encoded in plain text). Another key feature is loose typing , a bad one at that. It makes programming somewhat easier but is also quite error prone. Objects as General Containers, another very brilliant feature, intended objects to be highly dynamic where new members and methods could be added at will. The next key feature, Prototypical Inheritance, class inheritance has been replaced with objects inherit directly from other objects. However for classical class style inheritance schooled developers this idea is somewhat difficult to grasp. Lambda, using functions as first class objects, is another key factor which has already been proven in other programming languages (Lisp). Last but not least, but maybe so, javaScript has no linkers, everything is contained within a single namespace, which is quite a bad design.

    ReplyDelete
  6. JavaScript also has a simple set of Number/String/Boolean/Object/Null/Undefined values and only one 64 bit floating point Number but no integers. However, performing arithmetic on floating point values are not very easy to do and require additional calculations to get the correct result. Another value is NAN which results from undefined or erroneous operations
    A number, parseInt, math functions can be used to manipulate data.
    JavaScript also supports Strings, immutable strings, which methods can operate on. There are two defined boolean values injavaScript, truthy and falsy. Wondering who came up with those names. Comparison operators are very similar to the C language and so are identifiers and comments Also, the language comes with a specific set of reserved words..

    ReplyDelete
  7. For everything else in javaScript they are objects. So, javaScript is an object oriented language and uses the same object operations, dot operator, as other object oriented languages.

    ReplyDelete