Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
JavaScript - From DHTML to a Multi-Paradigm Language
Robert Vogt
September 23, 2016
Technology
0
190
JavaScript - From DHTML to a Multi-Paradigm Language
Robert Vogt
September 23, 2016
Tweet
Share
More Decks by Robert Vogt
See All by Robert Vogt
React Native — Webnesday #9
deniaz
1
220
Hands On: React Native
deniaz
0
170
ADR Lightning Talk
deniaz
0
180
Other Decks in Technology
See All in Technology
TypeScript 4.7と型レベルプログラミング
uhyo
5
2.6k
LINEスタンプの実例紹介 小さく始める障害検知・対応・振り返りの 改善プラクティス
line_developers
PRO
3
940
jaws-ug-asa-datasync-20220510
hiashisan
0
440
Kubernetesの上に作る、統一されたマイクロサービス運用体験
tkuchiki
1
650
次期LTSに備えよ!AOS 6.1 HCI Core 編
smzksts
0
160
THETA Xの登場はジオ業界を変えるか?
furuhashilab
0
150
Research Paper Introduction #98 "NSDI 2022 recap"
cafenero_777
0
180
株式会社オプティム_採用会社紹介資料 / optim-recruit
optim
0
5.1k
暗号資産ウォレット入門(MetaMaskの入門~NFTの購入~詐欺の注意事項など)
kayato
2
120
組織でPower Virtual Agentsを導入するために知っておきたいこと
miyakemito
0
1.4k
Poolにおける足を止めないシステム基盤構築
winebarrel
3
570
如何使用 Argo Event& Workflow 快速建置自定義的工作流程 @ #CNTUG #47
line_developers_tw
PRO
0
350
Featured
See All Featured
Scaling GitHub
holman
451
140k
Designing Experiences People Love
moore
130
22k
Put a Button on it: Removing Barriers to Going Fast.
kastner
56
2.3k
Statistics for Hackers
jakevdp
781
210k
Building an army of robots
kneath
299
40k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
314
19k
How GitHub Uses GitHub to Build GitHub
holman
465
280k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
498
130k
Become a Pro
speakerdeck
PRO
3
770
Build The Right Thing And Hit Your Dates
maggiecrowley
19
1.1k
Documentation Writing (for coders)
carmenhchung
48
2.5k
How New CSS Is Changing Everything About Graphic Design on the Web
jensimmons
212
11k
Transcript
JavaScript From DHTML to a Multi-Paradigm Language Robert Vogt #NCamp16
Robert Vogt Software Engineer from & in Sankt Gallen @_deniaz
None
«Web 2.0 describes World Wide Web websites that emphasize user-generated
content, usability, and interoperability for end users.»
jQuery MooTools Prototype JS script.aculo.us
Single-page application
Angular React Object-Oriented Functional
None
JavaScript
«A programming paradigm is a style or way of programming.
Some languages make it easy to write in some paradigms but not others.»
«Object-oriented programming is a programming language model organized around objects
rather than actions and data rather than logic.»
class Dog extends Animal {} let dog = new Dog();
dog.walk();
let Animal = { walk: function() {} }; let Dog
= Object.create(Animal); Dog.bark = function() { return ‘Woof!’; };
Class-based Inheritance Prototypical Inheritance
«Functional Programming is a programming paradigm that treats computation as
the evaluation of mathematical functions and avoids changing-state and mutable data.»
Functions First-Class
let sum = function(a, b) { return a + b;
}
Functions Higher-Order
$.get( 'http://example.com', (data) => { /* Success! */ } );
function createPrinter(a, b) { return function() { return ‘Namics’; }
} const print = createPrinter(); print(); // Namics.
Functions Pure
let double = (x) = x * 2;
Closures Function
let incrementer = (function() { let _value = 0; return
() => ++_value; })(); incrementer(); // 1 incrementer(); // 2 incrementer(); // 3
Data Immutable
const list1 = Immutable.List.of(1, 2); const list2 = list1.push(3, 4,
5);
Composition Function
let ten = double(sum(2, 3));
Soooo… Any Real World Examples?
None
Store View Action Action Dispatcher
const HelloMessage = (props) => ( <div>Hello {props.name}</div> );
«Those who are unaware they are walking in darkness will
never seek light.» — Bruce Lee find me on twitter @_deniaz