Presentation is loading. Please wait.

Presentation is loading. Please wait.

+ 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.

Similar presentations


Presentation on theme: "+ 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."— Presentation transcript:

1 + Java vs. Javascript Jessi Style

2 + Java Compiled Can stand on its own Written once, run anywhere Two-stage debugging Java is an Object Oriented Programming (OOP) language created by James Gosling of Sun Microsystems

3 + Five Primary Goals It should be "simple, object-oriented and familiar” It should be "robust and secure” It should be "architecture-neutral and portable” It should execute with "high performance” It should be "interpreted, threaded, and dynamic"

4 + Syntax Derived mainly from C++ Source files must be named after the public class they contain The compiler will generate a class file for each class defined in the source file The keyword public denotes that a method can be called from code in other classes The keyword static indicates that the method is associated only with the class and not with any specific instance of that class. The keyword void indicates that the main method does not return any value to the caller class HelloWorldApp { public static void main(String[] args) { System.out.println("Hello World!"); // Display the string. } class HelloWorldApp { public static void main(String[] args) { System.out.println("Hello World!"); // Display the string. }

5 + Javascript Most commonly used as part of web browsers Also being used in server-side programming, game development and the creation of desktop and mobile applications Supports much of the structured programming syntax from C Functions are objects, which have properties and methods Variables can be defined using var JavaScript is a scripting language that was created by Netscape, originally known as LiveScript

6 + Javascript Interpreted Must be placed inside an HTML document Different browsers Runtime-only debugging

7 + Similarities Object Oriented languages Both can run in a browser Both can run on a server Both are influenced by the programming community Both have libraries and frameworks

8 + Object Oriented Programming Language model organized around objects rather than actions Terminology- Class: Defines the characteristics of the Object Object: An Instance of a Class Property: An Object characteristic, such as color Method: An Object capability, such as walk Package: a namespace for organizing classes and interfaces in a logical manner Inheritance: A Class can inherit characteristics from another Class

9 + Libraries and Frameworks Java Struts Tapestry Maverick Javascript jQuery Prototype MooTools Help programmers by providing access to general and purpose- specific code that can be reused over and over again for different products

10 + Resources https://developer.mozilla.org/en- US/docs/Web/JavaScript/Introduction_to_Object- Oriented_JavaScript https://developer.mozilla.org/en- US/docs/Web/JavaScript/Introduction_to_Object- Oriented_JavaScript http://www.seguetech.com/blog/2013/02/15/java-vs- javascript http://www.seguetech.com/blog/2013/02/15/java-vs- javascript http://www.htmlgoodies.com/beyond/javascript/article.php /3470971 http://www.htmlgoodies.com/beyond/javascript/article.php /3470971 http://www.java.com/en/download/faq/java_javascript.xml

11 + Questions What is the difference between compiled and interpreted? Compiled means the code is changed into bytecode which is not readable by humans and any Java Virtual Machine can run it. Interpreted is executed in the same syntax in which it is written What is Object Oriented Programming? Object-oriented programming is a programming paradigm that represents concepts as "objects" that have data fields (attributes that describe the object) and associated procedures known as methods. How are Java and Javascript similar? Refer to slide 7


Download ppt "+ 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."

Similar presentations


Ads by Google