SlideShare uma empresa Scribd logo
1 de 59
Baixar para ler offline
Javascript,
征服世界是可能的嗎?
gasolin@Modern Web Conf 2015
征服世界的4個秘密
1996, 2008, 2010, 2013
從0到1
被豪門包養
第一個秘密:JS從1996年開始
Netscape/Opera 1994
↓
Internet Explorer 1995
(War ↓ One)
Safari 2003
↓
Firefox 1.0 2004
(War ↓ Two)
Chrome 2008
↓
豪門包養史
瀏覽器
順道介紹 - 瀏覽器排版引擎
JS引擎
http://en.wikipedia.org/wiki/List_of_ECMAScript_engines
搞定豪門
搞定瀏覽器
搞定豪門
搞定瀏覽器
快100+倍
第二個秘密:現在的JS比2008年
http://www.youtube.com/watch?v=D2ibM4oufdM
變快的JS能做什麼呢?
自己試 http://beta.unity3d.com/jonas/WebGLBenchmark/
讓發明人可以安心
玩3D遊戲
Emscripten
可編譯 c++ 程式到 Web,搭配 asm.js 技術
僅慢原生1.5x倍
還是慢1.5倍怎麼辦?
摩爾出來面對
http://big5.cri.cn/gate/big5/gb.cri.cn/32464/2010/07/21/1325s2928129_3.htm
摩爾出來面對
換快一點的CPU
就解決了
http://krsna.lamost.org/popular/POPU/moor.htm
可編譯成JS
的程式語言
http://bit.ly/1F94Dx5
Ruby
Python
Erlang
Perl
Lisp/scheme
Haskell
SQL
php
Java/JVM
.Net related
c++
Basic
Pascal
go
可編譯成JS
的程式語言
http://bit.ly/1F94Dx5
Ruby
Python
Erlang
Perl
Lisp/scheme
Haskell
SQL
php
Java/JVM
.Net related
c++
Basic
Pascal
go
JS才成為獨立的程式語言
第三個秘密:從 2010 年開始
從前從前
JS
event callback, non-blocking I/O, single thread
然後
與網頁百寶箱分開
跑馬燈
按右鍵無效
落葉效果
JS終於可以
與DOM分開
JS終於可以
DOM 相關 API:
window.addEventListener
this.getElementById(‘name’);
moz-, webkit-, ms-...
搞定命令行
搞定命令行
搞定命令行
全端JS
全端JS
Enterprise Ready
http://nerds.airbnb.com/isomorphic-javascript-future-web-apps/
網站前/後端同構
Isomorphic
搞定伺服器端與建置工具
搞定伺服器端與建置工具
9成軟體
可以搬上web
第四個秘密:從 2013 年開始
Cordova (Mobile Evolvement)
WebKit 2005
↓
PhoneGap 2009
↓
Cordova 2011
http://phonegap.com/app/
桌面開發:前/後端融合
WebKit 2005
↓
Chromium 2008
↓
Node 2009
↓
NodeWebkit 2013
↓
Electron 2014
Github Atom ↓ MS VS Code
React Native (no HTML)
Node 2009
↓
React 2013
↓
React Native 2015
https://www.youtube.com/watch?v=KVZ-P-ZI6W4
Web App化
● 開網址即用 https + manifest
● 離線時可用 service worker
● 連線時更新
● 模組化開發 web component
From html5rocks
搞定桌面端與跨多平台
搞定桌面端與跨多平台
搞定桌面端與跨多平台
JS的未來
搞定系統與嵌入式裝置?
Web即平台
Firefox 2004
↓
Firefox for Android 2009
↓
Firefox OS 2013
Phone, TV, Embeded
duktape
● ES5.1 compatible
● Small footprint (can install in Arduino due)
● Can embedded in C
Exprino pico
http://kck.st/1JNq4DK
板子上直接跑JS (8kb)
@Idea 把物聯網裝置當成DOM節點
Query
$.byName('門口感測器').trigger('motion', function() {
$.byLocation('客廳').setOn();
});
Web Component
<iot-device name='門口感測器'>
<iot-motion-sensor data-pin=7></iot-motion-sensor>
</iot-device>
http://devicejs.org/
結語
多種平台
Windows
Mac
Linux
Android
iOS
BB10
FirefoxOS
WebOS
Arduino
使用者同時擁有
多樣設備
Desktop
TV
Tablet
Phone
Watch
Embedded
使用者交互使用
偉大的企業都有秘密,秘密不會消失不見
只有相信秘密,才能看到隱藏的機會
- Peter Thiel
Reference
Javascript world domination https://medium.
com/@slsoftworks/javascript-world-domination-af9ca2ee5070
Happy 18th Birthday Javascript
https://resin.io/blog/happy-18th-birthday-javascript/
Evolution Web
http://www.evolutionoftheweb.com/
Extensible web
https://extensiblewebreportcard.org/
One More Thing
Web 技術簡史
Web古代
Netscape 1994
↓
Internet Explorer 1995
(Browser ↓ War One)
JavaScript 1995
↓
CSS 1996
↓
Web中世紀
HTML4/DOM 1998
↓
HTTPXMLRequest IE5 1999
↓
IE6 2001
(90% browser ↓ market share)
JSON 2002
Web大航海
Firefox 1.0 2004
(Browser ↓War Two)
Gmail 2004
↓
Ruby on Rails 2004
↓
WebKit 2005
↓
JQuery 2006
Web工業革命
Mobile Safari 2007
↓
RESTful 2007
↓
Chrome 2008
(Browser ↓ war intensify)
NodeJS 2009
↓
MongoDB 2009
↓
PhoneGap 2009

