SlideShare a Scribd company logo
Techniques For Responsive
Real-Time Web User Interfaces

Roger Kitain
Principal Member Technical Staff




1   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
Background
        Who Am I?

           Primary responsibility: JSF at Oracle
           JSF Co-spec lead for 1.2, 2.0
           Work related passion: Client side, JavaScript, Real-time web
            communication
           Hobbies: Music (Guitar), Hockey, Robotics, code slinger, all things
            cool!




2   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
The following is intended to outline our general product direction. It is
          intended
          for information purposes only, and may not be incorporated into any
          contract.
          It is not a commitment to deliver any material, code, or functionality, and
          should not be relied upon in making purchasing decisions. The
          development, release, and timing of any features or functionality
          described for Oracle’s products remains at the sole discretion of Oracle.




3   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
Program Agenda


         Introduction
         The Real-Time Web
         User Interface Techniques
         Demos
         Summary



4   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
“Twitter is just a multiplayer notepad.”
           Ben Maddux

        “The internet: Transforming Society
        And Shaping the Future Through Chat”
            Dave Barry




5   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
Introduction
            Traditional web: request / response model
                      – Based on HTTP
                      – No server initiated events

            Dynamic web:
                      – Web more dynamic since 1990’s
                      – Java Applets (1995), iframe (1996),
                            JavaScript, DHTML, Ajax




6   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
The Real-time Web
        Traditional Patterns




7   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
The Real-time Web
        Traditional Technologies

                             Partial Page Refresh                                                                                    No standard implementation

                             Real-time through polling                                                                               Complex: HTTP not designed to
                                                                                                                                     send unrequested server
                                                                                                                                     responses




8   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
Real-time Communication
        Server Sent Events : HTML5 “Streaming”

           Web page subscribes to a stream of DOM events from server
           Unidirectional: events form server to client (over HTTP)
           Evolved from April 2004 proposal:
                     – http://ln.hixie.ch/?count=1&start=1083167110
           Specification:
                     – http://www.w3.org/TR/eventsource/




9   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
Real-time Communication
         Server Sent Events : Client




10   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
Real-time Communication
         Web Sockets: HTML5 “Full Duplex”

            Bidirectional client / server connection
            HTTP for initial handshake
            Connection: upgrade from HTTP to WS protocol
            Data sent in frames – Each frame (example):
                                 0x00Hello World0xff                                                     Data (Hello World) is UTF-8




11   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
Real-time Communication
         Web Sockets : Client




12   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
User Interface Techniques
         Component Pattern

            Based on JSF 2.x component model and JavaScript
            Encapsulate HTML5 JavaScript API within JSF component.
            Connection established when page loads
            JSF component may also render “placeholder” markup for receiving
             message data.
            Works for Server Sent Events, Web Socket




13   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
User Interface Techniques
         Model Pattern

            Use Java API to start a connection from a model bean action method
            Connection established as the result of some user action
            JSF component may also render “placeholder” markup for receiving
             message data.
            Consider how to handle connection when bean goes out of scope




14   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
DEMO




15   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
Real-time Web
         Use Case: Device Control




                                                                                                 Web Socket                                     Physical
                                                                                                   Server                                        Device




16   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
DEMO




17   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
Real-time Web
         Use Case: Device Control




        Browser                                                                                  Web Socket                                     Physical
         Client                                                                                    Server                                        Device

                                                                                            Bean
                                                                                                                             Socket              Device
        JavaScript                                                                                                           Handler              SDK
           API




18   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
HTML5 Technology Availability
         Useful Resources


            http://caniuse.com
            http://feeds.feedburner.com/WhenCanIUse




19   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
HTML5 Technology
         Availability




20   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
HTML5 Technology
         Availability




21   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
Summary

            Traditional web / dynamic web
            Traditional patterns / technologies
            Real-time communication (HTML5)
            User interface techniques
            Use cases




22   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
References


            http://thethirdstone.com
            http://java.net/projects/websocket-spec
            http://jcp.org/en/jsr/detail?id=356




23   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
Q&A


24   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13
Graphic Section Divider




25   Copyright © 2012, Oracle and/or its affiliates. All rights reserved.   Insert Information Protection Policy Classification from Slide 13

More Related Content

PDF
Ebs troubleshooting con9019_pdf_9019_0001
jucaab
 
