Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
JavaScript: The Past, Present and Future
Search
Kim Joar Bekkelund
April 17, 2015
Programming
0
79
JavaScript: The Past, Present and Future
An introduction to the role of JavaScript. Given to students at NTNU in Trondheim, Norway.
Kim Joar Bekkelund
April 17, 2015
Tweet
Share
More Decks by Kim Joar Bekkelund
See All by Kim Joar Bekkelund
ASTs in JavaScript
kimjoar
0
81
Writing Beautiful JavaScript Tests
kimjoar
12
2.5k
WebSockets and Server-Sent Events
kimjoar
1
230
Patterns of Large-Scale JavaScript Applications
kimjoar
20
1.4k
Patterns of Large-Scale JavaScript Applications
kimjoar
22
2.3k
Enkle JavaScript-abstraksjoner
kimjoar
1
160
Simple JavaScript Abstractions
kimjoar
9
760
Introduksjon til forretningsmodeller
kimjoar
2
310
Other Decks in Programming
See All in Programming
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
150
歴史と現在から考えるスケーラブルなソフトウェア開発のプラクティス
i10416
0
120
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
110
創造的活動から切り拓く新たなキャリア 好きから始めてみる夜勤オペレーターからSREへの転身
yjszk
1
140
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
1
380
各クラウドサービスにおける.NETの対応と見解
ymd65536
0
160
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
590
GitHubで育つ コラボレーション文化 : ニフティでのインナーソース挑戦事例 - 2024-12-16 GitHub Universe 2024 Recap in ZOZO
niftycorp
PRO
0
100
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
280
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
220
tidymodelsによるtidyな生存時間解析 / Japan.R2024
dropout009
1
810
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
280
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Scaling GitHub
holman
459
140k
Designing for Performance
lara
604
68k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Producing Creativity
orderedlist
PRO
342
39k
Typedesign – Prime Four
hannesfritz
40
2.4k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
Six Lessons from altMBA
skipperchong
27
3.5k
Transcript
JavaScript The Past, Present and Future
Kim Joar Bekkelund @kimjoar
[email protected]
Fagleder i JS-plattform Jobbet i
BEKK siden 2011
None
None
It all started at 1995
Brendan Eich + 10 days = JavaScript
What did we do with this new language? (You really
don't want to know)
CUT & PASTE
None
None
None
… and this went on for almost 10 years
2004
2005
What happened?
What happened?
What happened?
What happened?
JavaScript went from nothing to …
"any application that can be written in JavaScript, will eventually
be written in JavaScript." Atwood's Law
JavaScript Where are we now?
We expect more!
None
None
SPA Single-page applications
None
10/90? 50/50? 70/30?
None
None
WebSockets Client Server Set up connection
JavaScript + I/O Single-threaded, non-blocking
None
Node.js in production?
“Assembly language of the web”
None
# Assignment: number = 42 opposite = true # Conditions:
number = -42 if opposite # Functions: square = (x) -> x * x # Arrays: list = [1, 2, 3, 4, 5] # Objects: math = root: Math.sqrt square: square cube: (x) -> x * square x Inspired by Ruby and Python Several features will be added to the next JS version
class Point { x: number; y: number; constructor(x: number, y:
number) { this.x = x; this.y = y; } getDist() { return Math.sqrt( this.x * this.x + this.y * this.y ); } } var p = new Point(3,4); var dist = p.getDst(); console.log("Hypotenuse is: " + dist); Optional static typing. Superset of JS.
data Person = Person { name :: String, age ::
Number } showPerson :: Person -> String showPerson (Person o) = o.name ++ ", aged " ++ show o.age examplePerson :: Person examplePerson = Person { name: "Bonnie", age: 26 } Inspired by Haskell
(ns example (:require [om.core :as om] [om.dom :as dom])) (defn
widget [data owner] (reify om/IRender (render [this] (dom/h1 nil (:text data))))) (om/root widget {:text "Hello world!"} {:target (. js/document (getElementById "my-app"))}) A Lisp for the browser
asm.js Speeding up compiled languages
asm.js Speeding up compiled languages "an extraordinarily optimizable, low-level subset
of JavaScript"
C/C++ -> LLVM -> Emscripten -> asm.js
int f(int i) { return i + 1; } C
function f(i) { i = i|0; return (i + 1)|0; } asm.js
But what happens when you can run C and C++
code in the browser?
None
None
None
millions of lines of C compiled to asm.js/JavaScript running in
a browser !
JavaScript The future
language, apps, ecosystem, VM
LANGUAGE the
ES1 1997 ES2 1998 ES3 1999 ES4 Abandoned ES5 2009
ES6 2015 ES7 est. 2016
Adjustments based on real-world problems
None
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>Datainn</title>
<meta name="description" content=""> <meta name="viewport" content="width=device-width"> <script src="../shared/vendor/proj4js/proj4js-compressed.js"></scr <script src="../shared/vendor/bower_components/underscore/undersco <script src="../shared/vendor/bower_components/jquery/jquery.min.j <script src="../shared/vendor/bower_components/spin.js/spin.js"></ <script src="../shared/vendor/bower_components/angular/angular.js" <script src="../shared/vendor/bower_components/angular-route/angul <script src="../shared/vendor/bower_components/angular-animate/ang <script src="../shared/vendor/bower_components/ng-table/ng-table.j <script src="../shared/vendor/bower_components/moment/moment.js">< <script src="../shared/vendor/bower_components/moment/lang/nb.js"> <script src="../shared/vendor/bower_components/based-on/index.js"> <script src="../shared/vendor/bower_components/poller.js/poller.js <script src="../shared/vendor/bower_components/ee.js/ee.js"></scri <script src="../shared/vendor/bower_components/d3/d3.js"></script> <script src="../shared/vendor/bower_components/nvd3/nv.d3.js"></sc
None
ECOSYSTEM the
None
Cryptography API, Audio API, WebRTC, File API …
60fps, but only one thread Web Workers 60fps, but only
one thread
None
from mostly huge frameworks to thousands of small libraries
None
Rendering to …
WebGL
vimeo.com/105880197 javazone webgl
React Native
None
None
APPS the
None
None
offline first
Full-featured online apps
None
None
Desktop and mobile apps
None
chrome os, windows 8, firefox os JavaScript as a first-class
citizen
We will see more of the backend developers on the
frontend … and that's a great thing!
VM the
Browser = rendering engine + JavaScript engine
Chakra SpiderMonkey JavaScriptCore V8 Nashorn
Super-competitive market Push for new features and better performance
2/3 of native speed on benchmarks emscripten + asm.js
None
Want to learn JS?
None
None
Takk for meg!