SlideShare a Scribd company logo
Coding for Desktop and Mobile
with HTML5 and Java EE 7
Petr Jiricka
SW Development Manager, Oracle
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.2
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.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.3
Program Agenda
 Architecture of Java EE 7/HTML5 apps
 Desktop and Mobile
 Hybrid applications with Cordova
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.4
Let’s look at a sample app
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.5
Architecture patterns
■ “Thin server” - JSON over HTTP
■ WebSocket - bidirectional client/server communication
– Extension of HTTP, HTTP communication can be upgraded to WebSocket
■ Client-side MVVM frameworks
■ Responsive web design
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.6
Java EE 7 features for HTML5 frontends
■ JAX-RS 2.0
– Standard API for Filters and Interceptors, Asynchronous processing,
Hypermedia, Jersey implementation has API for Server-Sent Events
■ WebSocket 1.0
– Server-side implementation of the WebSocket standard
■ JSON API 1.0
– Standard API for JSON, fine-grained control over JSON output
■ Servlet 3.1
– Protocol upgrade to WebSocket, NIO (new/non-blocking IO)
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.7
HTML5 trends and techniques
■ MVVM frameworks, Single-page apps
– Data binding, controller architecture, templating
■ JavaScript WebSocket API
– Supported by modern browsers (WARNING:
not the Android browser)
■ Responsive web design
– Device-specific styling based on device
parameters (e.g. width) using media queries
■ Hybrid applications
– Installable apps on mobile devices using
HTML5, tight integration with the device
–
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.8
Hybrid mobile applications with Cordova
■ Installed from the App store
■ Implemented using HTML5
■ Cross-platform
■ JavaScript APIs for device
features
■ http://cordova.apache.org/
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.9
Extending the sample app
■ Push notifications
– So the device gets an alert about the opponent’s move even if the app is
not running
■ Client-side
– Cordova plugin: https://github.com/phonegap-build/PushPlugin
– Send and receive JSON data
■ Server-side
– Send and receive JSON data
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.10
Extending the Chess app with push notifications
■ Cordova plugin: https://github.com/phonegap-build/PushPlugin
■ How it works
1. Client app registers with the Android/iOS notification service to obtain “id”
2. Client app sends its “id” to the server (JSON)
3. Server receives this id (JAX-RS) and stores it
4. When the server has an update, it sends it to Android/iOS notification
service (HTTP, JSON)
5. Device receives notification from the Android/iOS notification service
6. The notification is routed to the Cordova Push plugin
7. Your client application code is called to handle the notification
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.11
NetBeans 7.4 Features for Java EE 7
■ GlassFish 4
■ WebSocket
■ JAX-RS 2.0
■ JSON API
■ ...and many more
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.12
NetBeans 7.4 Features for HTML5
■ JavaScript, HTML, CSS editing, including jQuery, AngularJS, Knockout
■ DOM inspector and Visual CSS editor
■ JavaScript debugging
■ iOS and Android devices and emulators
■ Cordova application development (with iOS and Android)
■ Tight Chrome integration, embedded WebKit browser
■ SASS/LESS editing and on-the-fly compilation
■ Network Monitor
■ All this with HTML5 project type, or with Java Web apps (Maven or Ant)
■ ...and more
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.13
About NetBeans 7.4
■ Advanced HTML5 support first introduced in NetBeans 7.3
■ Java EE 7 support introduced in NetBeans 7.3.1
■ NetBeans 7.4 brings it all together
– Release Candidate 1 available now
– Final release expected in October 2013
– https://netbeans.org/community/releases/74/
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.14
Summary
■ Java EE 7 was made for HTML5 frontends
■ NetBeans IDE supports both Java EE 7 and HTML5
– with desktop browsers and mobile devices
– including hybrid apps with Cordova
– Release Candidate available now, final release in October
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.15
Graphic Section Divider
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.16

More Related Content

PPTX
The Developers Conference 2014 - Oracle Keynote
PPTX
Ruby and iOS: An inside look
PPTX
Introdução Ionic Framework - Meetup SP
KEY
How to do Scalable UI-Heavy Development at a Breakneck Pace
PDF
Web Application Security Reloaded for the HTML5 era
PPTX
Native - Hybrid - Web Mobile Architectures
PDF
Architecting your app in ext js 4, part 1 learn sencha
PDF
Java Development Company | Xicom
The Developers Conference 2014 - Oracle Keynote
Ruby and iOS: An inside look
Introdução Ionic Framework - Meetup SP
How to do Scalable UI-Heavy Development at a Breakneck Pace
Web Application Security Reloaded for the HTML5 era
Native - Hybrid - Web Mobile Architectures
Architecting your app in ext js 4, part 1 learn sencha
Java Development Company | Xicom