PPTX
Con8834 bring your own identity - final
OracleIDM
 
PPTX
Con8828 justifying and planning a successful identity management upgrade final
OracleIDM
 
PDF
Ebs idm con9020_pdf_9020_0001
jucaab
 
PDF
Websocket 1.0
Arun Gupta
 
PDF
Java Embedded у вас дома
Diana Dymolazova
 
DOCX
Naresh_Profile
Naresh Reddy
 
PDF
Java EE 7 and HTML5: Developing for the Cloud
Arun Gupta
 
Ebs troubleshooting con9019_pdf_9019_0001
jucaab
 
Con8834 bring your own identity - final
OracleIDM
 
Con8828 justifying and planning a successful identity management upgrade final
OracleIDM
 
Ebs idm con9020_pdf_9020_0001
jucaab
 
Websocket 1.0
Arun Gupta
 
Java Embedded у вас дома
Diana Dymolazova
 
Naresh_Profile
Naresh Reddy
 
Java EE 7 and HTML5: Developing for the Cloud
Arun Gupta
 

What's hot (11)

PDF
Newfeaturesincontext 130911052709-phpapp01
Frank Rodriguez
 
PDF
12.2 l2 implement-and_use_order management_ame integration
Vishal Sharma
 
PDF
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Arun Gupta
 
PDF
Александр Белокрылов, Александр Мироненко. Java Embedded у вас дома
Volha Banadyseva
 
PDF
11212017 oracle project_portfolio_management_cloud_functional_known_issues_-_...
Beverley Baker-Harris
 
DOC
Resume - Rajesh Lohakare
Rajesh Lohakare
 
DOC
Resume - Rajesh Lohakare
Rajesh Lohakare
 
PDF
OSGi Community Event 2010 - Enterprise OSGi in WebSphere and Apache Aries
mfrancis
 
PPTX
Isaca e symposium understanding your data flow jul 6
Ulf Mattsson
 
PDF
Imdad resume
imdadareeph
 
Newfeaturesincontext 130911052709-phpapp01
Frank Rodriguez
 
12.2 l2 implement-and_use_order management_ame integration
Vishal Sharma
 
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Arun Gupta
 
Александр Белокрылов, Александр Мироненко. Java Embedded у вас дома
Volha Banadyseva
 
11212017 oracle project_portfolio_management_cloud_functional_known_issues_-_...
Beverley Baker-Harris
 
Resume - Rajesh Lohakare
Rajesh Lohakare
 
Resume - Rajesh Lohakare
Rajesh Lohakare
 
OSGi Community Event 2010 - Enterprise OSGi in WebSphere and Apache Aries
mfrancis
 
Isaca e symposium understanding your data flow jul 6
Ulf Mattsson
 
Imdad resume
imdadareeph
 
Ad

Similar to Con5133 (20)

PDF
HTML5 Websockets and Java - Arun Gupta
JAX London
 
PDF
Html5 web sockets - Brad Drysdale - London Web 2011-10-20
Nathan O'Hanlon
 
PDF
Ajax Push For Revolutionary Enterprise Applications
elliando dias
 
PDF
Lecture 11 client_server_interaction
Serious_SamSoul
 
PPT
Chapter - 1 Introduction to networking (3).ppt
Ethiopia Satlliet television
 
PDF
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Arun Gupta
 
PPT
02 intro
babak mehrabi
 
PDF
Html5 Application Security
chuckbt
 
PDF
CommTech Talks: Lightstreamer (A. Alinone)
Antonio Capone
 
PDF
Voice and Video on the Web
Kundan Singh
 
ODP
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Masoud Kalali
 
PDF
Web Application Solutions
Alexander Sergeev
 
PDF
HTTP/2 Comes to Java - What Servlet 4.0 Means to You
David Delabassee
 
PPTX
Web application development ( basics )
Chirag Nag
 
PPTX
Server vs Client in real life and in programming world
Manoj Kumar
 
PDF
API Design and WebSocket
Frank Greco
 
PDF
CNIT 129S: Ch 3: Web Application Technologies
Sam Bowne
 
PDF
Html6 forgotten in html5
Mathieu Elie
 
PPT
App layer
khushali_modi
 
HTML5 Websockets and Java - Arun Gupta
JAX London
 
Html5 web sockets - Brad Drysdale - London Web 2011-10-20
Nathan O'Hanlon
 