Mais conteúdo relacionado

Semelhante a Javascript征服世界是可能的嗎?

2013 05 同業分享會 米蘭數位 奶綠茶 createJS
2013 05 同業分享會 米蘭數位 奶綠茶 createJS2013 05 同業分享會 米蘭數位 奶綠茶 createJS
2013 05 同業分享會 米蘭數位 奶綠茶 createJS綠茶 奶
 
无名小站首页改版 -渐进增强与css3
无名小站首页改版 -渐进增强与css3无名小站首页改版 -渐进增强与css3
无名小站首页改版 -渐进增强与css3taobao.com
 
無名小站首頁改版 - 漸進增強與CSS3 (Wretch and Progressive Enhancement)
無名小站首頁改版 - 漸進增強與CSS3 (Wretch and Progressive Enhancement)無名小站首頁改版 - 漸進增強與CSS3 (Wretch and Progressive Enhancement)
無名小站首頁改版 - 漸進增強與CSS3 (Wretch and Progressive Enhancement)Adam Wang
 
WordPress 還能怎麼玩?更多元寬廣的視野!
WordPress 還能怎麼玩?更多元寬廣的視野!WordPress 還能怎麼玩?更多元寬廣的視野!
WordPress 還能怎麼玩?更多元寬廣的視野!Kuohui Lu
 
開放資料暨資料視覺化 (D3.js)
開放資料暨資料視覺化 (D3.js)開放資料暨資料視覺化 (D3.js)
開放資料暨資料視覺化 (D3.js)維佋 唐
 
张所勇:前端开发工具推荐
张所勇:前端开发工具推荐张所勇:前端开发工具推荐
张所勇:前端开发工具推荐zhangsuoyong
 
2012 java two-desktop-appliction-using-j-ruby-with-swt
2012 java two-desktop-appliction-using-j-ruby-with-swt2012 java two-desktop-appliction-using-j-ruby-with-swt
2012 java two-desktop-appliction-using-j-ruby-with-swttka
 
Graphic programming in js
Graphic programming in jsGraphic programming in js
Graphic programming in jsjay li
 