What's hot (18)

PDF
Gsm library for proteus the engineering projects
PDF
JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE
PDF
PixelCrayons: Hire India's Top PHP Developers
PDF
Continuous Security: Zap security bugs now Codemotion-2015
PPTX
Basic Vaadin knowledge
PDF
CSC 404 | Final Presentation
PDF
Web Frameworks of the Future
PPTX
Django Frame Work
DOCX
Basic Java script handouts for students
PDF
Apps multiplataforma com HTML5
PDF
Desenvolvimento de Aplicativo Multiplataforma com Intel® XDK
PDF
Ugly truths about html5 moosecon - robert virkus - 2013-03-07
PDF
Desenvolvimento Apps multiplataforma para dispositivos móveis usando HTML5
PDF
Introduction To NetBeans IDE
PPTX
Complete guide of python development
PPTX
Cisco Spark the Industry Challenge
PDF
Mobile Websites und (Web)-Apps mit jQuery Mobile
PDF
ACM SIGCHI EICS-2019 Keynote. Quid, Pedro J. Molina
Gsm library for proteus the engineering projects
JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE
PixelCrayons: Hire India's Top PHP Developers
Continuous Security: Zap security bugs now Codemotion-2015
Basic Vaadin knowledge
CSC 404 | Final Presentation
Web Frameworks of the Future
Django Frame Work
Basic Java script handouts for students
Apps multiplataforma com HTML5
Desenvolvimento de Aplicativo Multiplataforma com Intel® XDK
Ugly truths about html5 moosecon - robert virkus - 2013-03-07
Desenvolvimento Apps multiplataforma para dispositivos móveis usando HTML5
Introduction To NetBeans IDE
Complete guide of python development
Cisco Spark the Industry Challenge
Mobile Websites und (Web)-Apps mit jQuery Mobile
ACM SIGCHI EICS-2019 Keynote. Quid, Pedro J. Molina
Ad

Similar to Coding for Desktop and Mobile with HTML5 and Java EE 7 (20)

PPTX
Hybrid Mobile Apps - Meetup
PDF
Kendo UI workshop introduction - PUG Baltic Annual Conference 2017
DOC
PPTX
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
PDF
How Scala, Wicket, and Java EE Can Improve Web Development
PDF
Resume
PDF
CNUG ASP.NET MVC 4 – New Features
PPTX
Mobile Apps Develpment - A Comparison
PDF
Development Workshop on ET1, Android and Motorola RhoElements
PPTX
Adf mobile overview
PPTX
Hybrid mobile development with Oracle JET
PPTX
Web Application Development
PPT
Phonegap android
PPTX
Oracle JET overview
PPTX
Front End Development | Introduction
PDF
[English version] JavaFX and Web Integration
PDF
Node.js Tools Ecosystem
ODP
Netbeans65 Osum Slides
PPTX
Session 01_02-Introduction to React Native .pptx
DOCX
Hybrid Mobile Apps - Meetup
Kendo UI workshop introduction - PUG Baltic Annual Conference 2017
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
How Scala, Wicket, and Java EE Can Improve Web Development
Resume
CNUG ASP.NET MVC 4 – New Features
Mobile Apps Develpment - A Comparison
Development Workshop on ET1, Android and Motorola RhoElements
Adf mobile overview
Hybrid mobile development with Oracle JET
Web Application Development
Phonegap android
Oracle JET overview
Front End Development | Introduction
[English version] JavaFX and Web Integration
Node.js Tools Ecosystem
Netbeans65 Osum Slides
Session 01_02-Introduction to React Native .pptx
Ad

Recently uploaded (20)

PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Cloud computing and distributed systems.
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Electronic commerce courselecture one. Pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Per capita expenditure prediction using model stacking based on satellite ima...
Unlocking AI with Model Context Protocol (MCP)
Network Security Unit 5.pdf for BCA BBA.
Diabetes mellitus diagnosis method based random forest with bat algorithm
Cloud computing and distributed systems.
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Chapter 3 Spatial Domain Image Processing.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Big Data Technologies - Introduction.pptx
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Digital-Transformation-Roadmap-for-Companies.pptx
20250228 LYD VKU AI Blended-Learning.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Electronic commerce courselecture one. Pdf

