SlideShare una empresa de Scribd logo
1 de 44
Descargar para leer sin conexión
WebSocket 
JERROMY 
2014.06
About Me 
• Jerromy Lee 
• National Taiwan University of ART 
• New Media Artist / Game Designer 
• iOS / Android / OF / Flash Developer 
• VRMZ ⼤大中華盃 VR盟主 ⾦金獎 
• 404 電⼦子藝術節 
• 上海電⼦子藝術節 
• 台北數位藝術節 
• 屏東影⾳音藝術節 
• 法國 安亙湖 互動表演 
• KT獎 遊戲設計 銀獎 
• 4C數位創作競賽 遊戲組 銀獎
About Me 
• Job Experience. 7 years 
• YAHOO 使⽤用者經驗設計師 
• 華夏技術學院兼任講師 
• 邊境數位科技 互動創意指導 
• 邊境數位科技 技術部主管 
• 科碼新媒體 新媒體藝術家
App Works 
• Experience. 
• iOS and 
Android 
Developer
http://www.corma.com.tw/
Connection tech. 
• Bluetooth 1.0~4.0 
• Server get / post (Web Service) 
• Socket Server (Socket Server / WebSocket) 
• Peer to Peer 
• iOS - Multipeer Connectivity 
• https://vimeo.com/95407383 
• Without Internet Environment 
• Android - Wifi direct 
• Without Internet Environment
Works intro. 
• Super Sync Sports 
• http://chrome.com/supersyncsports/#/en-US 
• MacDonald 
• https://www.youtube.com/watch?v=8BVZ_rn7bIY 
• Sony Make TV 
• https://www.youtube.com/watch?v=dEAgynm3Ng8 
• Mr. Chia (CORMA) 
• http://www.ilovechia.biz/event/1301/
Super Sync Sports 
• http://chrome.com/supersyncsports/#/en-US
MacDonald 
• https://www.youtube.com/watch?v=8BVZ_rn7bIY
Sony Make TV 
• https://www.youtube.com/watch?v=dEAgynm3Ng8
Mr. CHIA 
• http://www.ilovechia.biz/event/1301/
Works intro. 
• Play 玩劇 
• https://www.youtube.com/watch?v=0m0rfCpN-V8 
• Mobi Waver 
• https://www.youtube.com/watch?v=bxY7x-XNR_w 
• Flying 
• https://www.youtube.com/watch?v=V_l9EI-5mLY 
• Who (數⽀支數⽀支 進⾏行中) 
• the nearest I 
• https://vimeo.com/95245928
玩劇 
• https://www.youtube.com/watch?v=0m0rfCpN-V8
Mobi Waver 
• https://www.youtube.com/watch?v=bxY7x-XNR_w
Flying 
• https://www.youtube.com/watch?v=V_l9EI-5mLY
the nearest I 
• https://vimeo.com/95245928
WebSocket 
• Part of the HTML5 
• JavaScript interface 
• Uses the WebSocket protocol instead of HTTP 
• ws:// 
• wss:// 
• full-duplex 
• Why? Choose WebSocket? 
• Mobile
WebSocket 
• Browser Support (WebSocket Version 13) 
• http://caniuse.com/websockets 
• Google Chrome (Web & Mobile) 
• iOS 6 Safari 
• Mozilla Firefox 6 
• Opera 10.7 & 11.0 
• IE 10
WebSocket 
• Architecture 
• http:// 
www.websocket.org/ 
aboutwebsocket.html
WebSocket 
• Server-Side Choosing 
• PHP WebSocket 
• Node.js 
• C# .Net 
• Client-Side 
• iOS (Socket Rocket) 
• https://github.com/square/SocketRocket 
• Android (Java WebSocket) 
• https://github.com/TooTallNate/Java-WebSocket 
• HTML Client (Javascript WebSocket Api) 
• http://www.websocket.org/echo.html
Tools intro. 
• Parse — Cloud Backend Service 
• https://www.parse.com 
• Create JS — JavaScript Visual Coding Library tool 
• http://createjs.com/#!/CreateJS 
• MAMP — PHP WebService 
• http://www.mamp.info/en/ 
• XAMPP — PHP WebService 
• https://www.apachefriends.org/zh_tw/index.html 
• Google Chrome — JavaScript Debug Tools 
• http://www.google.com.tw/intl/zh-TW/chrome/browser/ 
• Sublime Text — HTML / JavaScript Text Editor 
• http://www.sublimetext.com
WebSocket 
• Web VS App 
• Web — easy connect, needn’t install 
• App — need install 
• http://www.mesona.com.tw/app/
JavaScript Basic 
• JavaScript Basic 
• Tools: Google Chrome / Sublime
JavaScript Basic 
• console.log(“Hello World”);
JavaScript Basic 
• WebSocket JS 
• var ws = new WebSocket(“ws://127.0.0.1:8080”); 
• ws.onopen = function(){ //Connected to WebSocket server }; 
• ws.onclose = function(){ //Disconnected }; 
• ws.onmessage = function(msg){ //incoming message}; 
• ws.send(“hello, world!”); 
• ws.close(); //close the WebSocket connection
JavaScript Basic 
• Google Chrome Debug Tools.
JavaScript Basic 
• EaselJS, deal the visual 
• Like Flash Action Script 3 
• The intro of HTML 5 Canvas 
• http://www.createjs.com/#!/EaselJS
JavaScript Basic 
• EaselJS, deal the visual 
• Canvas — like flash stage 
• var stage = new createjs.Stage("demoCanvas"); 
• http://www.w3schools.com/html/html5_canvas.asp
JavaScript Basic 
• EaselJS 
• http://www.createjs.com/tutorials/Getting%20Started/ 
• <canvas id=“demoCanvas” width=“500” height=“500”></canvas>
JavaScript Basic 
var circle = new createjs.Shape(); 
circle.graphics.beginFill("red").drawCircle(0, 0, 50); 
circle.x = 100; 
circle.y = 100; 
stage.addChild(circle); 
stage.addChild(new createjs.Shape()).setTransform(100,100).graphics.f(“red").dc(0,0,50); 
stage.update();
Server Side 
• XAMPP / MAMP 
• https://www.apachefriends.org/zh_tw/index.html 
• http://www.mamp.info/en/ 
• PHP WebSocket 
• http://www.sanwebe.com/2013/05/chat-using-websocket- 
php-socket 
• https://github.com/Flynsarmy/PHPWebSocket-Chat
Server Side 
• Quick Start 
• install the XAMPP or MAMP 
• Put the php class(class.PHPWebSocket.php) and 
php file (serverMain.php) into the web root folder. 
• Write the client side program 
• testing……
Example File 
• File 
• https://dl.dropboxusercontent.com/u/ 
32940203/who_template_clean.zip
Server Side 
• Node.js 
• http://nodejs.tw/ 
• http://nodejs.org/
Server Side
Server Side 
• Node.js 
• Why node.js? 
• Socket I.O.
Server Side 
• Node.js 
• heroic 
• socketIO 
• wesocket npm 
• Choose a solution what you want
Server Side 
• Node.js 
• Step 0. Install the NodeJS 
• http://nodejs.org 
• Step 1. Node.js 
• console.log(“Hello World”);
Server Side 
• Node.js (Express) 
• Step 2. create package JSON 
• Step 3. mkdir hello-world 
• Step 4. sudo npm install 
• Step 5. sudo npm install -g express-generator 
• Step 6. sudo npm install -g express -t ejs testApp 
• Step 7. npm start 
• Step 8 http://localhost:3000
Server Side 
• Node.js 
• npm install --save socket.io 
• Example File: 
• http://expressjs.com 
• http://socket.io/get-started/chat/ 
• https://dl.dropboxusercontent.com/u/32940203/ 
simpleChat.zip
Complete the works 
• Goal: 
• ⼤大家⼀一起合⼒力擊破⿎鼓,不斷的按按鈕,集氣的 
概念,⼤大家⼀一起合⼒力不斷的按按鈕到⼀一定程度 
就可成功擊破.
Complete the works 
• End. 
• https://www.facebook.com/jerromy 
• jerromy@corma.com.tw

Más contenido relacionado

La actualidad más candente

Websocket protocol overview
Websocket protocol overviewWebsocket protocol overview
Websocket protocol overviewallenmeng
 
Node worshop Realtime - Socket.io
Node worshop Realtime - Socket.ioNode worshop Realtime - Socket.io
Node worshop Realtime - Socket.ioCaesar Chi
 
Realtime web application with java
Realtime web application with javaRealtime web application with java
Realtime web application with javaJeongHun Byeon
 
Large scale web socket system with AWS and Web socket
Large scale web socket system with AWS and Web socketLarge scale web socket system with AWS and Web socket
Large scale web socket system with AWS and Web socketLe Kien Truc
 
Spring + WebSocket integration
Spring + WebSocket integrationSpring + WebSocket integration
Spring + WebSocket integrationOleksandr Semenov
 
Using Websockets in Play !
Using Websockets in Play !Using Websockets in Play !
Using Websockets in Play !Knoldus Inc.
 
Real time web: is there a life without socket.io and node.js?
Real time web: is there a life without socket.io and node.js?Real time web: is there a life without socket.io and node.js?
Real time web: is there a life without socket.io and node.js?Eduard Trayan
 
Web sockets - Pentesting
Web sockets - Pentesting Web sockets - Pentesting
Web sockets - Pentesting Vandana Verma
 
Consuming ASP.NET Web API with WebSockets
Consuming ASP.NET Web API with WebSocketsConsuming ASP.NET Web API with WebSockets
Consuming ASP.NET Web API with WebSocketsMaayan Glikser
 
NodeJS & Socket IO on Microsoft Azure Cloud Web Sites - DWX 2014
NodeJS & Socket IO on Microsoft Azure Cloud Web Sites - DWX 2014NodeJS & Socket IO on Microsoft Azure Cloud Web Sites - DWX 2014
NodeJS & Socket IO on Microsoft Azure Cloud Web Sites - DWX 2014Stéphane ESCANDELL
 
The Case for HTTP/2 - EpicFEL Sept 2015
The Case for HTTP/2 - EpicFEL Sept 2015The Case for HTTP/2 - EpicFEL Sept 2015
The Case for HTTP/2 - EpicFEL Sept 2015Andy Davies
 
Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15streamdata.io
 
Enhancing Mobile User Experience with WebSocket
Enhancing Mobile User Experience with WebSocketEnhancing Mobile User Experience with WebSocket
Enhancing Mobile User Experience with WebSocketMauricio "Maltron" Leal
 
Async Tasks with Django Channels
Async Tasks with Django ChannelsAsync Tasks with Django Channels
Async Tasks with Django ChannelsAlbert O'Connor
 

La actualidad más candente (20)

Websocket protocol overview
Websocket protocol overviewWebsocket protocol overview
Websocket protocol overview
 
Node worshop Realtime - Socket.io
Node worshop Realtime - Socket.ioNode worshop Realtime - Socket.io
Node worshop Realtime - Socket.io
 
Realtime web application with java
Realtime web application with javaRealtime web application with java
Realtime web application with java
 
WebSockets and Java
WebSockets and JavaWebSockets and Java
WebSockets and Java
 
Large scale web socket system with AWS and Web socket
Large scale web socket system with AWS and Web socketLarge scale web socket system with AWS and Web socket
Large scale web socket system with AWS and Web socket
 
Websockets and SockJS, Real time chatting
Websockets and SockJS, Real time chattingWebsockets and SockJS, Real time chatting
Websockets and SockJS, Real time chatting
 
Spring + WebSocket integration
Spring + WebSocket integrationSpring + WebSocket integration
Spring + WebSocket integration
 
Dancing with websocket
Dancing with websocketDancing with websocket
Dancing with websocket
 
Using Websockets in Play !
Using Websockets in Play !Using Websockets in Play !
Using Websockets in Play !
 
Real time web: is there a life without socket.io and node.js?
Real time web: is there a life without socket.io and node.js?Real time web: is there a life without socket.io and node.js?
Real time web: is there a life without socket.io and node.js?
 
Single sign-on
Single sign-onSingle sign-on
Single sign-on
 
Python, WebRTC and You
Python, WebRTC and YouPython, WebRTC and You
Python, WebRTC and You
 
Web sockets - Pentesting
Web sockets - Pentesting Web sockets - Pentesting
Web sockets - Pentesting
 
Socket.IO
Socket.IOSocket.IO
Socket.IO
 
Consuming ASP.NET Web API with WebSockets
Consuming ASP.NET Web API with WebSocketsConsuming ASP.NET Web API with WebSockets
Consuming ASP.NET Web API with WebSockets
 
NodeJS & Socket IO on Microsoft Azure Cloud Web Sites - DWX 2014
NodeJS & Socket IO on Microsoft Azure Cloud Web Sites - DWX 2014NodeJS & Socket IO on Microsoft Azure Cloud Web Sites - DWX 2014
NodeJS & Socket IO on Microsoft Azure Cloud Web Sites - DWX 2014
 
The Case for HTTP/2 - EpicFEL Sept 2015
The Case for HTTP/2 - EpicFEL Sept 2015The Case for HTTP/2 - EpicFEL Sept 2015
The Case for HTTP/2 - EpicFEL Sept 2015
 
Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15Websocket vs SSE - Paris.js - 24/06/15
Websocket vs SSE - Paris.js - 24/06/15
 
Enhancing Mobile User Experience with WebSocket
Enhancing Mobile User Experience with WebSocketEnhancing Mobile User Experience with WebSocket
Enhancing Mobile User Experience with WebSocket
 
Async Tasks with Django Channels
Async Tasks with Django ChannelsAsync Tasks with Django Channels
Async Tasks with Django Channels
 

Similar a WEB SOCKET 應用

About Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSAbout Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSNaga Harish M
 
スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一okyawa
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Todaydavyjones
 
Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5Roy Clarkson
 
Build (Web)VR with A-Frame (COSCUP 2019 Taipei)
Build (Web)VR with A-Frame (COSCUP 2019 Taipei)Build (Web)VR with A-Frame (COSCUP 2019 Taipei)
Build (Web)VR with A-Frame (COSCUP 2019 Taipei)Robert 'Bob' Reyes
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)Doris Chen
 
Building AR and VR Experiences for Web Apps with JavaScript
Building AR and VR Experiences for Web Apps with JavaScriptBuilding AR and VR Experiences for Web Apps with JavaScript
Building AR and VR Experiences for Web Apps with JavaScriptFITC
 
Nodejs and WebSockets
Nodejs and WebSocketsNodejs and WebSockets
Nodejs and WebSocketsGonzalo Ayuso
 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An OverviewNagendra Um
 
APIs, now and in the future
APIs, now and in the futureAPIs, now and in the future
APIs, now and in the futureChris Mills
 
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App DevelopmentChris Morrell
 
SharePoint and Office 365 Development Workshop
SharePoint and Office 365 Development WorkshopSharePoint and Office 365 Development Workshop
SharePoint and Office 365 Development WorkshopEric Shupps
 
Mobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to NativeMobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to NativeMartinSotirov
 
soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch
 

Similar a WEB SOCKET 應用 (20)

About Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSAbout Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JS
 
Mobile native-hacks
Mobile native-hacksMobile native-hacks
Mobile native-hacks
 
スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
 
Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5
 
Build (Web)VR with A-Frame (COSCUP 2019 Taipei)
Build (Web)VR with A-Frame (COSCUP 2019 Taipei)Build (Web)VR with A-Frame (COSCUP 2019 Taipei)
Build (Web)VR with A-Frame (COSCUP 2019 Taipei)
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
 
Nodejs web,db,hosting
Nodejs web,db,hostingNodejs web,db,hosting
Nodejs web,db,hosting
 
Building AR and VR Experiences for Web Apps with JavaScript
Building AR and VR Experiences for Web Apps with JavaScriptBuilding AR and VR Experiences for Web Apps with JavaScript
Building AR and VR Experiences for Web Apps with JavaScript
 
Html5 more than just html5 v final
Html5  more than just html5 v finalHtml5  more than just html5 v final
Html5 more than just html5 v final
 
HTML 5 - Overview
HTML 5 - OverviewHTML 5 - Overview
HTML 5 - Overview
 
Nodejs and WebSockets
Nodejs and WebSocketsNodejs and WebSockets
Nodejs and WebSockets
 
Node azure
Node azureNode azure
Node azure
 
WebVR, an offspring of two worlds
WebVR, an offspring of two worldsWebVR, an offspring of two worlds
WebVR, an offspring of two worlds
 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An Overview
 
APIs, now and in the future
APIs, now and in the futureAPIs, now and in the future
APIs, now and in the future
 
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App Development
 
SharePoint and Office 365 Development Workshop
SharePoint and Office 365 Development WorkshopSharePoint and Office 365 Development Workshop
SharePoint and Office 365 Development Workshop
 
Mobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to NativeMobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to Native
 
soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.js
 

Último

Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 

Último (20)

Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 

WEB SOCKET 應用

  • 2. About Me • Jerromy Lee • National Taiwan University of ART • New Media Artist / Game Designer • iOS / Android / OF / Flash Developer • VRMZ ⼤大中華盃 VR盟主 ⾦金獎 • 404 電⼦子藝術節 • 上海電⼦子藝術節 • 台北數位藝術節 • 屏東影⾳音藝術節 • 法國 安亙湖 互動表演 • KT獎 遊戲設計 銀獎 • 4C數位創作競賽 遊戲組 銀獎
  • 3. About Me • Job Experience. 7 years • YAHOO 使⽤用者經驗設計師 • 華夏技術學院兼任講師 • 邊境數位科技 互動創意指導 • 邊境數位科技 技術部主管 • 科碼新媒體 新媒體藝術家
  • 4. App Works • Experience. • iOS and Android Developer
  • 6. Connection tech. • Bluetooth 1.0~4.0 • Server get / post (Web Service) • Socket Server (Socket Server / WebSocket) • Peer to Peer • iOS - Multipeer Connectivity • https://vimeo.com/95407383 • Without Internet Environment • Android - Wifi direct • Without Internet Environment
  • 7. Works intro. • Super Sync Sports • http://chrome.com/supersyncsports/#/en-US • MacDonald • https://www.youtube.com/watch?v=8BVZ_rn7bIY • Sony Make TV • https://www.youtube.com/watch?v=dEAgynm3Ng8 • Mr. Chia (CORMA) • http://www.ilovechia.biz/event/1301/
  • 8. Super Sync Sports • http://chrome.com/supersyncsports/#/en-US
  • 10. Sony Make TV • https://www.youtube.com/watch?v=dEAgynm3Ng8
  • 11. Mr. CHIA • http://www.ilovechia.biz/event/1301/
  • 12. Works intro. • Play 玩劇 • https://www.youtube.com/watch?v=0m0rfCpN-V8 • Mobi Waver • https://www.youtube.com/watch?v=bxY7x-XNR_w • Flying • https://www.youtube.com/watch?v=V_l9EI-5mLY • Who (數⽀支數⽀支 進⾏行中) • the nearest I • https://vimeo.com/95245928
  • 14. Mobi Waver • https://www.youtube.com/watch?v=bxY7x-XNR_w
  • 16. the nearest I • https://vimeo.com/95245928
  • 17.
  • 18. WebSocket • Part of the HTML5 • JavaScript interface • Uses the WebSocket protocol instead of HTTP • ws:// • wss:// • full-duplex • Why? Choose WebSocket? • Mobile
  • 19. WebSocket • Browser Support (WebSocket Version 13) • http://caniuse.com/websockets • Google Chrome (Web & Mobile) • iOS 6 Safari • Mozilla Firefox 6 • Opera 10.7 & 11.0 • IE 10
  • 20. WebSocket • Architecture • http:// www.websocket.org/ aboutwebsocket.html
  • 21. WebSocket • Server-Side Choosing • PHP WebSocket • Node.js • C# .Net • Client-Side • iOS (Socket Rocket) • https://github.com/square/SocketRocket • Android (Java WebSocket) • https://github.com/TooTallNate/Java-WebSocket • HTML Client (Javascript WebSocket Api) • http://www.websocket.org/echo.html
  • 22. Tools intro. • Parse — Cloud Backend Service • https://www.parse.com • Create JS — JavaScript Visual Coding Library tool • http://createjs.com/#!/CreateJS • MAMP — PHP WebService • http://www.mamp.info/en/ • XAMPP — PHP WebService • https://www.apachefriends.org/zh_tw/index.html • Google Chrome — JavaScript Debug Tools • http://www.google.com.tw/intl/zh-TW/chrome/browser/ • Sublime Text — HTML / JavaScript Text Editor • http://www.sublimetext.com
  • 23. WebSocket • Web VS App • Web — easy connect, needn’t install • App — need install • http://www.mesona.com.tw/app/
  • 24. JavaScript Basic • JavaScript Basic • Tools: Google Chrome / Sublime
  • 25. JavaScript Basic • console.log(“Hello World”);
  • 26. JavaScript Basic • WebSocket JS • var ws = new WebSocket(“ws://127.0.0.1:8080”); • ws.onopen = function(){ //Connected to WebSocket server }; • ws.onclose = function(){ //Disconnected }; • ws.onmessage = function(msg){ //incoming message}; • ws.send(“hello, world!”); • ws.close(); //close the WebSocket connection
  • 27. JavaScript Basic • Google Chrome Debug Tools.
  • 28. JavaScript Basic • EaselJS, deal the visual • Like Flash Action Script 3 • The intro of HTML 5 Canvas • http://www.createjs.com/#!/EaselJS
  • 29. JavaScript Basic • EaselJS, deal the visual • Canvas — like flash stage • var stage = new createjs.Stage("demoCanvas"); • http://www.w3schools.com/html/html5_canvas.asp
  • 30. JavaScript Basic • EaselJS • http://www.createjs.com/tutorials/Getting%20Started/ • <canvas id=“demoCanvas” width=“500” height=“500”></canvas>
  • 31. JavaScript Basic var circle = new createjs.Shape(); circle.graphics.beginFill("red").drawCircle(0, 0, 50); circle.x = 100; circle.y = 100; stage.addChild(circle); stage.addChild(new createjs.Shape()).setTransform(100,100).graphics.f(“red").dc(0,0,50); stage.update();
  • 32. Server Side • XAMPP / MAMP • https://www.apachefriends.org/zh_tw/index.html • http://www.mamp.info/en/ • PHP WebSocket • http://www.sanwebe.com/2013/05/chat-using-websocket- php-socket • https://github.com/Flynsarmy/PHPWebSocket-Chat
  • 33. Server Side • Quick Start • install the XAMPP or MAMP • Put the php class(class.PHPWebSocket.php) and php file (serverMain.php) into the web root folder. • Write the client side program • testing……
  • 34. Example File • File • https://dl.dropboxusercontent.com/u/ 32940203/who_template_clean.zip
  • 35. Server Side • Node.js • http://nodejs.tw/ • http://nodejs.org/
  • 36.
  • 38. Server Side • Node.js • Why node.js? • Socket I.O.
  • 39. Server Side • Node.js • heroic • socketIO • wesocket npm • Choose a solution what you want
  • 40. Server Side • Node.js • Step 0. Install the NodeJS • http://nodejs.org • Step 1. Node.js • console.log(“Hello World”);
  • 41. Server Side • Node.js (Express) • Step 2. create package JSON • Step 3. mkdir hello-world • Step 4. sudo npm install • Step 5. sudo npm install -g express-generator • Step 6. sudo npm install -g express -t ejs testApp • Step 7. npm start • Step 8 http://localhost:3000
  • 42. Server Side • Node.js • npm install --save socket.io • Example File: • http://expressjs.com • http://socket.io/get-started/chat/ • https://dl.dropboxusercontent.com/u/32940203/ simpleChat.zip
  • 43. Complete the works • Goal: • ⼤大家⼀一起合⼒力擊破⿎鼓,不斷的按按鈕,集氣的 概念,⼤大家⼀一起合⼒力不斷的按按鈕到⼀一定程度 就可成功擊破.
  • 44. Complete the works • End. • https://www.facebook.com/jerromy • jerromy@corma.com.tw