Platinum Sponsor JavaScript: the assembly language of the web Kito D. Mann Principal Consultant Virtua, Inc.

Slides:



Advertisements
Similar presentations
Designing a Program & the Java Programming Language
Advertisements

INFM 603: Information Technology and Organizational Context Jimmy Lin The iSchool University of Maryland Thursday, September 19, 2013 Session 3: JavaScript.
JSF 2.2 in Action Kito D. Mann Principal Consultant.
Client Side Programming Using Java Applet Outcomes: You will be expected to know: – Java Applets and HTML file; –bytecode and platform independent programs;
North Shore.NET User Group Our Sponsors. North Shore.NET User Group Check out our new web site Next Meeting
Slides prepared by Rose Williams, Binghamton University Chapter 1 Getting Started 1.1 Introduction to Java.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
LBSC 690 Session #10 Programming, JavaScript Jimmy Lin The iSchool University of Maryland Wednesday, November 5, 2008 This work is licensed under a Creative.
LBSC 690: Session 10 Programming, JavaScript Jimmy Lin College of Information Studies University of Maryland Monday, November 12, 2007.
1 Programming Languages Translation  Lecture Objectives:  Be able to list and explain five features of the Java programming language.  Be able to explain.
CS 153: Concepts of Compiler Design August 25 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
COMP 14: Intro. to Intro. to Programming May 23, 2000 Nick Vallidis.
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
UNIT4 BUSINESS ANALYTICS. page WHAT IS THE PRODUCT? 2 A business intelligence tool kit, specializing in Coporate Performance Management An application.
C PROGRAMMING LECTURE C-language Computer Fundamentals.
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
01 Introduction to Java Technology. 2 Contents History of Java What is Java? Java Platforms Java Virtual Machine (JVM) Java Development Kit (JDK) Benefits.
Java Software Solutions Lewis and Loftus Chapter 2 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Software Concepts -- Introduction.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
JavaScript CMPT 281. Outline Introduction to JavaScript Resources What is JavaScript? JavaScript in web pages.
+ 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.
Philly.NET Hands-on Labs JAVASCRIPT SERIES. July 9: JavaScript Syntax Visual Studio ◦Projects ◦Editors ◦Debugging ◦Script blocks ◦Minification and bundling.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
CIS 199 Test 01 Review. Computer Hardware  Central Processing Unit (CPU)  Brains  Operations performed here  Main Memory (RAM)  Scratchpad  Work.
Computing with C# and the.NET Framework Chapter 1 An Introduction to Computing with C# ©2003, 2011 Art Gittleman.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
JSF 2.2 Deep Dive Kito D. Mann Principal Consultant.
Programming language A programming language is an artificial language designed to communicate instructions to a machine,languageinstructionsmachine particularly.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
1 Computer Systems -- Introduction  Chapter 1 focuses on:  the structure of a Java application  basic program elements  preparing and executing a program.
Introduction to Computer Systems and the Java Programming Language.
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Chapter 1 Section 1.1 Introduction to Java Slides prepared by Rose Williams, Binghamton University Kenrick Mock, University of Alaska Anchorage.
Chapter 1: Introduction Java Programming Language How the Java Virtual Machine Works (compiling, etc…) Update by: Dan Fleck Coming up: The Java Programming.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
JavaScript Syntax, how to use it in a HTML document
J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program Design, Second Edition Second Edition D.S. Malik D.S. Malik.
JAVA Programming “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
Low-res screenshot via Wikipedia. LEGO Death Star stock product photo.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
 Programming - the process of creating computer programs.
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
introductory lecture on java programming
Rich Internet Applications 2. Core JavaScript. The importance of JavaScript Many choices open to the developer for server-side Can choose server technology.
Expect the Unexpected Kito D. Mann Principal Consultant.
Introduction to Javascript. What is javascript?  The most popular web scripting language in the world  Used to produce rich thin client web applications.
Google Web Toolkit for Mobile Applications Development INGENUITY AT ITS BEST……………….
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 15: Java Basics Fundamentals of Web Programming.
Introduction to 1. What is Java ? Sun Microsystems Java is a programming language and computing platform first released by Sun Microsystems in The.
JAVA TRAINING IN NOIDA. JAVA Java is a general-purpose computer programming language that is concurrent, class-based, object-oriented and specifically.
Programming Languages Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
Kito D. Mann Principal Consultant Advanced PrimeFaces.
First appeared Features Popular uses Basic This language emphasises on ease of use, allowing general purpose programming to those with a small amount of.
ANGULAR 2. JavaScript is a high-level, dynamic, untyped, and interpreted programming language. JavaScript was originally developed in May 1995 by Brendan.
Introduction CMSC 202 Fall Instructors Mr. Ryan Bergeron – Lecture Section 01 Tues/Thu 1:00 – 2:15 am, Sondheim 111 – Lecture Section 04 Tues/Thu.
The language focusses on ease of use
The need for Programming Languages
Introduction to TypeScript
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.
Development of Internet Applications jQuery, TypeScript, LESS
CSCI-235 Micro-Computer Applications
Internet and Java Foundations, Programming and Practice
C# and the .NET Framework
CMPE419 Mobile Application Development
Java Programming Introduction
Chap 1. Getting Started Objectives
Introduction to TypeScript
Chap 4. Programming Fundamentals
Modern Front-end Development with Angular JS 2.0
Presentation transcript:

Platinum Sponsor JavaScript: the assembly language of the web Kito D. Mann Principal Consultant Virtua, Inc.

Kito D. Principal Consultant at Virtua Training, consulting, architecture, mentoring, Official US PrimeFaces partner Author, JavaServer Faces in Action Founder, JSF Central Co-host, Enterprise Java Newscast Copyright (C) 2014 Virtua, Inc. All rights reserved.

Kito D. Internationally recognized speaker JavaOne, JavaZone, Devoxx, NFJS, TSSJS, etc. JCP Member JSF, CDI, JSF Portlet Bridge, Portlets Copyright (C) 2014 Virtua, Inc. All rights reserved.

JavaScript: the assembly language of the web Copyright (C) 2014 Virtua, Inc. All rights reserved.

An assembly language is a low-level programming language for a computer, or other programmable device, in which there is a very strong (generally one-to-one) correspondence between the language and the architecture's machine code instructions. Each assembly language is specific to a particular computer architecture, in contrast to most high-level programming languages, which are generally portable across multiple architectures, but require interpreting or compiling. - Wikipedia Copyright (C) 2014 Virtua, Inc. All rights reserved.

computer architecture: browser Copyright (C) 2014 Virtua, Inc. All rights reserved.

machine instructions: JavaScript Copyright (C) 2014 Virtua, Inc. All rights reserved.

“JavaScript is the Assembly Langauge for the Web” was originally posted in 2011 by Scott Hanselman Copyright (C) 2014 Virtua, Inc. All rights reserved.

“I said ‘JS is the x86 of the web’ a couple of years ago [likely at JSConf], but I can't claim it's original. The point is JS is about as low as we can go. But it also has higher-level facilities.” - Brendan Eich (inventor of JavaScript) Copyright (C) 2014 Virtua, Inc. All rights reserved.

“I think it is a little closer to the mark to say that JavaScript is the VM of the web. We had always thought that Java's JVM would be the VM of the web, but it turns out that it's JavaScript. JavaScript's parser does a more efficient job of providing code security than the JVM's bytecode verifier. JavaScript did a better job of keeping the write once, run everywhere promise, perhaps because it works at a higher level, avoiding low level edge cases. And then Turing takes care of the rest of it.” - Dougas Crockford (inventor or JSON) Copyright (C) 2014 Virtua, Inc. All rights reserved.

proliferation of libraries and tools core libraries: jQuery, Prototype, MooTools, Dojo, Underscore.js,... module systems: Require.js, Browserfly, … build tools: Grunt, Gulp, … Copyright (C) 2014 Virtua, Inc. All rights reserved.

proliferation of libraries and tools app frameworks and templating: Ember.js, Agular.js, Backbone.js, Mustache.js, Knockout.js, Ext JS, Kendo UI, Polymer, … testing: Mocha, QUnit, Jasmine component suites: jQuery UI, ExtJS, YUI, Bootstrap, wijmo, Kendo UI, IgniteUI, PrimeUI… Copyright (C) 2014 Virtua, Inc. All rights reserved.

so, we should all just write JavaScript, right? Copyright (C) 2014 Virtua, Inc. All rights reserved.

we can target the browser architecture without writing JavaScipt. Copyright (C) 2014 Virtua, Inc. All rights reserved.

A source-to-source compiler, transcompiler, or transpiler is a type of compiler that takes the source code of a programming language as its input and outputs the source code into another programming language. A source-to-source compiler translates between programming languages that operate at approximately the same level of abstraction, while a traditional compiler translates from a higher level programming language to a lower level programming language. For example, a source-to-source compiler may perform a translation of a program from Pascal to C. - Wikipedia transpiler Copyright (C) 2014 Virtua, Inc. All rights reserved.

