SlideShare a Scribd company logo
jWebSocket-1.0
Real-time coding with jWebSocket
Real-time coding with jWebSocket
About us
* Alexander Schulze
→ jWebSocket Founder
→ a.schulze@innotrade.de
→ http://jwebsocket.org
→ @jWebSocket
* Victor Antonio Barzana Crespo
→ jWebSocket Web Developer
→ vbarzana@jwebsocket.org
→ @vbarzana
slide 2 of 23
Topics
Introduction to jWebSocket
Application development concept
Sencha Touch && Ext JS integration
jQuery && jQueryMobile integration
Live coding
Real-time coding with jWebSocket slide 3 of 23
Status of Web Communication
* HTTP Protocol
→ Designed for document transmission
→ Cumbersome, nearly real-time tricks
→ Polling, Long-Polling
→ Reverse-AJAX, Comet etc.
→ Ultimately non-standardized hacks
→ Remains a Request/Response mechanism
Real-time coding with jWebSocket slide 4 of 23
WebSockets - Technology
* WebSocket Protocol
→ Permanent TCP connections,
bidirectional, full-duplex
→ 4oo times less overhead
→ ⅓ of latency
→ Standardized in HTML5 by W3C and IETF
→ protects investments
→ Single TCP Port
→ saves 50% server resources
Real-time coding with jWebSocket slide 5 of 23
WebSockets - Technology
* WebSocket Protocol
→ No Rules for Content
→ Text/Binary Frames, Chunking/Compression
→ Encryption (SSL/TLS)
→ No Limits for Formats/Sub-Protocols
→ protects investments
→ No Restrictions for Processing
→ Responsible for Logic, Security
Real-time coding with jWebSocket slide 6 of 23
WebSocket vs HTTP
You should use
WebSocket here!!!
→ quicker
→ cheaper
→ more portable
Real-time coding with jWebSocket slide 7 of 23
jWebSocket - Tokens Abstraction
→ Endpoints are stupid
→ Common language to
understand messages
→ Dataformats
* JSON, XML or CSV
Solution:
→ Abstract Data
Objects, in jWebSocket
Token
Endpoint Endpoint Browser Native client
STOMP JMS WebSocket WebSocket
csv JSON JSON XML
jWebSocket EnginesJMS Gateway
csv JSON JSON XML
Message Abstraction Layer
(Token-Processors, extendable)
Token
Message Security Layer
(Token-Filters, extendable)
jWebSocket Core
App App App Plug-in Plug-in Plug-in
Real-time coding with jWebSocket slide 8 of 23
jWebSocket Client Side
Real-time coding with jWebSocket slide 9 of 23
jWebSocket Client Side
Real-time coding with jWebSocket slide 10 of 23
jWebSocket Client Side / JavaScript
* Lightweight
* WebSocket Object Oriented JavaScript
framework
* WebSocket events flow
* Support for all browsers
* Integrable with any JS Technology
Some characteristics
jWebSocket.js
Real-time coding with jWebSocket slide 11 of 23
jWebSocket Client Side / Integration PlugIns
Real-time coding with jWebSocket slide 12 of 23
jWebSocket Client Side / jQuery Integration
$.jws
- fTokenClient: jWebSocketTokenClient
+open():void
+send(aNS, aType, aArgs, aCallbacks,...): void
+close():void
+processToken(aToken):void
+getConnection():jWebSocketTokenClient
+isConnected():Boolean
+addPlugIn(aPlugIn: Object):void
jWebSocketJQuery
PlugIn-1.0
Real-time coding with jWebSocket slide 13 of 23
jWebSocket Client Side / Sencha Integration
Ext.jws.Client
- fTokenClient: jWebSocketTokenClient
+open():void
+send(aNS, aType, aArgs, aCbs, aScope): void
+close():void
+processToken(aToken):void
+getConnection():jWebSocketTokenClient
+isConnected():Boolean
+addPlugIn(aPlugIn: Object):void
jWebSocketSencha
PlugIn-1.0
Real-time coding with jWebSocket slide 14 of 23
jWebSocket Client Side / Sencha Data Package
Real-time coding with jWebSocket slide 15 of 23
jWebSocket Client Side / Ext JS Integration
Real-time coding with jWebSocket slide 16 of 23
jWebSocket Client Side / Sencha Touch Integration
Real-time coding with jWebSocket slide 17 of 23
jWebSocket 1.0 mobile web development strategy
Application development concept
jQueryMobile Sencha Touch
➔ Complete integration
plug-in
➔ JavaScriptMVC + Models
based in jWebSocket
➔ Load jQueryMobile pages
with EJS template engine
➔ jWebSocket reached a complete
integration with Sencha
➔ Create comprehensible
applications for any kind of
user
➔ New communication mechanism
for Sencha Touch && Ext JS
slide 18 of 23
Applications can be totally generated from command line
Creating our first application
The Admin Client application will manage all the
information of the jWebSocket users. This module will
be accessible only by administrator users.
* Administrator
 Login/Logout
 List all users
 Add user
 Remove user
 Edit user