Coding for Desktop and Mobile with HTML5 and Java EE 7

  • 1. Coding for Desktop and Mobile with HTML5 and Java EE 7 Petr Jiricka SW Development Manager, Oracle
  • 2. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.2 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.3 Program Agenda  Architecture of Java EE 7/HTML5 apps  Desktop and Mobile  Hybrid applications with Cordova
  • 4. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.4 Let’s look at a sample app
  • 5. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.5 Architecture patterns ■ “Thin server” - JSON over HTTP ■ WebSocket - bidirectional client/server communication – Extension of HTTP, HTTP communication can be upgraded to WebSocket ■ Client-side MVVM frameworks ■ Responsive web design
  • 6. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.6 Java EE 7 features for HTML5 frontends ■ JAX-RS 2.0 – Standard API for Filters and Interceptors, Asynchronous processing, Hypermedia, Jersey implementation has API for Server-Sent Events ■ WebSocket 1.0 – Server-side implementation of the WebSocket standard ■ JSON API 1.0 – Standard API for JSON, fine-grained control over JSON output ■ Servlet 3.1 – Protocol upgrade to WebSocket, NIO (new/non-blocking IO)
  • 7. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.7 HTML5 trends and techniques ■ MVVM frameworks, Single-page apps – Data binding, controller architecture, templating ■ JavaScript WebSocket API – Supported by modern browsers (WARNING: not the Android browser) ■ Responsive web design – Device-specific styling based on device parameters (e.g. width) using media queries ■ Hybrid applications – Installable apps on mobile devices using HTML5, tight integration with the device –
  • 8. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.8 Hybrid mobile applications with Cordova ■ Installed from the App store ■ Implemented using HTML5 ■ Cross-platform ■ JavaScript APIs for device features ■ http://cordova.apache.org/
  • 9. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.9 Extending the sample app ■ Push notifications – So the device gets an alert about the opponent’s move even if the app is not running ■ Client-side – Cordova plugin: https://github.com/phonegap-build/PushPlugin – Send and receive JSON data ■ Server-side – Send and receive JSON data
  • 10. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.10 Extending the Chess app with push notifications ■ Cordova plugin: https://github.com/phonegap-build/PushPlugin ■ How it works 1. Client app registers with the Android/iOS notification service to obtain “id” 2. Client app sends its “id” to the server (JSON) 3. Server receives this id (JAX-RS) and stores it 4. When the server has an update, it sends it to Android/iOS notification service (HTTP, JSON) 5. Device receives notification from the Android/iOS notification service 6. The notification is routed to the Cordova Push plugin 7. Your client application code is called to handle the notification
  • 11. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.11 NetBeans 7.4 Features for Java EE 7 ■ GlassFish 4 ■ WebSocket ■ JAX-RS 2.0 ■ JSON API ■ ...and many more
  • 12. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.12 NetBeans 7.4 Features for HTML5 ■ JavaScript, HTML, CSS editing, including jQuery, AngularJS, Knockout ■ DOM inspector and Visual CSS editor ■ JavaScript debugging ■ iOS and Android devices and emulators ■ Cordova application development (with iOS and Android) ■ Tight Chrome integration, embedded WebKit browser ■ SASS/LESS editing and on-the-fly compilation ■ Network Monitor ■ All this with HTML5 project type, or with Java Web apps (Maven or Ant) ■ ...and more
  • 13. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.13 About NetBeans 7.4 ■ Advanced HTML5 support first introduced in NetBeans 7.3 ■ Java EE 7 support introduced in NetBeans 7.3.1 ■ NetBeans 7.4 brings it all together – Release Candidate 1 available now – Final release expected in October 2013 – https://netbeans.org/community/releases/74/
  • 14. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.14 Summary ■ Java EE 7 was made for HTML5 frontends ■ NetBeans IDE supports both Java EE 7 and HTML5 – with desktop browsers and mobile devices – including hybrid apps with Cordova – Release Candidate available now, final release in October
  • 15. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.15 Graphic Section Divider
  • 16. Copyright © 2012, Oracle and/or its affiliates. All rights reserved.16