transpiler benefits use a “better” language leverage popular JS tools (sometimes) same language as back-end (sometimes) Copyright (C) 2014 Virtua, Inc. All rights reserved.

transpilers and related tools TypeScript GWT / Errai CoffeeScript Dart ClojureScript Scala.js Copyright (C) 2014 Virtua, Inc. All rights reserved.

transpilers and related tools Dart Ceylon HTML APIs via Java (DukeScript, Knockout4Java) Many, many more Copyright (C) 2014 Virtua, Inc. All rights reserved.

we’ve got a transpiler for that C/C++ Groovy Ruby Java Scala C#/F#/.NET Smalltalk Python Perl Haskel Erlang Lisp/Scheme OCaml BASIC Go Copyright (C) 2014 Virtua, Inc. All rights reserved.

Java bytecode -> JavaScript TeaVM Bck2Brwsr Doppio BicaJVM Copyright (C) 2014 Virtua, Inc. All rights reserved.

all of these projects are open source Copyright (C) 2014 Virtua, Inc. All rights reserved.

ok. details, please. Copyright (C) 2014 Virtua, Inc. All rights reserved.

CoffeeScript # Assignment: number = 42 opposite = true # Conditions: number = -42 if opposite # Functions: square = (x) -> x * x # Arrays: list = [1, 2, 3, 4, 5] Copyright (C) 2014 Virtua, Inc. All rights reserved.

CoffeeScript # Objects: math = root: Math.sqrt square: square cube: (x) -> x * square x # Splats: race = (winner, runners...) -> print winner, runners # Existence: alert "I knew it!" if elvis? # Array comprehensions: cubes = (math.cube num for num in list) Copyright (C) 2014 Virtua, Inc. All rights reserved.

CoffeeScript Classes, Inheritance, and Super Lexical Scoping and Variable Safety Embedded JavaScript String Interpolation, Block Strings, and Block Comments Golden rule: “it’s just JavaScript” Copyright (C) 2014 Virtua, Inc. All rights reserved.

TypeScript class Student { fullname : string; constructor(public firstname, public middleinitial, public lastname) { this.fullname = firstname + " " + middleinitial + " " + lastname; } interface Person { firstname: string; lastname: string; } Copyright (C) 2014 Virtua, Inc. All rights reserved.

TypeScript function greeter(person : Person) { return "Hello, " + person.firstname + " " + person.lastname; } var user = new Student("Jane", "M.", "User"); document.body.innerHTML = greeter(user); Copyright (C) 2014 Virtua, Inc. All rights reserved.

TypeScript Superset of JavaScript Optionally typed Declaration files can apply types to existing libraries Type inference Copyright (C) 2014 Virtua, Inc. All rights reserved.

TypeScript Modules Generics Mixins Uses ECMAScript 6 draft when possible Released by Microsoft in late 2012 Copyright (C) 2014 Virtua, Inc. All rights reserved.

Dart // Import a class from a library. import 'dart:math' show Random; // The app starts executing here. void main() { // Print a new object's value. Chain method calls. print(new Die(n: 12).roll()); } Copyright (C) 2014 Virtua, Inc. All rights reserved.

Dart class Die { // Define a class variable. static Random shaker = new Random(); int sides, value; // Define a method using shorthand syntax. String toString() => '$value'; Copyright (C) 2014 Virtua, Inc. All rights reserved.

Dart // Define a constructor. Die({int n: 6}) { if (4 <= n && n <= 20) { sides = n; } else { throw new ArgumentError(/* */); } int roll() { return value = shaker.nextInt(sides); } Copyright (C) 2014 Virtua, Inc. All rights reserved.

Dart Optionally typed Functions Interfaces Mixins Libraries Generics Copyright (C) 2014 Virtua, Inc. All rights reserved.

Dart Metadata (annotations) Angular.js integration Polymer integration Transpiles to JavaScript or runs in Dartium Stand-alone command-line VM Maintained by Google Copyright (C) 2014 Virtua, Inc. All rights reserved.

HTML APIs for Java demo Copyright (C) 2014 Virtua, Inc. All rights reserved.

HTML APIs via Java Heavily annotation-driven Libraries for common browser functionality Integrates Knockout.js with Java NetBeans subproject Runs on TeaVM or Bck2Brwsr Copyright (C) 2014 Virtua, Inc. All rights reserved.

bottom line: JavaScript is an assembly language for modern web applications. Copyright (C) 2014 Virtua, Inc. All rights reserved. choose your tools wisely