Yahoo! 應用程式 (YAP) 在前端的開發
Yahoo! 應用程式 (YAP) 在前端的開發Yahoo! 應用程式 (YAP) 在前端的開發
Yahoo! 應用程式 (YAP) 在前端的開發Joseph Chiang
 
Ajax框架:Dwr》实战(包括整合)
Ajax框架:Dwr》实战(包括整合)Ajax框架:Dwr》实战(包括整合)
Ajax框架:Dwr》实战(包括整合)yiditushe
 
Node.js 進攻桌面開發
Node.js 進攻桌面開發Node.js 進攻桌面開發
Node.js 進攻桌面開發Fred Chien
 
2013 01 13 webconf milkmidi Flash
2013 01 13 webconf milkmidi Flash2013 01 13 webconf milkmidi Flash
2013 01 13 webconf milkmidi Flash綠茶 奶
 
去哪儿平台技术
去哪儿平台技术去哪儿平台技术
去哪儿平台技术d0nn9n
 
GDC Taipei Summit review 2012
GDC Taipei Summit review 2012GDC Taipei Summit review 2012
GDC Taipei Summit review 2012Victor Lee
 
瀏覽器講古
瀏覽器講古瀏覽器講古
瀏覽器講古Bob Chao
 
Rwd開發小工具
Rwd開發小工具Rwd開發小工具
Rwd開發小工具翔宇 蘇
 

Semelhante a Javascript征服世界是可能的嗎? (19)

2013 05 同業分享會 米蘭數位 奶綠茶 createJS
2013 05 同業分享會 米蘭數位 奶綠茶 createJS2013 05 同業分享會 米蘭數位 奶綠茶 createJS
2013 05 同業分享會 米蘭數位 奶綠茶 createJS
 
无名小站首页改版 -渐进增强与css3
无名小站首页改版 -渐进增强与css3无名小站首页改版 -渐进增强与css3
无名小站首页改版 -渐进增强与css3
 
Taiwanese Experience in IT
Taiwanese Experience in ITTaiwanese Experience in IT
Taiwanese Experience in IT
 
無名小站首頁改版 - 漸進增強與CSS3 (Wretch and Progressive Enhancement)
無名小站首頁改版 - 漸進增強與CSS3 (Wretch and Progressive Enhancement)無名小站首頁改版 - 漸進增強與CSS3 (Wretch and Progressive Enhancement)
無名小站首頁改版 - 漸進增強與CSS3 (Wretch and Progressive Enhancement)
 
WordPress 還能怎麼玩?更多元寬廣的視野!
WordPress 還能怎麼玩?更多元寬廣的視野!WordPress 還能怎麼玩?更多元寬廣的視野!
WordPress 還能怎麼玩?更多元寬廣的視野!
 
開放資料暨資料視覺化 (D3.js)
開放資料暨資料視覺化 (D3.js)開放資料暨資料視覺化 (D3.js)
開放資料暨資料視覺化 (D3.js)
 
张所勇:前端开发工具推荐
张所勇:前端开发工具推荐张所勇:前端开发工具推荐
张所勇:前端开发工具推荐
 
2012 java two-desktop-appliction-using-j-ruby-with-swt
2012 java two-desktop-appliction-using-j-ruby-with-swt2012 java two-desktop-appliction-using-j-ruby-with-swt
2012 java two-desktop-appliction-using-j-ruby-with-swt
 
Graphic programming in js
Graphic programming in jsGraphic programming in js
Graphic programming in js
 
Yahoo! 應用程式 (YAP) 在前端的開發
Yahoo! 應用程式 (YAP) 在前端的開發Yahoo! 應用程式 (YAP) 在前端的開發
Yahoo! 應用程式 (YAP) 在前端的開發
 
Ajax框架:Dwr》实战(包括整合)
Ajax框架:Dwr》实战(包括整合)Ajax框架:Dwr》实战(包括整合)
Ajax框架:Dwr》实战(包括整合)
 
Node.js 進攻桌面開發
Node.js 進攻桌面開發Node.js 進攻桌面開發
Node.js 進攻桌面開發
 
