Presentation is loading. Please wait.

Presentation is loading. Please wait.

JavaScript: An Analysis Michael Owen. Brief History Founded at NetScape by Brendan Eich Mocha, LiveScript, then JavaScript No apparent relation to Java.

Similar presentations


Presentation on theme: "JavaScript: An Analysis Michael Owen. Brief History Founded at NetScape by Brendan Eich Mocha, LiveScript, then JavaScript No apparent relation to Java."— Presentation transcript:

1 JavaScript: An Analysis Michael Owen

2 Brief History Founded at NetScape by Brendan Eich Mocha, LiveScript, then JavaScript No apparent relation to Java Embedded in HTML Interpreted language Microsoft’s version is Jscript Standardized in Nov. 1996

3 Data Types Only three primitive types –String –Number –Boolean All numbers are stored as floating point numbers Variables are not explicitly declared

4 Object-Oriented Support Prototype-oriented programming Everything but primitive types are considered objects Objects seem hidden within the code Arrays are dynamic which can be dangerous Fully supports inheritance, encapsulation, and polymorphism

5 Subprograms Functions are treated as objects but act the same way you’d expect Parameters are more like guidelines Can call functions recursively Can declare functions within functions

6 Readability of JavaScript Easy to read if familiar with Java or C++ Suffers a bit since variables are never declared with a type Orthogonality is high with only three primitive data types Can perform any operation between any two data types

7 Writability of JavaScript Only a few data types to learn Don’t need to worry about declarations No type checking Objects are a little convoluted Easy to write, but at what cost?

8 Reliability of JavaScript Suffers due to lack of type checking Really depends on what purpose the code is for Better used for less important tasks

9 Cost of JavaScript Very small if the team is already familiar with Java or C++ Does not need to compile Does not require a lot of system resources

10 Bottom Line Overall, a very good language Does a lot of things right Does one thing very wrong


Download ppt "JavaScript: An Analysis Michael Owen. Brief History Founded at NetScape by Brendan Eich Mocha, LiveScript, then JavaScript No apparent relation to Java."

Similar presentations


Ads by Google