Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
PHPerから見た昨今のJSについて
Search
polidog
PRO
March 14, 2015
Technology
500
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PHPerから見た昨今のJSについて
polidog
PRO
March 14, 2015
More Decks by polidog
See All by polidog
omasushiというライブラリを作った
polidog
PRO
0
260
RelayerというPHPのフレームワークを作った
polidog
PRO
0
200
AIがコードを書く時代の ジェネレーティブプログラミング
polidog
PRO
3
1.3k
小さな開発会社を作った理由(再)
polidog
PRO
0
320
React Server ComponentsでAPI不要の開発体験
polidog
PRO
1
940
小さな開発会社が受託開発に力を入れる理由
polidog
PRO
0
560
小さな開発会社を作った理由
polidog
PRO
1
3.7k
小さな開発会社がWebサービスを作る理由
polidog
PRO
1
890
トランザクションスクリプトは何がダメなのか?
polidog
PRO
2
4.1k
Other Decks in Technology
See All in Technology
なぜ「決定性」が 決定的に重要なのか? Durable Execution 基盤の数理的理解 #serverlessjp / ServerlessDays Tokyo 2026
ytaka23
3
840
サーバーレスをどこまで使う? WebRTC対戦ゲームで選んだVPSとの共存設計
kaidouji85
0
130
品質と信頼性を地続きにする
grimoh
2
810
Deployment の 先にある AI Agent 基盤 - kagent vNext、Agent Substrate、Hermes から読み解く Agent Runtime の現在地 / k8s-matsuri-2-ai-agent-platform-amsy810
masayaaoyama
4
670
「守り」で活用するオンデバイスLLM 〜写ってはいけないを総力戦で防ぐ〜 / iOSDC Japan 2026
nakamuuu
0
180
AI時代、データエンジニアが一番おもろい
genshun9
0
670
EventBridge に「合流」はない ― サーバーレスのワークフローを育てるということ / No Join in EventBridge
yusukeshimizu
2
200
人間はどの意思決定を手放せるのか
kawasima
15
7.4k
「ピッケル本」日本語版は4.0(第6版)が出版されるべき / pickaxe4-nagoyark05
kakutani
2
200
負債のメタファと2026年 / Debt Metaphor in Agentic Engineering Age 202609 Edition
twada
PRO
10
4.2k
beyond jj: config & tools ecosystem
indirect
0
5.2k
データ_AIの事業の勝敗をわけるもの
nek0128
1
460
Featured
See All Featured
The SEO Collaboration Effect
kristinabergwall1
1
570
Being A Developer After 40
akosma
91
590k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
410
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
850
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
320
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
700
Believing is Seeing
oripsolob
1
220
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
470
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
500
Transcript
PHPer͔ΒݟͨࡢࠓͷJSʹͭ ͍ͯ ੩ԬJavaScriptษڧձ #3 @polidog
ࣗݾհ • ϙϦυοάͰ͢ɻ݄ྋଠͬͯݴ͍·͢ɻ • ਗ਼ਫࢢੜ·Εɻਗ਼ਫ۠ҭͪɻ • PHPerͰ͢ɻJS࣌ʑॻ͖·͢ɻ • SymfonyϢʔβʔձͷਓʹͳΓ·ͨ͠ɻ •
λϰΟίϜגࣜձࣾͰΤϯδχΞͬͯ·͢ɻ
ࠓ͍ͨ͜͠ͱ
ͦͷલʹએ
λϰΟίϜͰɺgotripͱ͍ ͏ϝσΟΞͬͯ·͢ɻ http://gotrip.jp/
Symfony Meetup։࠵͠· ͢ʂ https://symfony.doorkeeper.jp/events/ 21692
ࠓ͍ͨ͜͠ͱ
ECMA Script6!!
– @nakajmg “ࠓ͔Β֮͑ΔͳΒCoffeeScriptΑΓES6 ͩΑɻ”
ͱ͜ΖͰESͬͯʁ
–ɹWikipediaΑΓ “Ecma InternationalʹΑͬͯඪ४Խ͞Ε ͨεΫϦϓτݴޠͰ͋Δɻ࣮͝ͱͷޓ ੑ͕͍ JavaScript ྨʢಛʹ JScriptʣ ͷඪ४ΛఆΊͨͷͰ͋Δɻ”
ES6ͰՃ͞ΕΔ
Features https://github.com/lukehoban/es6features
ࠓ͢ػೳ 1. ؔ(Arrow functions,Function Argumentss) 2. ม(let + const) 3.
Ϋϥε(classes) 4. δΣωϨʔλͱfor of 5. άϩʔόϧΦϒδΣΫτ(Map,Set, WeakMap, WeakSet) 6. Promises
1. ؔ var test = a => { console.log(“execute!! :
”+a); } function a(x, y=12) { } function b(x, ...y) { } function c(x,y,z) {} args = [1,2,3] c(…args);
1. ؔ(ArrowFunctions) =>ΛͬͯؔఆٛͰ͖Δ Ҿෳ (a,b) => ͱͳΔ ෳߦͷ߹{}Λ͏
1. ؔ(FunctionArguments) ؔύϥϝʔλʹʹσϑΥϧτ͕ઃఆͰ͖ Δɻ ՄมҾΛ…argsͰࢦఆͰ͖Δɻ ྻΛؔҾʹల։Ͱ͖Δɻ
2. ม let hoge = 1; const fuga = 2;
2. ม letΛ͏ͱϒϩοΫείʔϓ͕࣮ݱͰ͖Δɻ constΛ͏ͱ্ॻ͖Ͱ͖ͳ͍ɻ
3. Ϋϥε class Hoge { } var hoge = new
Hoge();
3. Ϋϥε ΫϥεએݴͰॻ͚Δɻ extendsͰܧঝͰ͖Δɻ superͰܧঝݩͷϝιουݺͼग़ͤΔɻ
4. δΣωϨʔλͱfor of let gen = function*() { for(let i
= 0; i < 10; i++) { yield i+10; } } for (let i of gen()) { console.log(i) }
4. δΣωϨʔλͱfor of function* ͱ yieldΛ͏ for of ͰϧʔϓͰ͖Δ ArrowFunctionͱΈ߹ΘͤΒΕͳ͍
5. άϩʔόϧΦϒδΣΫτ var set = new Set(); set.add(“hoge”).add(“fuga”) var map
= new Map(); map.set(“hoge”,10); map.set(“fuga”,20);
5. άϩʔόϧΦϒδΣΫτ Set Map WeakSet WeakMap ͕͑Δɻ
6. Promises function timeout(duration = 0) { return new Promise((resolve,
reject) => { setTimeout(resolve, duration); }) } var p = timeout(1000).then(() => { return timeout(2000); }).then(() => { throw new Error("hmm"); }).catch(err => { return Promise.all([timeout(100), timeout(200)]); })
6. Promises http://azu.github.io/promises-book/
Ͳ͏ͬͯಈ͔͢ͷʁ
ECMAScript 6 compatibility table http://kangax.github.io/compat-table/es6/
େ͖͚ͯ̎ͭ͘ • αʔόαΠυͰ࣮ߦ͢Δ • τϥϯείϯύΠϥΛར༻͢Δ
αʔόαΠυͰಈ͔ͯ͠ΈΑ ͏ɻ
IUUQTJPKTPSHKBJOEFYIUNM
͜Μͳײ͡Ͱ࣮ߦ͢Δ $ iojs --harmony_classes ./classes.es6.js $ iojs --harmony_arrow_functions ./arrows.js $
iojs --es_staging ./hoge.js
iojs͏ͱ͖ʹҙ
Φϓγϣϯ(flag)͕ඞཁ • shipping features → ϑϥάඞཁͳ͍ • staged features →
--es_staging͕ඞཁ • in progress features → ݸผʹϑϥάࢦఆ͕ඞ ཁ
ϑϥάΛௐΔ $ iojs --v8-options | grep harmony
ΊΜͲ͍͔͘͞Βશ෦ͷϑϥ άΛࢦఆͯ͠ΈΔɻ $ iojs $(iojs --v8-options | grep harmony |
sed -e 's/(.*)\(.* \)/ /g' | tr '\n' ' ‘) ./hoge.js
ৄ͍͠ࣄiojsͷαΠτͷ͜ ͜Λ֬ೝ͠·͠ΐ͏ɻ https://iojs.org/ja/es6.html
τϥϯείϯύΠϥ
IUUQTCBCFMKTJP
gulpͱΈ߹ΘͤͯΈ·͠ΐ ͏ɻ
“Ұ൪ॏཁͳͷָ͘͠ॻ͚Δ͔Ͳ͏͔ͬ ͯ͜ͱɻ”