2013 01 13 webconf milkmidi Flash
2013 01 13 webconf milkmidi Flash2013 01 13 webconf milkmidi Flash
2013 01 13 webconf milkmidi Flash
 
去哪儿平台技术
去哪儿平台技术去哪儿平台技术
去哪儿平台技术
 
GDC Taipei Summit review 2012
GDC Taipei Summit review 2012GDC Taipei Summit review 2012
GDC Taipei Summit review 2012
 
瀏覽器講古
瀏覽器講古瀏覽器講古
瀏覽器講古
 
Rwd開發小工具
Rwd開發小工具Rwd開發小工具
Rwd開發小工具
 
TypeScript
TypeScriptTypeScript
TypeScript
 
Open Source from Legend, Business, to Ecosystem
Open Source from Legend, Business, to EcosystemOpen Source from Legend, Business, to Ecosystem
Open Source from Legend, Business, to Ecosystem
 

Mais de Fred Lin

How to create 360 Image/panorama & share with WebVR?
How to create  360 Image/panorama & share with WebVR?How to create  360 Image/panorama & share with WebVR?
How to create 360 Image/panorama & share with WebVR?Fred Lin
 
Blocklyduino Poster
Blocklyduino PosterBlocklyduino Poster
Blocklyduino PosterFred Lin
 
Firefox os how large open source project works
Firefox os   how large open source project worksFirefox os   how large open source project works
Firefox os how large open source project worksFred Lin
 
Capable Web: Chrome Apps and Firefox Webapp
Capable Web: Chrome Apps and Firefox WebappCapable Web: Chrome Apps and Firefox Webapp
Capable Web: Chrome Apps and Firefox WebappFred Lin
 
Developing FirefoxOS
Developing FirefoxOSDeveloping FirefoxOS
Developing FirefoxOSFred Lin
 
Steps to contribute to firefox os (gaia)
Steps to contribute to firefox os (gaia)Steps to contribute to firefox os (gaia)
Steps to contribute to firefox os (gaia)Fred Lin
 
Introduction of Distributed version control system (mainly Mercurial)
Introduction of Distributed version control system (mainly Mercurial)Introduction of Distributed version control system (mainly Mercurial)
Introduction of Distributed version control system (mainly Mercurial)Fred Lin
 
第一次程式設計就上手 - 使用Python 與周蟒(zhpy)
第一次程式設計就上手  - 使用Python 與周蟒(zhpy)第一次程式設計就上手  - 使用Python 與周蟒(zhpy)
第一次程式設計就上手 - 使用Python 與周蟒(zhpy)Fred Lin
 
Maintain and share your python project (維護和分享 Python 程式專案)
Maintain and share your python project (維護和分享 Python 程式專案)Maintain and share your python project (維護和分享 Python 程式專案)
Maintain and share your python project (維護和分享 Python 程式專案)Fred Lin
 
Make web as webapp
Make web as webappMake web as webapp
Make web as webappFred Lin
 
Firefox OS overview
Firefox OS overviewFirefox OS overview
Firefox OS overviewFred Lin
 
人人能編程是可能的嗎?
人人能編程是可能的嗎?人人能編程是可能的嗎?
人人能編程是可能的嗎?Fred Lin
 
Developer也可以做出漂亮網站 - Twitter Bootstrap/JQuery Mobile簡介
Developer也可以做出漂亮網站 - Twitter Bootstrap/JQuery Mobile簡介Developer也可以做出漂亮網站 - Twitter Bootstrap/JQuery Mobile簡介
Developer也可以做出漂亮網站 - Twitter Bootstrap/JQuery Mobile簡介Fred Lin
 
Android + jenkins
Android + jenkinsAndroid + jenkins
Android + jenkinsFred Lin
 
Play Framework on Google App Engine
Play Framework on Google App EnginePlay Framework on Google App Engine
Play Framework on Google App EngineFred Lin
 