Use case:
Requirements:
Real-time coding with jWebSocket slide 19 of 23
First application: Sencha Touch User CRUD
Live coding session, Sencha Touch-jWebSocket
* Include jWebSocketSenchaPlugIn
* jWebSocket listeners
* Connect/Disconnect
* Login/Logout (Keep logged in using the session)
* Ext.jws.Proxy
* Form submit
* Server notifications
Real-time coding with jWebSocket slide 20 of 23
slide 21 of 23
First application: jQueryMobile User CRUD
Download the required libraries
→ jQuery 1.9.1-min
→ jquery.mobile-1.3.1-min
→ Personalize the download of jQueryMX
→ Download StealJS to manage application dependencies
./steal/js steal/generate/app jwsUserCrud
Generating the app from the command line
Real-time coding with jWebSocket slide 21 of 23
Live coding session, jQueryMobile-jWebSocket
First application: jQueryMobile User CRUD
* Include the requirements
* Connect/Disconnect
* jWebSocket listeners
* Login/Logout (Keep logged in using the
session)
* jWebSocket Models
- save
- findAll
- destroy
- update
* Submit forms
Real-time coding with jWebSocket slide 22 of 23
Questions, suggestions,...?
Thank you for attention!
Learn more: http://jwebsocket.org, @jWebSocket
a.schulze@innotrade.de, vbarzana@jwebsocket.org

More Related Content

PDF
Socket.io
PDF
Webkit overview
PDF
Nodejs and WebSockets
PDF
JooinK - DevFest Piemonte 2013
PDF
Real-time Web Application with Socket.IO, Node.js, and Redis
PDF
Websockets en Ruby en 5 Minutos
PDF
Socket.IO
ODP
Swt 2009
Socket.io
Webkit overview
Nodejs and WebSockets
JooinK - DevFest Piemonte 2013
Real-time Web Application with Socket.IO, Node.js, and Redis
Websockets en Ruby en 5 Minutos
Socket.IO
Swt 2009

What's hot (17)

PDF
WebSocket Server - Jul 2010
PDF
GWT Web Socket and data serialization
PDF
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
PPTX
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
PDF
Service Worker 201 (en)
PPTX
Google Chromebook for the Enterprise: Yeah or Meh?
PPTX
Real time web: is there a life without socket.io and node.js?
KEY
Realtime rocks
PDF
Lesson 09
PDF
Lesson 09
PPTX
Websocket
PDF
WebSocketでリアルタイム通信
PPTX
WebSockets in JEE 7
PPTX
Enhancing Mobile User Experience with WebSocket
PDF
JS digest. May 2017
ODP
EclipseCon USA 2011 Virgo Snaps
PDF
Programming WebSockets - OSCON 2010
WebSocket Server - Jul 2010
GWT Web Socket and data serialization
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
Service Worker 201 (en)
Google Chromebook for the Enterprise: Yeah or Meh?
Real time web: is there a life without socket.io and node.js?
Realtime rocks
Lesson 09
Lesson 09
Websocket
WebSocketでリアルタイム通信
WebSockets in JEE 7
Enhancing Mobile User Experience with WebSocket
JS digest. May 2017
EclipseCon USA 2011 Virgo Snaps
Programming WebSockets - OSCON 2010
Ad

Viewers also liked (7)

PDF
Building Next Generation Real-Time Web Applications using Websockets
PDF
Introduction and overview ArangoDB query language AQL
PDF
Intro to Graph Databases Using Tinkerpop, TitanDB, and Gremlin
PPT
How foreign investors can adapt to Brazilian systems: overview of taxation, t...
PPTX
6 Months of WebRTC in 10 minutes
PPTX
WebRTC approach
PDF
D1-3-Signaling
Building Next Generation Real-Time Web Applications using Websockets
Introduction and overview ArangoDB query language AQL
Intro to Graph Databases Using Tinkerpop, TitanDB, and Gremlin
How foreign investors can adapt to Brazilian systems: overview of taxation, t...
6 Months of WebRTC in 10 minutes
WebRTC approach
D1-3-Signaling
Ad

