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

Slides:



Advertisements
Similar presentations
The Web Wizards Guide To JavaScript Chapter 1 JavaScript Basics.
Advertisements

Programming Languages and Paradigms
Web Application Development Muhammad Ali Versonic Pte Asher Imtiaz Forman Christian College.
1 CSC 551: Web Programming Spring 2004 client-side programming with JavaScript  scripts vs. programs  JavaScript vs. JScript vs. VBScript  common tasks.
Names and Bindings.
Portability and Safety Mahdi Milani Fard Dec, 2006 Java.
Lua By: Michael Coffman Peter Sussman. History Lua means ‘moon’ in Portuguese First appeared in 1993 Created by Roberto Ierusalimschy, Luiz Henrique de.
The Fundamental Rule for Testing Methods Every method should be tested in a program in which every other method in the testing program has already been.
Chapter 1: Preliminaries
1 Javascrbipt Intro Javascript (or js) is a programming language. Interpreted, not compiled. Not the same as java, but, similar. Use tags to use. Object-oriented.
CS 330 Programming Languages 10 / 16 / 2008 Instructor: Michael Eckmann.
12-Jun-15 JavaScript Language Fundamentals I. 2 About JavaScript JavaScript is not Java, or even related to Java The original name for JavaScript was.
1 Owais Mohammad Haq Department of Computer Science Eastern Michigan University April, 2005 Java Script.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
Javascript Client-side scripting. Up to now  We've seen a little about how to control  content with HTML  presentation with CSS  Javascript is a language.
Kevin Reuter & Brian Guthrie.  Multi-paradigm  Prototype based objects  Dynamic, weak typing.
Reasons to study concepts of PL
ISBN Chapter 1 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Motivation Programming Domains.
CS 354 Overview. Copyright © 2007 Addison-Wesley. All rights reserved. 1–2 Course Topics What is a programming language? What features do programming.
Encapsulation by Subprograms and Type Definitions
XP 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial 10.
ISBN Lecture 01 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Lecture 01 Topics Motivation Programming.
ISBN Chapter 1 Topics Motivation Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language.
J avaScript J JP P resentation Jeff Watson Web & Internet Programming Group.
MT311 Java Application Programming and Programming Languages Li Tak Sing ( 李德成 )
+ Java vs. Javascript Jessi Style. + Java Compiled Can stand on its own Written once, run anywhere Two-stage debugging Java is an Object Oriented Programming.
Overview. Copyright © 2006 The McGraw-Hill Companies, Inc. Chapter 1 Overview A good programming language is a conceptual universe for thinking about.
CS 355 – Programming Languages
Introduction to JavaScript Kirkwood Continuing Education © Copyright 2014, Fred McClurg All Rights Reserved.
PHP TUTORIAL. HISTORY OF PHP  PHP as it's known today is actually the successor to a product named PHP/FI.  Created in 1994 by Rasmus Lerdorf, the very.
CS 363 Comparative Programming Languages
5-1 Chapter 5: Names, Bindings, Type Checking, and Scopes Variables The Concept of Binding Type Checking Strong Typing Type Compatibility Scope and Lifetime.
An Overview of ActionScript The Powerful Scripting Language of Macromedia Flash.
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
Michael Musick CSC 415. A Brief History of bash  Language was named in tribute to Steve Bourne’s shell  Brian Fox wrote the first versions of bash 
XP Tutorial 10New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with JavaScript Creating a Programmable Web Page for North Pole.
Topic: An Introduction to JavaScript - from Beginning JavaScript by Wilton (WROX)
PHP By Sergio Rodriguez By Sergio Rodriguez. PHP G PHP: Hypertext Preprocessor G Scripting language G PHP: Hypertext Preprocessor G Scripting language.
Lecture 9 The Basics of JavaScript Boriana Koleva Room: C54
JavaScript Justin Skinner Programming Languages. JavaScript JavaScript is not Java nor a subset But JavaScript does share the C-family syntax with Java.
ISBN CS 354 Preliminaries. Copyright © 2006 Addison-Wesley. All rights reserved.1-2 Course Topics What is a programming language? What features.
4.4 JavaScript (JS) Deitel Ch. 7, 8, 9, JavaScript & Java: Similarities JS (JavaScript) is case-sensitive Operators –arithmetic: unary +, unary.
Javascript. What is JavaScript? Scripting (interpreted) language designed for the web Beware: JavaScript is case sensitive.
XP Tutorial 10New Perspectives on HTML and XHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial.
An Introduction to JavaScript By: John Coliton Tuesday, November 10, 1998 Center for Teaching and Learning.
Java Basics Opening Discussion zWhat did we talk about last class? zWhat are the basic constructs in the programming languages you are familiar.
© 2000 – All Rights Reserved - Page 1 Introduction to JavaScript Programming Part One.
Concepts of programming languages Chapter 5 Names, Bindings, and Scopes Lec. 12 Lecturer: Dr. Emad Nabil 1-1.
How to execute Program structure Variables name, keywords, binding, scope, lifetime Data types – type system – primitives, strings, arrays, hashes – pointers/references.
Duke CPS From C++ to Java l Java history: Oak, toaster-ovens, internet language, panacea l What it is ä O-O language, not a hybrid (cf. C++)
“The world’s most misunderstood language has become the world’s most popular programming language” Akshay Arora
MT311 Java Application Development and Programming Languages Li Tak Sing ( 李德成 )
JavaScript Katie Fowle November 15, History Brendan Eich at Netscape, 1995 Need for interactivity in web pages Mocha, LiveWire, LiveScript, then.
Ada, Scheme, R Emory Wingard. Ada History Department of Defense in search of high level language around Requirements drafted for the language.
Chapter 1: Preliminaries Lecture # 2. Chapter 1: Preliminaries Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation.
XP Tutorial 10New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties.
The Web Wizard’s Guide To DHTML and CSS Chapter 2 A Review of CSS2 and JavaScript.
CSCE 343 – Programming Language Concepts Welcome!.
JavaScripts.
Basic 1960s It was designed to emphasize ease of use. Became widespread on microcomputers It is relatively simple. Will make it easier for people with.
“Under the hood”: Angry Birds Maze
Introduction to Web Assembly
Week 5 JavaScript Overview JavaScript Examples
JAVASCRIPT Pam Kahl | COM 585 | Spring 2010.
From C++ to Java Java history: Oak, toaster-ovens, internet language, panacea What it is O-O language, not a hybrid (cf. C++) compiled to byte-code, executed.
Midterm 2 review.
“Under the hood”: Angry Birds Maze
JavaScript CS 4640 Programming Languages for Web Applications
CS 4722 Computer Graphics and Multimedia Spring 2018
Reasons To Study Programming Languages
Presentation transcript:

JavaScript: An Analysis Michael Owen

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

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

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

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

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

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?

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

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

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