Taipei gtug opening
Taipei gtug openingTaipei gtug opening
Taipei gtug openingFred Lin
 
Google IO 2011 recap
Google IO 2011 recapGoogle IO 2011 recap
Google IO 2011 recapFred Lin
 
Introduction of Google Code and Mercurial
Introduction of Google Code and MercurialIntroduction of Google Code and Mercurial
Introduction of Google Code and MercurialFred Lin
 
Introduction Of Android Scripting Environment
Introduction Of Android Scripting EnvironmentIntroduction Of Android Scripting Environment
Introduction Of Android Scripting EnvironmentFred Lin
 

Mais de Fred Lin (19)

How to create 360 Image/panorama & share with WebVR?
How to create  360 Image/panorama & share with WebVR?How to create  360 Image/panorama & share with WebVR?
How to create 360 Image/panorama & share with WebVR?
 
Blocklyduino Poster
Blocklyduino PosterBlocklyduino Poster
Blocklyduino Poster
 
Firefox os how large open source project works
Firefox os   how large open source project worksFirefox os   how large open source project works
Firefox os how large open source project works
 
Capable Web: Chrome Apps and Firefox Webapp
Capable Web: Chrome Apps and Firefox WebappCapable Web: Chrome Apps and Firefox Webapp
Capable Web: Chrome Apps and Firefox Webapp
 
Developing FirefoxOS
Developing FirefoxOSDeveloping FirefoxOS
Developing FirefoxOS
 
Steps to contribute to firefox os (gaia)
Steps to contribute to firefox os (gaia)Steps to contribute to firefox os (gaia)
Steps to contribute to firefox os (gaia)
 
Introduction of Distributed version control system (mainly Mercurial)
Introduction of Distributed version control system (mainly Mercurial)Introduction of Distributed version control system (mainly Mercurial)
Introduction of Distributed version control system (mainly Mercurial)
 
第一次程式設計就上手 - 使用Python 與周蟒(zhpy)
第一次程式設計就上手  - 使用Python 與周蟒(zhpy)第一次程式設計就上手  - 使用Python 與周蟒(zhpy)
第一次程式設計就上手 - 使用Python 與周蟒(zhpy)
 
Maintain and share your python project (維護和分享 Python 程式專案)
Maintain and share your python project (維護和分享 Python 程式專案)Maintain and share your python project (維護和分享 Python 程式專案)
Maintain and share your python project (維護和分享 Python 程式專案)
 
Make web as webapp
Make web as webappMake web as webapp
Make web as webapp
 
Firefox OS overview
Firefox OS overviewFirefox OS overview
Firefox OS overview
 
人人能編程是可能的嗎?
人人能編程是可能的嗎?人人能編程是可能的嗎?
人人能編程是可能的嗎?
 
Developer也可以做出漂亮網站 - Twitter Bootstrap/JQuery Mobile簡介
Developer也可以做出漂亮網站 - Twitter Bootstrap/JQuery Mobile簡介Developer也可以做出漂亮網站 - Twitter Bootstrap/JQuery Mobile簡介
Developer也可以做出漂亮網站 - Twitter Bootstrap/JQuery Mobile簡介
 
Android + jenkins
Android + jenkinsAndroid + jenkins
Android + jenkins
 
Play Framework on Google App Engine
Play Framework on Google App EnginePlay Framework on Google App Engine
Play Framework on Google App Engine
 
Taipei gtug opening
Taipei gtug openingTaipei gtug opening
Taipei gtug opening
 
Google IO 2011 recap
Google IO 2011 recapGoogle IO 2011 recap
Google IO 2011 recap
 
Introduction of Google Code and Mercurial
Introduction of Google Code and MercurialIntroduction of Google Code and Mercurial
Introduction of Google Code and Mercurial
 
Introduction Of Android Scripting Environment
Introduction Of Android Scripting EnvironmentIntroduction Of Android Scripting Environment
Introduction Of Android Scripting Environment
 

Javascript征服世界是可能的嗎?