Similar to Real time coding with jWebSocket (20)

PPS
jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
PPS
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
PPS
WebSockets - Boosting Web Communication - SDC 2011
PPS
J web socket
PPTX
SenchaCon 2016: How to Give your Sencha App Real-time Web Performance - James...
PDF
WebSocket
PPTX
WebSockets-Revolutionizing-Real-Time-Communication.pptx
PDF
DevCon 5 (July 2013) - WebSockets
PPT
PDF
WebSocket in Enterprise Applications 2015
PDF
WebSocket Perspectives and Vision for the Future
PDF
WebSocket Push Fallback - Transcript.pdf
PPTX
Messaging for Real-time WebApps
PDF
WebSockets - Realtime em Mundo Conectado
PPTX
Programming WebSockets with Glassfish and Grizzly
PPT
Get Real: Adventures in realtime web apps
PDF
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
PPT
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
PPT
JUG louvain websockets
PDF
Dev con kolkata 2012 websockets
jWebSocket MobileTechCon 2010 - WebSockets on Android, Symbian and BlackBerry
Jwebsocketmobiletechcon2010en 100912071225 Phpapp01
WebSockets - Boosting Web Communication - SDC 2011
J web socket
SenchaCon 2016: How to Give your Sencha App Real-time Web Performance - James...
WebSocket
WebSockets-Revolutionizing-Real-Time-Communication.pptx
DevCon 5 (July 2013) - WebSockets
WebSocket in Enterprise Applications 2015
WebSocket Perspectives and Vision for the Future
WebSocket Push Fallback - Transcript.pdf
Messaging for Real-time WebApps
WebSockets - Realtime em Mundo Conectado
Programming WebSockets with Glassfish and Grizzly
Get Real: Adventures in realtime web apps
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
JUG louvain websockets
Dev con kolkata 2012 websockets

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Cloud computing and distributed systems.
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
cuic standard and advanced reporting.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Encapsulation theory and applications.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Reach Out and Touch Someone: Haptics and Empathic Computing
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Cloud computing and distributed systems.
MIND Revenue Release Quarter 2 2025 Press Release
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Machine learning based COVID-19 study performance prediction
Digital-Transformation-Roadmap-for-Companies.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Spectroscopy.pptx food analysis technology
cuic standard and advanced reporting.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
20250228 LYD VKU AI Blended-Learning.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Unlocking AI with Model Context Protocol (MCP)
The Rise and Fall of 3GPP – Time for a Sabbatical?
Encapsulation theory and applications.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Building Integrated photovoltaic BIPV_UPV.pdf

