ES7. The Evolution of JavaScript

Size: px
Start display at page:

Download "ES7. The Evolution of JavaScript"

Transcription

1 ES7 The Evolution of JavaScript

2 Who is Jafar Husain? Architect of Falcor, Netflix s OSS data platform Netflix representative TC-39 Formerly worked for MS and GE

3 ES6 spec will be finalized in June 2015

4 Isn t it too early to talk about ES7?

5 No.

6 ES7 features are already starting to roll into browsers.

7 ES5 ES6 ES7

8 ES7 ES6

9 2 BIG ES7

10 #1

11 Easier Model/View Synchronization Model View

12 #2

13 Easier Async Programming pull push

14 Arrow Functions => ES6

15 Arrow Functions function(x) x { return => x + 1; function(x, y) { => return x + y; ES 5 6

16 Controller View Model

17

18 Why not natively support change notification??

19 Object.observe ES7

20 Object.observe var person = {; var changeshandler = changes => console.log(changes); Object.observe(person, changeshandler);

21 Object.observe person = { name: Dana T. Miller Miller, ; employer: Tommy's Box Store [ ] ] { "type": new", "type": update", "type": reconfigure", "type": delete", "name": name, "name": employer, oldvalue: Dana Tommy's Miller Box Store

22 Object.unobserve Object.unobserve(person, changeshandler);

23 unobserve The word you ve entered isn t in the dic2onary.

24 The Event Loop Queue Observe notification person.name = Jim ; person.age = 22; Event Handler Browser render XHR handler Timeout handler Current Task Tasks on the event loop

25 How to avoid the Notification Storm?

26 Microtasks ES6

27 Event Loop Queue + Microtasks Observe handler person.name = Jim ; person.age = 23; Event handler Browser render XHR handler Timeout handler Current Task Tasks on the event loop

28 Object.observe on Microtasks sync Model A sync Model B DOM

29 Try Object.observe

30 Object.observe

31 ES Feature Maturity Stages 0. Strawman 1. Proposal 2. Draft 3. Candidate 4. Finished

32 Maturity Stage 2: Draft Commi&ee expects the feature to be developed and included in the standard.

33 How can we make async programming easier??

34 Blocking is Easy function getstockprice(name) { var symbol = getstocksymbol(name); var price = getstockprice(symbol); return price;

35 Blocking means Pulling Data delivered in return position price = getstockprice( Devine Inc. ); pull

36 What if we want to wait instead of block??

37 Waiting means Pushing Data delivered in argument position getstockprice( Devine Inc., price => { ); push

38 The Pyramid of DOOM

39 Blocking/Pulling function getstockprice(name) { var symbol = getstocksymbol(name); var price = getstockprice(symbol); return price;

40 Waiting/Pushing function getstockprice(name, cb) { getstocksymbol(name, (error, symbol) => { if (error) { cb(error); else { getstockprice(symbol, (error, price) => { if (error) { cb(error); else { cb(price); ) )

41 Pulling and Pushing are symmetrical

42 Why must waiting be so much harder than blocking??

43 Promises ES6

44 Promises 42 X promise.then(value => {, error => { );

45 sync function getstockprice(name) { var symbol = getstocksymbol(name); var price = getstockprice(symbol); return price; async function getstockprice(name) { return getstocksymbol(name). then(symbol => getstockprice(symbol));

46 Not bad, but

47 why does waiting have to look so different than blocking??

48 sync async function getstockprice(name) { var symbol = getstocksymbol(name); var price = getstockprice(symbol); return price; function* getstockprice(name) {{ return var symbol getstocksymbol(name). = yield getstocksymbol(name); var price then(symbol = yield => getstockprice(symbol); getstockprice(symbol)); return price;

49 Generator function ES6

50 A generator function can return multiple values. done 96 23

51 Generator Functions in ES6 function* getnumbers() { yield 42; yield 32; return 19;

52 Retrieving function* results function* getnumbers() { yield 42; yield 32; return 19; > var iterator = getnumbers(); > console.log(iterator.next()); > { value: 42, done: false > console.log(iterator.next()); > { value: 32, done: false > console.log(iterator.next()); > { value: 19, done: true >

53 Iteration Consumer Producer 42 var var iterator result = = producer.iterator(); iterator.next()

54 Iteration Consumer Producer 39 var result = iterator.next()

55 Iteration Consumer Producer done var result = iterator.next()

56 How Yield Works function* function getfibonnaccisequence() { { return { next: function() { let val1 = 0, val2 let = val1 1, swap; = 0, val2 = 1, swap, state = 0; switch(state) { case 0: state = 1; yield val1; return {value: val1, done: false; case 1: state = 2; yield val2; return {value: val2, done: false; while(true) { default: swap = val1 + val2; swap = val1 + val2; val2 = swap; val2 = swap; val1 = val2; val1 = val2; yield swap; return {value: swap, done: false;

57 All ES6 collections are Iterable. ES6

58 Iterator Pattern > var iterator = [42, 39][@@iterator](); > console.log(iterator.next()); > { value: 42, done: false > console.log(iterator.next()); > { value: 39, done: false > console.log(iterator.next()); > { done: true >

59 Consuming Iterables with for..of > for(var x of [42,39,17]) { console.log(x); > 42 > 39 > 17 >

60 If generator functions return iterators

61 why aren t they called Iterator functions??

62 Iterator Generator Observer

63 A Generator is an Iterator yield value generator.next().value; throw an error return value try { generator.next(); catch(err) {... var pair = generator.next(); if (pair.done) alert(pair.value); pull

64 A Generator is an Observer receive data generator.next(5); receive an error generator.throw( fail ); receive return value generator.return(5); push

65 Iteration only allows data to flow one-way. done 96 23

66 Generators allow feedback. done

67 Waiting with Async Iteration function* getstockprice(name) { var symbol = yield getstocksymbol(name); var price = yield getstockprice(symbol); return price; > spawn(getstockprice( Pfizer )). then( > price => console.log(price), error => console.error(error));

68 Async Iteration Consumer Producer PFE result.then(data var generator var = = getstockprice( Pfizer ); => generator.next(), error => ) var symbol = yield getstocksymbol( Pfizer );

69 Async Iteration Consumer Producer PFE result.then(data var = generator.next( PFE ) =>, error => ) var symbol price = = yield PFE getstockprice(symbol); getstocksymbol( Pfizer );

70 Async Iteration Consumer Producer done var result = generator.next( ) var return price price = yield getstockprice(symbol);

71 Asynchronous Iteration function* getstockprice(name) { var symbol = JNJ ; yield getstocksymbol(name); symbolpromise; var price = yield ; getstockprice(symbol) pricepromise; return price; function spawn(generator) { return new Promise((accept, reject) => { var onresult = lastpromiseresult JNJ => { var {value, done = {value: generator.next(lastpromiseresult); symbolpromise, , pricepromise, done: JNJ true; done: false; if (!done) { value.then(onresult, reject); else accept(value); ; onresult(); ); producer consumer > spawn(getstockprice( Johnson and Johnson )).then(console.log); >

72 Waiting with with Task.js function* getstockprice(name) { var symbol = yield getstocksymbol(name); var price = yield getstockprice(symbol); return price; var result = spawn(getstockprice.bind(null, Pfizer )); result.then(console.log, console.error);

73 Get Task.js

74 Why should easy waiting require a library??

75 Async Functions ES7

76 Async Functions in ES7 function* async function getstockprice(name) { { var symbol = yield await getstocksymbol(name); var price = yield await getstockprice(symbol); return price; var result = spawn(getstockprice.bind(null, ( PFE )); result.then(console.log, console.error);

77 sync async function getstockprice(name) { var symbol = getstocksymbol(name); var price = getstockprice(symbol); return price; async function getstockprice(name) { var symbol = await getstocksymbol(name); var price = await getstockprice(symbol); return price;

78 Symmetrical support for push and pull functions. ES7

79 Async Functions

80 Try Async Functions

81 The await keyword makes it easy to wait on an async value

82 but what if you need to wait on an async stream of values??

83 Waiting on a stream with for on async function getnextpricespike(stock, threshold) { var delta, oldprice, price; for(var price on new WebSocket( /prices/" + stock)) { if (oldprice == null) { oldprice = price; else { delta = Math.abs(price - oldprice); oldprice = price; if (delta > threshold) { return { price: price, oldprice: oldprice ; > getnextpricespike( JNJ,2.50).then(diff => console.log(diff)); > { price: , oldprice:

84 Unfortunately there s a problem.

85 The web has no standard Observable interface.

86 Observation Iteration Consumer Producer Consumer

87 Observation Producer Consumer done b observer.next(39) observer.next(42) observer.return() producer.observer(observer);

88 The Web s Many Observable APIs DOM Events Websockets Server-sent Events Node Streams Service Workers jquery Events XMLHttpRequest setinterval push

89 Introducing Observable interface Iterable { Generator iterator(void); interface Observable { void observer(generator);

90 Observer pattern > nums().observer({ next(v) { console.log(v);, ); return(v) { console.log( done: + v); throw (e) { console.error(e);, > 1 > 2 > done: 3

91 Adding Sugar to Observation nums().observer({ next(v) { console.log(v);, return(v) { console.log( done: + v); ); throw (e) { console.error(e);, nums(). foreach(v => console.log(v)). // next then( v => console.log( done: ), // return e => console.error(e)); // throw (async function writenums() { try { for(var v on nums()) { console.log(v); catch(e) { console.error(e); console.log( done ); )();

92 Push APIs implement Observable DOM Events Websockets Server-sent Events Node Streams Service Workers jquery Events XMLHttpRequest setinterval Observable

93 Implementing Observable WebSocket.prototype.observer = function(generator) { var cleanup, message = v => { var pair = generator.next(v); if (pair.done) cleanup();, error = e => { cleanup(); generator.throw(e);, close = v => { cleanup(); generator.return(v); ; ; cleanup = () => { this.removeeventlistener( message, message); this.removeeventlistener( error, error); this.removeeventlistener( close, close); ; this.addeventlistener( message, message); this.addeventlistener( error, error); this.addeventlistener( close, close);

94 Consuming Observables in ES7 > (async function() { for(var member on new WebSocket( /signups )){ console.log(json.stringify(member)); ()); > { firstname: Tom > { firstname: John > { firstname: Micah > { firstname: Alex > { firstname: Yehuda > { firstname: Dave > { firstname: Ben

95 Observable Composition async function drag(element) { var downs = Observable.fromEvent(element, mousedown ); var ups = Observable.fromEvent(document, mouseup ); var moves = Observable.fromEvent(document, mousemoves ); var drags = downs. map(down => moves.takeuntil(ups)). flatten(); for(var drag on drags) { element.style.top = drag.offsety; element.style.left = drag.offsetx;

96 Try Observable

97 If an async function returns a Promise, and a function* returns an Iterator

98 what does an async function* return??

99 Function Types in ES7 Synchronous Asynchronous function T Promise function* Iterator

100 A function* returns multiple values. done 96 23

101 An async function pushes one value. 96

102 An async function* pushes multiple values. done 96 23

103 An async generator function returns an Observable. b

104 Async generator functions b ES7

105 async function* in action async function* getpricespikes(stock, threshold) { var delta, oldprice, price; for(var price on new WebSocket( /prices/" + stock)) { if (oldprice == null) { oldprice = price; else { delta = Math.abs(price - oldprice); oldprice = price; if (delta > threshold) { yield { price: price, oldprice: oldprice ;

106 Consuming Observables in ES7 > async function printspikes() { ()); for(var spike on getpricespikes( JNJ, 2.00)) { console.log(pricespike); > { oldprice: , price: > { oldprice: , price: > { oldprice: , price: > { oldprice: , price: > { oldprice: , price: > { oldprice: , price: > { oldprice: , price:

107 ES7 should have symmetrical support for push and pull streams.

108 How can we make async I/O easier??

109 Sync I/O is easy with function* function* getstocks() { var reader = new FileReader( stocks.txt ); try { while(!reader.eof) { var line = reader.readline(); yield JSON.parse(line); finally { reader.close(); function writestockinfos() { var writer = new FileWriter( stocksandprices.txt ); try { for(var name of getstocks()) { var price = getstockprice(name); writer.writeline(json.stringify({name, price)); finally { writer.close(); producer consumer

110 Async I/O with async function* async function* getstocks() { var reader = new AsyncFileReader( stocks.txt ); try { while(!reader.eof) { var line = await reader.readline(); await yield JSON.parse(line); finally { await reader.close(); async function writestockinfos() { var writer = new AsyncFileWriter( stocksandprices.txt ); try { for(var name on getstocks()) { var price = await getstockprice(name); await writer.writeline(json.stringify({name, price)); finally { await writer.close(); producer consumer

111 Async Observation Producer Consumer done b

112 Async IO with async function* async function* getstocks() { var reader = new AsyncFileReader( stocks.txt ); try { while(!reader.eof) { var line = await reader.readline(); await yield JSON.parse(line); finally { await reader.close(); promise returned from async next fn async function writestockinfos() { var writer = new AsyncFileWriter( stocksandprices.txt ); try { for(var await getstocks.foreach(async name on getstocks()) { function(name) { var price = await getstockprice(name); await writer.writeline(json.stringify({name, price)); ); finally { await writer.close();

113 Async IO with async function* async function* getstocks() { var reader = new AsyncFileReader( stocks.txt ); try { while(!reader.eof) { var line = await reader.readline(); await yield JSON.parse(line); finally { await reader.close(); promise returned from async next fn async function writestockinfos() { var writer = new AsyncFileWriter( stocksandprices.txt ); try { await getstocks.foreach(async function(name) { var price = await getstockprice(name); await writer.writeline(json.stringify({name, price)); ); finally { await writer.close();

114 Function Types in ES7 Synchronous Asynchronous function T Promise function* Iterator Observable

115 More Info on async function*

116 async function*

117 ES Maturity Stage 0: Strawman Allow for feedback

118 Resources esdiscuss.org

119 Questions??

120 Observer Pattern with Events > document.addeventlistener( mousemove, function next(e) { console.log(e); ); > { clientx: 425, clienty: 543 > { clientx: 450, clienty: 558 > { clientx: 455, clienty: 562 > { clientx: 460, clienty: 743 > { clientx: 476, clienty: 760 > { clientx: 476, clienty: 760 > { clientx: 476, clienty: 760

121 Observer Pattern with setinterval > var counter = 0; setinterval(function next(e) { > 0 > 1 > 2 > 3 > 4 > 5 > 6 > 7 console.log(counter++);, 20);

122 The decision to push or pull is orthogonal to most algorithms. pull push

123 Iteration is Pull var result = generator.next(); pull

124 Observation is Push b generator.next(5); push

125 Iteration and Observation are symmetrical

Async Generators. Composable Async Programming in ES7

Async Generators. Composable Async Programming in ES7 Async Generators Composable Async Programming in ES7 ES6 has Generator Func

More information

Housekeeping. You can download a copy of these slides by clicking on the Resources widget in the bottom dock.

Housekeeping. You can download a copy of these slides by clicking on the Resources widget in the bottom dock. Housekeeping Welcome to today s ACM Webinar. The presentation starts at the top of the hour. If you are experiencing any problems/issues, refresh your console by pressing the F5 key on your keyboard in

More information

who "name": "ShihChi Huang", "work": "mobile Netflix", "meta": github/npm/twitter"

who name: ShihChi Huang, work: mobile Netflix, meta: github/npm/twitter RxJS for f2e who { } "name": "ShihChi Huang", "work": "mobile engineer @ Netflix", "meta": "huang47 @ github/npm/twitter" async is hard sync // value is immediately available function getvaluesync(value)

More information

Asynchronous Programming in Javascript, Part 2. CSCI 5828: Foundations of Software Engineering Lecture 19 10/25/2016

Asynchronous Programming in Javascript, Part 2. CSCI 5828: Foundations of Software Engineering Lecture 19 10/25/2016 Asynchronous Programming in Javascript, Part 2 CSCI 5828: Foundations of Software Engineering Lecture 19 10/25/2016 1 Goals Discussed asynchronous programming in Javascript in Lecture 18 The gap between

More information

COURSE OUTLINE MOC 20480: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3

COURSE OUTLINE MOC 20480: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3 COURSE OUTLINE MOC 20480: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3 MODULE 1: OVERVIEW OF HTML AND CSS This module provides an overview of HTML and CSS, and describes how to use Visual Studio 2012

More information

ECMAScript 2015 The Future of JavaScript is Now!

ECMAScript 2015 The Future of JavaScript is Now! ECMAScript 2015 The Future of JavaScript is Now! Tom Van Cutsem SPLASH-I 2015 @tvcutsem Talk Outline Part I: JavaScript s origins, and the long road to ECMAScript 6 Part II: a brief tour of ECMAScript

More information

Sebastiano

Sebastiano Sebastiano Armeli @sebarmeli http://html5hub.com/wp-content/uploads/2013/11/es6-hiway-sign.png Sebastiano Armeli @sebarmeli ES6 History 199 199 199 199 199 200 200 5 6 7 8 9 0 3 JSScript ECMA-262 Ed.2

More information

AJAX. Lab. de Bases de Dados e Aplicações Web MIEIC, FEUP 2010/11. Sérgio Nunes

AJAX. Lab. de Bases de Dados e Aplicações Web MIEIC, FEUP 2010/11. Sérgio Nunes AJAX Lab. de Bases de Dados e Aplicações Web MIEIC, FEUP 2010/11 Sérgio Nunes Server calls from web pages using JavaScript call HTTP data Motivation The traditional request-response cycle in web applications

More information

ECMAScript 2015 and beyond The Future of JavaScript is Now!

ECMAScript 2015 and beyond The Future of JavaScript is Now! ECMAScript 2015 and beyond The Future of JavaScript is Now! Tom Van Cutsem JS.BE Meetup @tvcutsem Talk Outline Part I: 20 years of JavaScript (or, the long road to ECMAScript 6) Part II: a brief tour of

More information

Frontend II: Javascript and DOM Programming. Wednesday, January 7, 15

Frontend II: Javascript and DOM Programming. Wednesday, January 7, 15 6.148 Frontend II: Javascript and DOM Programming Let s talk about Javascript :) Why Javascript? Designed in ten days in December 1995! How are they similar? Javascript is to Java as hamster is to ham

More information

5. Strict mode use strict ; 6. Statement without semicolon, with semicolon 7. Keywords 8. Variables var keyword and global scope variable 9.

5. Strict mode use strict ; 6. Statement without semicolon, with semicolon 7. Keywords 8. Variables var keyword and global scope variable 9. Javascript 1) Javascript Implementation 1. The Core(ECMAScript) 2. DOM 3. BOM 2) ECMAScript describes 1. Syntax 2. Types 3. Statements 4. Keywords 5. Reserved words 6. Operators 7. Objects 3) DOM 1. Tree

More information

Part I: Introduction to Functions

Part I: Introduction to Functions Computer Science & Engineering 120 Learning to Code Organizing Code I Functions Part I: Introduction to Functions Christopher M. Bourke cbourke@cse.unl.edu Topic Overview Functions Why Functions? Defining

More information

DECOUPLING PATTERNS, SERVICES AND CREATING AN ENTERPRISE LEVEL EDITORIAL EXPERIENCE

DECOUPLING PATTERNS, SERVICES AND CREATING AN ENTERPRISE LEVEL EDITORIAL EXPERIENCE DECOUPLING PATTERNS, SERVICES AND CREATING AN ENTERPRISE LEVEL EDITORIAL EXPERIENCE Who we are and Why we are here? Saurabh Chugh Started Drupal journey in 2010 with Drupal 6, long journey with Drupal

More information

JavaScript. The Bad Parts. Patrick Behr

JavaScript. The Bad Parts. Patrick Behr JavaScript The Bad Parts Patrick Behr History Created in 1995 by Netscape Originally called Mocha, then LiveScript, then JavaScript It s not related to Java ECMAScript is the official name Many implementations

More information

MANAGING ASYNCHRONY. An Application Perspective

MANAGING ASYNCHRONY. An Application Perspective MANAGING ASYNCHRONY An Application Perspective TYPES OF ASYNCHRONY DETERMINISTIC ORDER. (I/O) NON-DETERMINISTIC ORDER. (USER EVENTS) THESE ARE DIFFERENT. Because both are "events", we reach for the same

More information

1.00/ Introduction to Computers and Engineering Problem Solving. Final / December 13, 2004

1.00/ Introduction to Computers and Engineering Problem Solving. Final / December 13, 2004 1.00/1.001 Introduction to Computers and Engineering Problem Solving Final / December 13, 2004 Name: Email Address: TA: Section: You have 180 minutes to complete this exam. For coding questions, you do

More information

JS Event Loop, Promises, Async Await etc. Slava Kim

JS Event Loop, Promises, Async Await etc. Slava Kim JS Event Loop, Promises, Async Await etc Slava Kim Synchronous Happens consecutively, one after another Asynchronous Happens later at some point in time Parallelism vs Concurrency What are those????

More information

20480C: Programming in HTML5 with JavaScript and CSS3. Course Code: 20480C; Duration: 5 days; Instructor-led. JavaScript code.

20480C: Programming in HTML5 with JavaScript and CSS3. Course Code: 20480C; Duration: 5 days; Instructor-led. JavaScript code. 20480C: Programming in HTML5 with JavaScript and CSS3 Course Code: 20480C; Duration: 5 days; Instructor-led WHAT YOU WILL LEARN This course provides an introduction to HTML5, CSS3, and JavaScript. This

More information

1 CS480W Quiz 6 Solution

1 CS480W Quiz 6 Solution 1 CS480W Quiz 6 Solution Date: Fri Dec 07 2018 Max Points: 15 Important Reminder As per the course Academic Honesty Statement, cheating of any kind will minimally result in receiving an F letter grade

More information

COURSE 20480B: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3

COURSE 20480B: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3 ABOUT THIS COURSE This course provides an introduction to HTML5, CSS3, and JavaScript. This course helps students gain basic HTML5/CSS3/JavaScript programming skills. This course is an entry point into

More information

ES Promise.

ES Promise. ES Promise Walkthrough @san650 A Promise represents a value which may be available now, or in the future, or never. Promise A Promise is a proxy for a value not necessarily known when the promise is created.

More information

ECMAScript: latest and upcoming features

ECMAScript: latest and upcoming features ECMAScript: latest and upcoming features Axel Rauschmayer @rauschma HolyJS Moscow, 11 December 2016 Slides: speakerdeck.com/rauschma Overview JavaScript: What s new? What does the future bring? Background:

More information

Programming in HTML5 with JavaScript and CSS3

Programming in HTML5 with JavaScript and CSS3 Programming in HTML5 with JavaScript and CSS3 20480B; 5 days, Instructor-led Course Description This course provides an introduction to HTML5, CSS3, and JavaScript. This course helps students gain basic

More information

Tutorial 8 Build resilient, responsive and scalable web applications with SocketPro

Tutorial 8 Build resilient, responsive and scalable web applications with SocketPro Tutorial 8 Build resilient, responsive and scalable web applications with SocketPro Contents: Introduction SocketPro ways for resilient, responsive and scalable web applications Vertical scalability o

More information

JavaScript CoAPRequest API

JavaScript CoAPRequest API JavaScript CoAPRequest API Abstract The CoAPRequest specification defines an API that provides scripted client functionality for transferring data between a CoAP client and a CoAP server. Table of Contents

More information

20480B: Programming in HTML5 with JavaScript and CSS3

20480B: Programming in HTML5 with JavaScript and CSS3 20480B: Programming in HTML5 with JavaScript and CSS3 Course Details Course Code: Duration: Notes: 20480B 5 days This course syllabus should be used to determine whether the course is appropriate for the

More information

JavaScript Specialist v2.0 Exam 1D0-735

JavaScript Specialist v2.0 Exam 1D0-735 JavaScript Specialist v2.0 Exam 1D0-735 Domain 1: Essential JavaScript Principles and Practices 1.1: Identify characteristics of JavaScript and common programming practices. 1.1.1: List key JavaScript

More information

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1)

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 8 Professional Program: Data Administration and Management JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) AGENDA

More information

HTML5 Evolution and Development. Matt Spencer UI & Browser Marketing Manager

HTML5 Evolution and Development. Matt Spencer UI & Browser Marketing Manager HTML5 Evolution and Development Matt Spencer UI & Browser Marketing Manager 1 HTML5 Ratified. finally! After 7 years of development, the HTML5 specification was ratified on 28 th October 14 urce>

More information

Programming in HTML5 with JavaScript and CSS3

Programming in HTML5 with JavaScript and CSS3 20480 - Programming in HTML5 with JavaScript and CSS3 Duration: 5 days Course Price: $2,975 Software Assurance Eligible Course Description Course Overview This training course provides an introduction

More information

An Introduction to TypeScript. Personal Info

An Introduction to TypeScript. Personal Info An Introduction to TypeScript Jason Bock Practice Lead Magenic Level: Beginner/Intermediate Personal Info http://www.magenic.com http://www.jasonbock.net https://www.twitter.com/jasonbock https://www.github.com/jasonbock

More information

CS193X: Web Programming Fundamentals

CS193X: Web Programming Fundamentals CS193X: Web Programming Fundamentals Spring 2017 Victoria Kirst (vrk@stanford.edu) Today's schedule Today: - Keyboard events - Mobile events - Simple CSS animations - Victoria's office hours once again

More information

Callbacks & Promises

Callbacks & Promises Callbacks & Promises Agenda Task: read a JSON file A Callback Based Library (fs) A Promise based Libdary (fs-readfile-promise) Function Styles: Anonymous function Named function Function Object Named Arrow

More information

JavaScript for C# Programmers Kevin

JavaScript for C# Programmers Kevin JavaScript for C# Programmers Kevin Jones kevin@rocksolidknowledge.com @kevinrjones http://www.github.com/kevinrjones Agenda Types Basic Syntax Objects Functions 2 Basics 'C' like language braces brackets

More information

Concurrency User Guide

Concurrency User Guide Concurrency User Guide Release 1.0 Dylan Hackers January 26, 2019 CONTENTS 1 Basic Abstractions 3 1.1 Executors................................................. 3 1.2 Queues..................................................

More information

Asynchronous Programming - Done right

Asynchronous Programming - Done right Asynchronous Programming - Done right ZWEI14. ZWEI14 - A DIGITAL AGENCY WITH CREATIVE DNA. Idea, concept, design, technology and engage in perfectly together. We are young but experienced, creative but

More information

Networking & The Web. HCID 520 User Interface Software & Technology

Networking & The Web. HCID 520 User Interface Software & Technology Networking & The HCID 520 User Interface Software & Technology Uniform Resource Locator (URL) http://info.cern.ch:80/ 1991 HTTP v0.9 Uniform Resource Locator (URL) http://info.cern.ch:80/ Scheme/Protocol

More information

Web Development 20480: Programming in HTML5 with JavaScript and CSS3. Upcoming Dates. Course Description. Course Outline

Web Development 20480: Programming in HTML5 with JavaScript and CSS3. Upcoming Dates. Course Description. Course Outline Web Development 20480: Programming in HTML5 with JavaScript and CSS3 Learn how to code fully functional web sites from the ground up using best practices and web standards with or without an IDE! This

More information

MCSA Universal Windows Platform. A Success Guide to Prepare- Programming in C# edusum.com

MCSA Universal Windows Platform. A Success Guide to Prepare- Programming in C# edusum.com 70-483 MCSA Universal Windows Platform A Success Guide to Prepare- Programming in C# edusum.com Table of Contents Introduction to 70-483 Exam on Programming in C#... 2 Microsoft 70-483 Certification Details:...

More information

Developing with VMware vcenter Orchestrator. vrealize Orchestrator 5.5.1

Developing with VMware vcenter Orchestrator. vrealize Orchestrator 5.5.1 Developing with VMware vcenter Orchestrator vrealize Orchestrator 5.5.1 You can find the most up-to-date technical documentation on the VMware website at: https://docs.vmware.com/ If you have comments

More information

1.00/ Introduction to Computers and Engineering Problem Solving. Final / December 13, 2004

1.00/ Introduction to Computers and Engineering Problem Solving. Final / December 13, 2004 1.00/1.001 Introduction to Computers and Engineering Problem Solving Final / December 13, 2004 Name: Email Address: TA: Solution Section: You have 180 minutes to complete this exam. For coding questions,

More information

Networking & The Web. HCID 520 User Interface Software & Technology

Networking & The Web. HCID 520 User Interface Software & Technology Networking & The Web HCID 520 User Interface Software & Technology Uniform Resource Locator (URL) http://info.cern.ch:80/ 1991 HTTP v0.9 Uniform Resource Locator (URL) http://info.cern.ch:80/ Scheme/Protocol

More information

Node.js Training JavaScript. Richard richardrodger.com

Node.js Training JavaScript. Richard richardrodger.com Node.js Training JavaScript Richard Rodger @rjrodger richardrodger.com richard.rodger@nearform.com A New Look at JavaScript Embracing JavaScript JavaScript Data Structures JavaScript Functions Functional

More information

Controller/server communication

Controller/server communication Controller/server communication Mendel Rosenblum Controller's role in Model, View, Controller Controller's job to fetch model for the view May have other server communication needs as well (e.g. authentication

More information

! The final is at 10:30 am, Sat 6/4, in this room. ! Open book, open notes. ! No electronic devices. ! No food. ! Assignment 7 due 10pm tomorrow

! The final is at 10:30 am, Sat 6/4, in this room. ! Open book, open notes. ! No electronic devices. ! No food. ! Assignment 7 due 10pm tomorrow Announcements ECS 89 6/1! The final is at 10:30 am, Sat 6/4, in this room! Open book, open notes! No electronic devices! No food! Assignment 7 due 10pm tomorrow! No late Assignment 7 s! Fill out course

More information

Catching Events. Bok, Jong Soon

Catching Events. Bok, Jong Soon Catching Events Bok, Jong Soon Jongsoon.bok@gmail.com www.javaexpert.co.kr What Is an Event? Events Describe what happened. Event sources The generator of an event Event handlers A function that receives

More information

A Formal Model for Direct-style Asynchronous Observables

A Formal Model for Direct-style Asynchronous Observables A Formal Model for Direct-style Asynchronous Observables Philipp Haller! KTH Royal Institute of Technology, Sweden!! Heather Miller! EPFL, Switzerland!! 27th Nordic Workshop on Programming Theory (NWPT)!

More information

JavaScript CS 4640 Programming Languages for Web Applications

JavaScript CS 4640 Programming Languages for Web Applications JavaScript CS 4640 Programming Languages for Web Applications 1 How HTML, CSS, and JS Fit Together {css} javascript() Content layer The HTML gives the page structure and adds semantics Presentation

More information

Chapter 7 Control I Expressions and Statements

Chapter 7 Control I Expressions and Statements Chapter 7 Control I Expressions and Statements Expressions Conditional Statements and Guards Loops and Variation on WHILE The GOTO Controversy Exception Handling Values and Effects Important Concepts in

More information

5/19/2015. Objectives. JavaScript, Sixth Edition. Using Touch Events and Pointer Events. Creating a Drag-and Drop Application with Mouse Events

5/19/2015. Objectives. JavaScript, Sixth Edition. Using Touch Events and Pointer Events. Creating a Drag-and Drop Application with Mouse Events Objectives JavaScript, Sixth Edition Chapter 10 Programming for Touchscreens and Mobile Devices When you complete this chapter, you will be able to: Integrate mouse, touch, and pointer events into a web

More information

Asynchronous OSGi: Promises for the masses. Tim Ward.

Asynchronous OSGi: Promises for the masses. Tim Ward. Asynchronous OSGi: Promises for the masses Tim Ward http://www.paremus.com info@paremus.com Who is Tim Ward? @TimothyWard Senior Consulting Engineer, Trainer and Architect at Paremus 5 years at IBM developing

More information

Tradeoffs in language design: The case of Javascript proxies. Tom Van Cutsem (joint work with Mark S. Miller, with feedback from many others)

Tradeoffs in language design: The case of Javascript proxies. Tom Van Cutsem (joint work with Mark S. Miller, with feedback from many others) Tradeoffs in language design: The case of Javascript proxies Tom Van Cutsem (joint work with Mark S. Miller, with feedback from many others) What do these have in common? What do these have in common?

More information

MS_ Programming in HTML5 with JavaScript and CSS3.

MS_ Programming in HTML5 with JavaScript and CSS3. Programming in HTML5 with JavaScript and CSS3 www.ked.com.mx Av. Revolución No. 374 Col. San Pedro de los Pinos, C.P. 03800, México, CDMX. Tel/Fax: 52785560 Por favor no imprimas este documento si no es

More information

Background. Javascript is not related to Java in anyway other than trying to get some free publicity

Background. Javascript is not related to Java in anyway other than trying to get some free publicity JavaScript I Introduction JavaScript traditionally runs in an interpreter that is part of a browsers Often called a JavaScript engine Was originally designed to add interactive elements to HTML pages First

More information

Swift 5, ABI Stability and

Swift 5, ABI Stability and Swift 5, ABI Stability and Concurrency @phillfarrugia Important Documents Concurrency Manifesto by Chris Lattner https: /gist.github.com/lattner/ 31ed37682ef1576b16bca1432ea9f782 Kicking off Concurrency

More information

CS1102: Macros and Recursion

CS1102: Macros and Recursion CS1102: Macros and Recursion Kathi Fisler, WPI October 5, 2009 This lecture looks at several more macro examples. It aims to show you when you can use recursion safely with macros and when you can t. 1

More information

Service Workers & APEX

Service Workers & APEX Dimitri Gielis Service Workers & APEX www.apexrnd.be dgielis.blogspot.com @dgielis dgielis@apexrnd.be Dimitri Gielis Founder & CEO of APEX R&D 18+ years of Oracle Experience (OCP & APEX Certified) Oracle

More information

CSP IN JAVASCRIPT.

CSP IN JAVASCRIPT. CSP IN JAVASCRIPT Page 1 of 31 VINCENZO CHIANESE BUGS INTRODUCER AT APIARY https://github.com/xvincentx @D3DVincent https://vncz.js.org Page 2 of 31 COMMUNICATING SEQUENTIAL PROCESSES Page 3 of 31 THE

More information

Copyright Descriptor Systems, Course materials may not be reproduced in whole or in part without prior written consent of Joel Barnum

Copyright Descriptor Systems, Course materials may not be reproduced in whole or in part without prior written consent of Joel Barnum Ajax The notion of asynchronous request processing using the XMLHttpRequest object has been around for several years, but the term "AJAX" was coined by Jesse James Garrett of Adaptive Path. You can read

More information

An Async Primer. By Bill Wagner August Introduction

An Async Primer. By Bill Wagner August Introduction An Async Primer By Bill Wagner August 2012 Introduction The C# 5.0 release might seem small, given that the single major feature is the addition of async / await keywords to support asynchronous programming.

More information

Course 20480: Programming in HTML5 with JavaScript and CSS3

Course 20480: Programming in HTML5 with JavaScript and CSS3 Course 20480: Programming in HTML5 with JavaScript and CSS3 Overview About this course This course provides an introduction to HTML5, CSS3, and JavaScript. This course helps students gain basic HTML5/CSS3/JavaScript

More information

The ThoughtWorks Anthology 2

The ThoughtWorks Anthology 2 Extracted from: The ThoughtWorks Anthology 2 More Essays on Software Technology and Innovation This PDF file contains pages extracted from The ThoughtWorks Anthology 2, published by the Pragmatic Bookshelf.

More information

INF5750. Introduction to JavaScript and Node.js

INF5750. Introduction to JavaScript and Node.js INF5750 Introduction to JavaScript and Node.js Outline Introduction to JavaScript Language basics Introduction to Node.js Tips and tools for working with JS and Node.js What is JavaScript? Built as scripting

More information

Midterm Exam. 5. What is the character - (minus) used for in JavaScript? Give as many answers as you can.

Midterm Exam. 5. What is the character - (minus) used for in JavaScript? Give as many answers as you can. First Name Last Name CSCi 90.3 March 23, 2010 Midterm Exam Instructions: For multiple choice questions, circle the letter of the one best choice unless the question explicitly states that it might have

More information

TERSUBSCRIBE. E s s e n t i a l f o r s o f t w a r e t e s t e r s. It s FREE for testers. June / 5 v2.0 number 27

TERSUBSCRIBE. E s s e n t i a l f o r s o f t w a r e t e s t e r s. It s FREE for testers. June / 5 v2.0 number 27 TE It s FREE for testers TERSUBSCRIBE E s s e n t i a l f o r s o f t w a r e t e s t e r s June 2014 4 / 5 v2.0 number 27 Including articles by: Bogdan Bereza VictO Jim Pelech and Gregory Solovey Alcatel-Lucent

More information

Compatibility via Modernizr

Compatibility via Modernizr Compatibility via Modernizr Making web things fit their medium Stu Cox by / @stucoxmedia #McrFRED 27th June 2013 Manchester, UK com pat i bil i ty kәmˌpatɪˈbɪlɪti (abbr.: compat.) noun (pl. -i ties) a

More information

Chris Buckett. FOREWORD BY Seth Ladd MANNING 6$03/(&+$37(5

Chris Buckett. FOREWORD BY Seth Ladd MANNING 6$03/(&+$37(5 Chris Buckett FOREWORD BY Seth Ladd 6$03/(&+$37(5 MANNING Dart in Action by Chris Buckett Chapter 9 Copyright 2013 Manning Publications brief contents PART 1 INTRODUCING DART...1 1 Hello Dart 3 2 Hello

More information

Full Stack boot camp

Full Stack boot camp Name Full Stack boot camp Duration (Hours) JavaScript Programming 56 Git 8 Front End Development Basics 24 Typescript 8 React Basics 40 E2E Testing 8 Build & Setup 8 Advanced JavaScript 48 NodeJS 24 Building

More information

JavaScript: Events, the DOM Tree, jquery and Timing

JavaScript: Events, the DOM Tree, jquery and Timing JavaScript: Events, the DOM Tree, jquery and Timing CISC 282 October 11, 2017 window.onload Conflict Can only set window.onload = function once What if you have multiple files for handlers? What if you're

More information

Touch Forward. Bill Fisher. #touchfwd. Developing Awesome Cross-Browser Touch

Touch Forward. Bill Fisher. #touchfwd. Developing Awesome Cross-Browser Touch Touch Forward Developing Awesome Cross-Browser Touch Interactions Bill Fisher @fisherwebdev #touchfwd Super F*cking Important yeah, it s important. http://commons.wikimedia.org/wiki/file:071228_human_hands.jpg

More information

INF 212 ANALYSIS OF PROG. LANGS FUNCTION COMPOSITION. Instructors: Crista Lopes Copyright Instructors.

INF 212 ANALYSIS OF PROG. LANGS FUNCTION COMPOSITION. Instructors: Crista Lopes Copyright Instructors. INF 212 ANALYSIS OF PROG. LANGS FUNCTION COMPOSITION Instructors: Crista Lopes Copyright Instructors. Topics Recursion Higher-order functions Continuation-Passing Style Monads (take 1) Identity Monad Maybe

More information

Developer Entrepreneur Crazy person

Developer Entrepreneur Crazy person Jakob Mattsson Developer Entrepreneur Crazy person @jakobmattsson jakob.mattsson@gmail.com on Forgotten funky functions Client-side JavaScript tracking Quick and easy customer feedback. touch-and-tell.se

More information

JavaScript Programming

JavaScript Programming JavaScript Programming Course ISI-1337B - 5 Days - Instructor-led, Hands on Introduction Today, JavaScript is used in almost 90% of all websites, including the most heavilytrafficked sites like Google,

More information

Async Workgroup Update. Barthold Lichtenbelt

Async Workgroup Update. Barthold Lichtenbelt Async Workgroup Update Barthold Lichtenbelt 1 Goals Provide synchronization framework for OpenGL - Provide base functionality as defined in NV_fence and GL2_async_core - Build a framework for future, more

More information

Jquery.ajax Call Returns Status Code Of 200 But Fires Jquery Error

Jquery.ajax Call Returns Status Code Of 200 But Fires Jquery Error Jquery.ajax Call Returns Status Code Of 200 But Fires Jquery Error The request returns http 200 OK, but the xhr status is 0, error. jquery Ajax Request to get JSON data fires error event to make an ajax

More information

Controller/server communication

Controller/server communication Controller/server communication Mendel Rosenblum Controller's role in Model, View, Controller Controller's job to fetch model for the view May have other server communication needs as well (e.g. authentication

More information

JavaScript Lecture 1

JavaScript Lecture 1 JavaScript Lecture 1 Waterford Institute of Technology May 17, 2016 John Fitzgerald Waterford Institute of Technology, JavaScriptLecture 1 1/31 Javascript Extent of this course A condensed basic JavaScript

More information

Asynchronous JS. SWE 432, Fall Web Application Development

Asynchronous JS. SWE 432, Fall Web Application Development Asynchronous JS SWE 432, Fall 2018 Web Application Development Review: Asynchronous Synchronous: Make a function call When function call returns, the work is done Asynchronous: Make a function call Function

More information

Contact center integration with CRM. White paper and best practice for Daktela V6 setup with internal CRM system

Contact center integration with CRM. White paper and best practice for Daktela V6 setup with internal CRM system Contact center integration with CRM White paper and best practice for Daktela V6 setup with internal CRM system 1. Introduction The goal of this document is to provide brief description on the CRM integration

More information

React + React Native. Based on material by Danilo Filgueira

React + React Native. Based on material by Danilo Filgueira React + React Native Based on material by Danilo Filgueira Prerequisites JS and ES6 HTML and CSS NPM/YARN and NODE React A Javascript library for creating reactive and composable UI components Whenever

More information

Input and Validation. Mendel Rosenblum. CS142 Lecture Notes - Input

Input and Validation. Mendel Rosenblum. CS142 Lecture Notes - Input Input and Validation Mendel Rosenblum Early web app input: HTTP form tag Product: Deluxe:

More information

JavaScript: More Syntax and Using Events

JavaScript: More Syntax and Using Events JavaScript: Me Syntax and Using Events CISC 282 October 4, 2017 null and undefined null is synonymous with nothing i.e., no value, nothing there undefined in synonymous with confusion i.e., what's this?

More information

Jeff Barczewski. US Air Force Married. Catholic. RGA Father. Consultant Aerospace Engineer. 27 years as professional developer

Jeff Barczewski. US Air Force Married. Catholic. RGA Father. Consultant Aerospace Engineer. 27 years as professional developer Jeff Barczewski Catholic US Air Force Married RGA Father Consultant Aerospace Engineer Elsevier 27 years as professional developer MasterCard (ApplePay / MDES) Founded CodeWinds Training CodeWinds Training

More information

CodeValue. C ollege. Prerequisites: Basic knowledge of web development and especially JavaScript.

CodeValue. C ollege. Prerequisites: Basic knowledge of web development and especially JavaScript. Course Syllabuses Introduction to AngularJS Length: 3 days Prerequisites: Basic knowledge of web development and especially JavaScript. Objectives: Students will learn to take advantage of AngularJS and

More information

CSC Web Programming. Introduction to JavaScript

CSC Web Programming. Introduction to JavaScript CSC 242 - Web Programming Introduction to JavaScript JavaScript JavaScript is a client-side scripting language the code is executed by the web browser JavaScript is an embedded language it relies on its

More information

Module 5 JavaScript, AJAX, and jquery. Module 5. Module 5 Contains an Individual and Group component

Module 5 JavaScript, AJAX, and jquery. Module 5. Module 5 Contains an Individual and Group component Module 5 JavaScript, AJAX, and jquery Module 5 Contains an Individual and Group component Both are due on Wednesday October 24 th Start early on this module One of the most time consuming modules in the

More information

iframe programming with jquery jquery Summit 2011

iframe programming with jquery jquery Summit 2011 iframe programming with jquery jquery Summit 2011 who invited this guy? name s ben strange last name work at disqus co-author, Third-party JavaScript disqus? dis cuss dĭ-skŭs' third-party commenting platform

More information

Scala Actors. Scalable Multithreading on the JVM. Philipp Haller. Ph.D. candidate Programming Methods Lab EPFL, Lausanne, Switzerland

Scala Actors. Scalable Multithreading on the JVM. Philipp Haller. Ph.D. candidate Programming Methods Lab EPFL, Lausanne, Switzerland Scala Actors Scalable Multithreading on the JVM Philipp Haller Ph.D. candidate Programming Methods Lab EPFL, Lausanne, Switzerland The free lunch is over! Software is concurrent Interactive applications

More information

File Handling Programming 1 C# Programming. Rob Miles

File Handling Programming 1 C# Programming. Rob Miles 08101 Programming 1 C# Programming Rob Miles Files At the moment when our program stops all the data in it is destroyed We need a way of persisting data from our programs The way to do this is to use files

More information

AJAX: Introduction CISC 282 November 27, 2018

AJAX: Introduction CISC 282 November 27, 2018 AJAX: Introduction CISC 282 November 27, 2018 Synchronous Communication User and server take turns waiting User requests pages while browsing Waits for server to respond Waits for the page to load in the

More information

Functional Programming

Functional Programming Functional Programming CS 1025 Computer Science Fundamentals I Stephen M. Watt University of Western Ontario When the Function is the Thing In O-O programming, you typically know where an action is needed,

More information

Design patterns and Animation with jquery. with Paul Bakaus

Design patterns and Animation with jquery. with Paul Bakaus Design patterns and Animation with jquery with Paul Bakaus The desktop. The greatest UI innovation ever. Drag & Drop. What about us? We are pioneers. Drag & Drop. in the web? Mixed worlds. Application

More information

JavaScript CS 4640 Programming Languages for Web Applications

JavaScript CS 4640 Programming Languages for Web Applications JavaScript CS 4640 Programming Languages for Web Applications 1 How HTML, CSS, and JS Fit Together {css} javascript() Content layer The HTML gives the page structure and adds semantics Presentation

More information

Jinx Malware 2.0 We know it s big, we measured it! Itzik Kotler Yoni Rom

Jinx Malware 2.0 We know it s big, we measured it! Itzik Kotler Yoni Rom Jinx Malware 2.0 We know it s big, we measured it! Itzik Kotler Yoni Rom This is how your browser looks like before Jinx has loaded This is how your browser looks like after Jinx has loaded Did you see

More information

The course is supplemented by numerous hands-on labs that help attendees reinforce their theoretical knowledge of the learned material.

The course is supplemented by numerous hands-on labs that help attendees reinforce their theoretical knowledge of the learned material. Lincoln Land Community College Capital City Training Center 130 West Mason Springfield, IL 62702 217-782-7436 www.llcc.edu/cctc WA2442 Introduction to JavaScript Objectives This intensive training course

More information

Shared Variables. Firmware v Version 1.0, 16 Apr 2013

Shared Variables. Firmware v Version 1.0, 16 Apr 2013 Shared Variables Firmware v3.0.0 Version 1.0, 16 Apr 2013 2013 SpinetiX S.A. All rights reserved. DISCLAIMER THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE

More information

Rocking with Racket. Marc Burns Beatlight Inc

Rocking with Racket. Marc Burns Beatlight Inc Rocking with Racket Marc Burns Beatlight Inc What am I doing here? My first encounter with Racket was in 2010 I wanted to use Racket in industry The opportunity arose in June 2014: Loft What am I doing

More information

React Not Just Hype!

React Not Just Hype! React Not Just Hype! @mjackson Thriller. @ReactJSTraining reactjs-training.com rackt github.com/rackt - 14 members - 5 teams (owners, routing, redux, a11y, docs) - Not exclusive! This is not a core team.

More information

ECMAScript 6 The Future of JavaScript is Now!

ECMAScript 6 The Future of JavaScript is Now! ECMAScript 6 The Future of JavaScript is Now! Tom Van Cutsem JOIN 15 @tvcutsem My involvement in JavaScript PhD on programming language technology 2010: Visiting Faculty at Google, Caja team Joined ECMA

More information

Front End Nanodegree Syllabus

Front End Nanodegree Syllabus Front End Nanodegree Syllabus Build Stunning User Experiences Before You Start You've taken the first step toward becoming a web developer by choosing the Front End Nanodegree program. In order to succeed,

More information