Ajax Push For Revolutionary Enterprise Applications
elliando dias
 
Lecture 11 client_server_interaction
Serious_SamSoul
 
Chapter - 1 Introduction to networking (3).ppt
Ethiopia Satlliet television
 
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Arun Gupta
 
02 intro
babak mehrabi
 
Html5 Application Security
chuckbt
 
CommTech Talks: Lightstreamer (A. Alinone)
Antonio Capone
 
Voice and Video on the Web
Kundan Singh
 
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Masoud Kalali
 
Web Application Solutions
Alexander Sergeev
 
HTTP/2 Comes to Java - What Servlet 4.0 Means to You
David Delabassee
 
Web application development ( basics )
Chirag Nag
 
Server vs Client in real life and in programming world
Manoj Kumar
 
API Design and WebSocket
Frank Greco
 
CNIT 129S: Ch 3: Web Application Technologies
Sam Bowne
 
Html6 forgotten in html5
Mathieu Elie
 
App layer
khushali_modi
 
Ad

Recently uploaded (20)

PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 

Con5133

  • 1. Techniques For Responsive Real-Time Web User Interfaces Roger Kitain Principal Member Technical Staff 1 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 2. Background Who Am I?  Primary responsibility: JSF at Oracle  JSF Co-spec lead for 1.2, 2.0  Work related passion: Client side, JavaScript, Real-time web communication  Hobbies: Music (Guitar), Hockey, Robotics, code slinger, all things cool! 2 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 3. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 3 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 4. Program Agenda  Introduction  The Real-Time Web  User Interface Techniques  Demos  Summary 4 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 5. “Twitter is just a multiplayer notepad.” Ben Maddux “The internet: Transforming Society And Shaping the Future Through Chat” Dave Barry 5 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 6. Introduction  Traditional web: request / response model – Based on HTTP – No server initiated events  Dynamic web: – Web more dynamic since 1990’s – Java Applets (1995), iframe (1996), JavaScript, DHTML, Ajax 6 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 7. The Real-time Web Traditional Patterns 7 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 8. The Real-time Web Traditional Technologies Partial Page Refresh No standard implementation Real-time through polling Complex: HTTP not designed to send unrequested server responses 8 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 9. Real-time Communication Server Sent Events : HTML5 “Streaming”  Web page subscribes to a stream of DOM events from server  Unidirectional: events form server to client (over HTTP)  Evolved from April 2004 proposal: – http://ln.hixie.ch/?count=1&start=1083167110  Specification: – http://www.w3.org/TR/eventsource/ 9 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 10. Real-time Communication Server Sent Events : Client 10 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 11. Real-time Communication Web Sockets: HTML5 “Full Duplex”  Bidirectional client / server connection  HTTP for initial handshake  Connection: upgrade from HTTP to WS protocol  Data sent in frames – Each frame (example): 0x00Hello World0xff Data (Hello World) is UTF-8 11 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 12. Real-time Communication Web Sockets : Client 12 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 13. User Interface Techniques Component Pattern  Based on JSF 2.x component model and JavaScript  Encapsulate HTML5 JavaScript API within JSF component.  Connection established when page loads  JSF component may also render “placeholder” markup for receiving message data.  Works for Server Sent Events, Web Socket 13 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 14. User Interface Techniques Model Pattern  Use Java API to start a connection from a model bean action method  Connection established as the result of some user action  JSF component may also render “placeholder” markup for receiving message data.  Consider how to handle connection when bean goes out of scope 14 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 15. DEMO 15 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 16. Real-time Web Use Case: Device Control Web Socket Physical Server Device 16 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 17. DEMO 17 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 18. Real-time Web Use Case: Device Control Browser Web Socket Physical Client Server Device Bean Socket Device JavaScript Handler SDK API 18 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 19. HTML5 Technology Availability Useful Resources  http://caniuse.com  http://feeds.feedburner.com/WhenCanIUse 19 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 20. HTML5 Technology Availability 20 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 21. HTML5 Technology Availability 21 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 22. Summary  Traditional web / dynamic web  Traditional patterns / technologies  Real-time communication (HTML5)  User interface techniques  Use cases 22 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 23. References  http://thethirdstone.com  http://java.net/projects/websocket-spec  http://jcp.org/en/jsr/detail?id=356 23 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 24. Q&A 24 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13
  • 25. Graphic Section Divider 25 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13