Real time coding with jWebSocket

  • 2. Real-time coding with jWebSocket About us * Alexander Schulze → jWebSocket Founder → a.schulze@innotrade.de → http://jwebsocket.org → @jWebSocket * Victor Antonio Barzana Crespo → jWebSocket Web Developer → vbarzana@jwebsocket.org → @vbarzana slide 2 of 23
  • 3. Topics Introduction to jWebSocket Application development concept Sencha Touch && Ext JS integration jQuery && jQueryMobile integration Live coding Real-time coding with jWebSocket slide 3 of 23
  • 4. Status of Web Communication * HTTP Protocol → Designed for document transmission → Cumbersome, nearly real-time tricks → Polling, Long-Polling → Reverse-AJAX, Comet etc. → Ultimately non-standardized hacks → Remains a Request/Response mechanism Real-time coding with jWebSocket slide 4 of 23
  • 5. WebSockets - Technology * WebSocket Protocol → Permanent TCP connections, bidirectional, full-duplex → 4oo times less overhead → ⅓ of latency → Standardized in HTML5 by W3C and IETF → protects investments → Single TCP Port → saves 50% server resources Real-time coding with jWebSocket slide 5 of 23
  • 6. WebSockets - Technology * WebSocket Protocol → No Rules for Content → Text/Binary Frames, Chunking/Compression → Encryption (SSL/TLS) → No Limits for Formats/Sub-Protocols → protects investments → No Restrictions for Processing → Responsible for Logic, Security Real-time coding with jWebSocket slide 6 of 23
  • 7. WebSocket vs HTTP You should use WebSocket here!!! → quicker → cheaper → more portable Real-time coding with jWebSocket slide 7 of 23
  • 8. jWebSocket - Tokens Abstraction → Endpoints are stupid → Common language to understand messages → Dataformats * JSON, XML or CSV Solution: → Abstract Data Objects, in jWebSocket Token Endpoint Endpoint Browser Native client STOMP JMS WebSocket WebSocket csv JSON JSON XML jWebSocket EnginesJMS Gateway csv JSON JSON XML Message Abstraction Layer (Token-Processors, extendable) Token Message Security Layer (Token-Filters, extendable) jWebSocket Core App App App Plug-in Plug-in Plug-in Real-time coding with jWebSocket slide 8 of 23
  • 9. jWebSocket Client Side Real-time coding with jWebSocket slide 9 of 23
  • 10. jWebSocket Client Side Real-time coding with jWebSocket slide 10 of 23
  • 11. jWebSocket Client Side / JavaScript * Lightweight * WebSocket Object Oriented JavaScript framework * WebSocket events flow * Support for all browsers * Integrable with any JS Technology Some characteristics jWebSocket.js Real-time coding with jWebSocket slide 11 of 23
  • 12. jWebSocket Client Side / Integration PlugIns Real-time coding with jWebSocket slide 12 of 23
  • 13. jWebSocket Client Side / jQuery Integration $.jws - fTokenClient: jWebSocketTokenClient +open():void +send(aNS, aType, aArgs, aCallbacks,...): void +close():void +processToken(aToken):void +getConnection():jWebSocketTokenClient +isConnected():Boolean +addPlugIn(aPlugIn: Object):void jWebSocketJQuery PlugIn-1.0 Real-time coding with jWebSocket slide 13 of 23
  • 14. jWebSocket Client Side / Sencha Integration Ext.jws.Client - fTokenClient: jWebSocketTokenClient +open():void +send(aNS, aType, aArgs, aCbs, aScope): void +close():void +processToken(aToken):void +getConnection():jWebSocketTokenClient +isConnected():Boolean +addPlugIn(aPlugIn: Object):void jWebSocketSencha PlugIn-1.0 Real-time coding with jWebSocket slide 14 of 23
  • 15. jWebSocket Client Side / Sencha Data Package Real-time coding with jWebSocket slide 15 of 23
  • 16. jWebSocket Client Side / Ext JS Integration Real-time coding with jWebSocket slide 16 of 23
  • 17. jWebSocket Client Side / Sencha Touch Integration Real-time coding with jWebSocket slide 17 of 23
  • 18. jWebSocket 1.0 mobile web development strategy Application development concept jQueryMobile Sencha Touch ➔ Complete integration plug-in ➔ JavaScriptMVC + Models based in jWebSocket ➔ Load jQueryMobile pages with EJS template engine ➔ jWebSocket reached a complete integration with Sencha ➔ Create comprehensible applications for any kind of user ➔ New communication mechanism for Sencha Touch && Ext JS slide 18 of 23 Applications can be totally generated from command line
  • 19. Creating our first application The Admin Client application will manage all the information of the jWebSocket users. This module will be accessible only by administrator users. * Administrator  Login/Logout  List all users  Add user  Remove user  Edit user Use case: Requirements: Real-time coding with jWebSocket slide 19 of 23
  • 20. First application: Sencha Touch User CRUD Live coding session, Sencha Touch-jWebSocket * Include jWebSocketSenchaPlugIn * jWebSocket listeners * Connect/Disconnect * Login/Logout (Keep logged in using the session) * Ext.jws.Proxy * Form submit * Server notifications Real-time coding with jWebSocket slide 20 of 23
  • 21. slide 21 of 23 First application: jQueryMobile User CRUD Download the required libraries → jQuery 1.9.1-min → jquery.mobile-1.3.1-min → Personalize the download of jQueryMX → Download StealJS to manage application dependencies ./steal/js steal/generate/app jwsUserCrud Generating the app from the command line Real-time coding with jWebSocket slide 21 of 23
  • 22. Live coding session, jQueryMobile-jWebSocket First application: jQueryMobile User CRUD * Include the requirements * Connect/Disconnect * jWebSocket listeners * Login/Logout (Keep logged in using the session) * jWebSocket Models - save - findAll - destroy - update * Submit forms Real-time coding with jWebSocket slide 22 of 23
  • 23. Questions, suggestions,...? Thank you for attention! Learn more: http://jwebsocket.org, @jWebSocket a.schulze@innotrade.de, vbarzana@jwebsocket.org