SlideShare una empresa de Scribd logo
1 de 39
5 x HTML5
in
APEX (5)
Christian Rokitta
HTML5 + APEX5 = Perfect 10
(Shakeeb)
Program
• HTML 5 – What‘s new?
• HTML5 Tags
o <dialog> element: Modals made easy
o <output>
• HTML5 API’s
o Drag and Drop
o Geolocation API
o SSE
Why HTML5?
• Multiple Devices (Mobile, Mobile, Mobile)
• Modular
• Multimedia
• Semantics (cleaner code, accessibility)
• Interactivity (tighter integration with
JavaScript)
• Structure vs Presentation, CSS3
What is New in HTML5?
• Simplified DOCTYPE: <!DOCTYPE html>
• New HTML Elements
• HTML APIs
• Elements Removed in HTML5  CSS
<center>, <frame>/<frameset>, <big>, <font>, …
Standard? Sorry, not yet.
Version Year
Tim Berners-Lee invented www 1989
Tim Berners-Lee invented HTML 1991
Dave Raggett drafted HTML+ 1993
HTML Working Group defined HTML 2.0 1995
W3C Recommended HTML 3.2 1997
W3C Recommended HTML 4.01 1999
W3C Recommended XHTML 1.0 2000
HTML5 WHATWG* First Public Draft 2008
HTML5 WHATWG Living Standard 2012
HTML5 W3C Final Recommendation 2014
*) Web Hypertext Application Technology Working Group - was formed in response to slow W3C development, and W3C's decision to close
down the development of HTML, in favor of XHTML
HTML5 New Elements
• Semantic/Structural Elements
<article>, <aside>, <dialog> <footer>, <header>, <menuitem>, <nav>, <section>, …
• Form Elements
<datalist>, <output>, …
• Input Types
tel, timcolor, date, email, number,search, e, url, …
• Input Attributes
autocomplete, autofocus, min/max, placeholder, …
• New Attribute Syntax
<input type="text" value=John>, <input type="text" value='John Doe'>, …
• HTML5 Graphics
<canvas>, <svg>
• New Media Elements
<audio>, <video>, <track>, …
<dialog> element: Modals made
easy
<table>
<tr>
<th>January <dialog open>This is an open dialog window</dialog></th>
<th>February</th>
<th>March</th>
</tr>
<tr>
<td>31</td>
<td>28</td>
<td>31</td>
</tr>
</table>
<table>
<tr>
<th>January <dialog>This is an open dialog window</dialog></th>
<th>February</th>
<th>March</th>
</tr>
<tr>
<td>31</td>
<td>28</td>
<td>31</td>
</tr>
</table>
<dialog> element: specs
• show(): Open dialog.
• close(): Close dialog. Takes an optional argument
which if present dialog.returnValue is set to.
• showModal(): Open modal dialog.
• ::backdrop: Pseudo-element to style background
behind a modal dialog.
• close event: Fired when a dialog is closed.
• cancel event: Fired when the Escape key is pressed
on a modal dialog.
<dialog> demo
<dialog>, some final questions
• Why do we need <dialog> element while it's
possible using libraries?
o great for accessibility
o modal dialogs are pushed on a well-ordered stack (no z-
index)
• How do I position a dialog?
CSS! default CSS includes "position: absolute; left: 0; right: 0;
margin: auto;" which horizontally centers the element within
its container.
• Can I open multiple dialogs?
Yes. Much like multiple <div> elements stacked on eachother.
<output> element: input Antipode
<form>
<label for="ticketcount">Number of passes</label>
<input type="number" name="ticketcount" id="ticketcount"
min="1" max="12" value="1" onchange="spinny()">
<span id="price">@ $25 per ticket</span> =
<output name="total" for="ticketcount price">$25</output>
</form>
var total = document.querySelector('output[name="total"]');
var ticketcount = document.getElementById('ticketcount');
function spinny() { total.value = "$" + parseInt(ticketcount.value) * 25; }
<output> element: specs
<form oninput="x.value=parseInt(a.value)+parseInt(b.value)">0
<input type="range" id="a" value="50">100
+<input type="number" id="b" value="50">
=<output name="x" for="a b"></output>
</form>
HTML5 valueAsNumber input element property:
<form oninput="x.value=a.valueAsNumber+b.valueAsNumber">0
<input type="range" id="a" value="50">100
+<input type="number" id="b" value="50">
=<output name="x" for="a b"></output>
</form>
<output> element: Attributes
Attribute Value Description
for element_id Specifies the relationship between the result of the
calculation, and the elements used in the calculation
form form_id Specifies one or more forms the output element belongs to
name name Specifies a name for the output element
<output> demo
Drag and Drop API
Drag and drop is a very common feature. It is
when you "grab" an object and drag it to a
different location.
In HTML5, drag and drop is part of the standard,
and any element can be draggable.
Drag and Drop Example
<!DOCTYPE HTML>
<html>
<head>
<script>
function allowDrop(ev) {
ev.preventDefault();
}
function drag(ev) {
ev.dataTransfer.setData("text", ev.target.id);
}
function drop(ev) {
ev.preventDefault();
var data = ev.dataTransfer.getData("text");
ev.target.appendChild(document.getElementById(data));
}
</script>
</head>
<body>
<div id="div1" ondrop="drop(event)" ondragover="allowDrop(event)"></div>
<img id="drag1" src="img_logo.gif" draggable="true"
ondragstart="drag(event)" width="336" height="69">
</body>
</html>
Parts of a Drag and Drop event
• Make an Element Draggable
<img draggable="true">
• What to Drag - ondragstart and setData()
function drag(ev) {
ev.dataTransfer.setData("text", ev.target.id);
}
• Where to Drop – ondragover
event.preventDefault()
• Do the Drop - ondrop
function drop(ev) {
ev.preventDefault();
var data = ev.dataTransfer.getData("text");
ev.target.appendChild(document.getElementById(data));
}
Drag and Drop demo
Geolocation API
The HTML Geolocation API is used to get the
geographical position of a user/device*.
Since this can compromise user privacy, the
position is not available unless the user
approves it.
*) accurate for devices with GPS
Using HTML Geolocation
<script>
var x = document.getElementById("demo");
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
} else {
x.innerHTML = "Geolocation is not supported by this browser.";
}
}
function showPosition(position) {
x.innerHTML = "Latitude: " + position.coords.latitude +
"<br>Longitude: " + position.coords.longitude;
}
</script>
Geolocation Example explained
• Check if Geolocation is supported
• If supported, run the getCurrentPosition()
method. If not, display a message to the user
• If the getCurrentPosition() method is successful,
it returns a coordinates object to the function
specified in the parameter ( showPosition )
• The showPosition() function gets the displays the
Latitude and Longitude
Handling Errors and Rejections
navigator.geolocation.getCurrentPosition(showPosition,showError);
function showError(error) {
switch(error.code) {
case error.PERMISSION_DENIED:
x.innerHTML = "User denied the request for Geolocation."
break;
case error.POSITION_UNAVAILABLE:
x.innerHTML = "Location information is unavailable."
break;
case error.TIMEOUT:
x.innerHTML = "The request to get user location timed out."
break;
case error.UNKNOWN_ERROR:
x.innerHTML = "An unknown error occurred."
break;
}
}
getCurrentPosition() - Return Data
Property Description
coords.latitude The latitude as a decimal number
coords.longitude The longitude as a decimal number
coords.accuracy The accuracy of position
coords.altitude The altitude in meters above the mean sea level
coords.altitudeAccuracy The altitude accuracy of position
coords.heading The heading as degrees clockwise from North
coords.speed The speed in meters per second
timestamp The date/time of the response
The getCurrentPosition() method returns an object if it is successful. The latitude, longitude and
accuracy properties are always returned. The other properties below are returned if available.
Geolocation - Other Methods
id = navigator.geolocation.watchPosition( success
, error
, options);
options = { enableHighAccuracy: false
, timeout: 5000
, maximumAge: 0 };
navigator.geolocation.clearWatch(id);
Geolocation Demo
Server-Sent Events - One Way Messaging
• A server-sent event is when a web page
automatically gets updates from a server.
• A web app "subscribes" to a stream of
updates generated by a server and, whenever
a new event occurs, a notification is triggered
on the client.
Server-Sent Events vs. WebSockets
Websockets:
• APIs like WebSockets provide a richer protocol
to perform bi-directional, full-duplex
communication.
• Two-way channel is more attractive for things
like games, messaging apps, and for cases
where you need near real-time updates in
both directions.
Server-Sent Events vs. WebSockets
Server-Send Events:
• Two-way channel is more attractive for things like
games, messaging apps, and for cases where you
need near real-time updates in both directions.
• SSE in favor when you simply need updates from
some server action. If you'll need to send data to
a server, XMLHttpRequest is always a friend.
Server-Sent Events vs. WebSockets
SSEs are sent over traditional HTTP. That means
they do not require a special protocol or server
implementation to get working.
WebSockets on the other hand, require full-
duplex connections and new Web Socket servers
to handle the protocol.
In addition, Server-Sent Events have a variety of
features that WebSockets lack by design such
as automatic reconnection, event IDs.
SSE API - subscribe to an event stream
if (!!window.EventSource) {
var source = new EventSource('stream.php');
} else {
// Result to xhr polling :(
}
URL passed to the EventSource constructor is an absolute URL, its origin
(scheme, domain, port) must match that of the calling page
SSE API - handler for the message event
source.addEventListener('message', function(e) {
console.log(e.data);
}, false);
Optioneel:
source.addEventListener('open', function(e) {
// Connection was opened.
}, false);
source.addEventListener('error', function(e) {
if (e.readyState == EventSource.CLOSED) {
// Connection was closed.
}
}, false);
SSE API
• When updates are pushed from the server,
the onmessage handler fires and new data is be
available in its e.data property.
• The magical part is that whenever the connection
is closed, the browser will automatically
reconnect to the source after ~3 seconds.
• Your server implementation can even have
control over this reconnection timeout.
• That's it.
SSE - Event Stream Format
Plaintext response, served with a
text/event-stream Content-Type, that follows the SSE format.
In its basic form, the response should contain a "data:" line,
followed by your message, followed by two "n" characters to
end the stream:
data: My messagenn
Multiline Data:
data: first linen
data: second linenn
SSE - Send JSON Data
data: {n
data: "msg": "hello world",n
data: "id": 12345n
data: }nn
source.addEventListener('message', function(e) {
var data = JSON.parse(e.data);
console.log(data.id, data.msg);
}, false
);
SSE - Controlling the Reconnection-
timeout
The browser attempts to reconnect to the source roughly
3 seconds after each connection is closed. You can change
that timeout by including a line beginning with "retry:",
followed by the number of milliseconds to wait before
trying to reconnect.
The following example attempts a reconnect after 10
seconds:
retry: 10000n
data: hello worldnn
SSE Server – APEX Before Header Proces
DECLARE
dummy VARCHAR2(10);
BEGIN
sys.HTP.flush;
sys.HTP.init;
sys.OWA_UTIL.mime_header('text/event-stream', FALSE);
sys.OWA_UTIL.http_header_close;
sys.HTP.p('retry: 10000');
sys.HTP.p('data: {');
sys.HTP.p('data: "msg": "hello world",');
sys.HTP.p('data: "id": 12345');
sys.HTP.p('data: }');
sys.HTP.p(dummy);
APEX_APPLICATION.stop_apex_engine;
END;
SSE - Demo
bit.ly/1QGhkBz
apex.oracle.com/pls/apex/f?p=ac15geo
10. Juni, 11:00 – 11:45, Landskrone
Q & A
http://rokitta.blogspot.com
@crokitta
christian@rokitta.nl
http://www.themes4apex.com
http://plus.google.com/+ChristianRokitta
http://nl.linkedin.com/in/rokit/

Más contenido relacionado

La actualidad más candente

Get the Look and Feel You Want in Oracle APEX
Get the Look and Feel You Want in Oracle APEXGet the Look and Feel You Want in Oracle APEX
Get the Look and Feel You Want in Oracle APEXJorge Rimblas
 
How to make APEX print through Node.js
How to make APEX print through Node.jsHow to make APEX print through Node.js
How to make APEX print through Node.jsDimitri Gielis
 
COB - PowerApps - the good, the bad and the ugly - early 2018
COB - PowerApps - the good, the bad and the ugly - early 2018COB - PowerApps - the good, the bad and the ugly - early 2018
COB - PowerApps - the good, the bad and the ugly - early 2018Chris O'Brien
 
Oracle APEX migration to 5.1 - Our experience
Oracle APEX migration to 5.1 - Our experienceOracle APEX migration to 5.1 - Our experience
Oracle APEX migration to 5.1 - Our experienceLino Schildenfeld
 
Creating Single Page Applications with Oracle Apex
Creating Single Page Applications with Oracle ApexCreating Single Page Applications with Oracle Apex
Creating Single Page Applications with Oracle ApexDick Dral
 
A Primer on Web Components in APEX
A Primer on Web Components in APEXA Primer on Web Components in APEX
A Primer on Web Components in APEXDimitri Gielis
 
COB ESPC18 - Rich PowerApps with offline support
COB ESPC18 - Rich PowerApps with offline supportCOB ESPC18 - Rich PowerApps with offline support
COB ESPC18 - Rich PowerApps with offline supportChris O'Brien
 
Moving your APEX app to the Oracle Exadata Express Cloud
Moving your APEX app to the Oracle Exadata Express CloudMoving your APEX app to the Oracle Exadata Express Cloud
Moving your APEX app to the Oracle Exadata Express CloudDimitri Gielis
 
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - referenceChris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - referenceChris O'Brien
 
Oracle application express ppt
Oracle application express pptOracle application express ppt
Oracle application express pptAbhinaw Kumar
 
Integration of APEX and Oracle Forms
Integration of APEX and Oracle FormsIntegration of APEX and Oracle Forms
Integration of APEX and Oracle FormsRoel Hartman
 
JavaScript straight from the Oracle Database
JavaScript straight from the Oracle DatabaseJavaScript straight from the Oracle Database
JavaScript straight from the Oracle DatabaseDimitri Gielis
 
Mastering universal theme
Mastering universal themeMastering universal theme
Mastering universal themeRoel Hartman
 
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)Chris O'Brien
 
Reporting with Oracle Application Express (APEX)
Reporting with Oracle Application Express (APEX)Reporting with Oracle Application Express (APEX)
Reporting with Oracle Application Express (APEX)Dimitri Gielis
 
TypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkTypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkBob German
 
APEX Alpe Adria 2019 - JavaScript in APEX - do it right!
APEX Alpe Adria 2019 -  JavaScript in APEX - do it right!APEX Alpe Adria 2019 -  JavaScript in APEX - do it right!
APEX Alpe Adria 2019 - JavaScript in APEX - do it right!Marko Gorički
 
SharePoint PowerShell for the Admin and Developer - A Venn Diagram Experience
SharePoint PowerShell for the Admin and Developer - A Venn Diagram ExperienceSharePoint PowerShell for the Admin and Developer - A Venn Diagram Experience
SharePoint PowerShell for the Admin and Developer - A Venn Diagram ExperienceRicardo Wilkins
 
Can You Do That with APEX? Building Not So Straightforward Pages
Can You Do That with APEX? Building Not So Straightforward PagesCan You Do That with APEX? Building Not So Straightforward Pages
Can You Do That with APEX? Building Not So Straightforward PagesDimitri Gielis
 

La actualidad más candente (20)

Get the Look and Feel You Want in Oracle APEX
Get the Look and Feel You Want in Oracle APEXGet the Look and Feel You Want in Oracle APEX
Get the Look and Feel You Want in Oracle APEX
 
How to make APEX print through Node.js
How to make APEX print through Node.jsHow to make APEX print through Node.js
How to make APEX print through Node.js
 
COB - PowerApps - the good, the bad and the ugly - early 2018
COB - PowerApps - the good, the bad and the ugly - early 2018COB - PowerApps - the good, the bad and the ugly - early 2018
COB - PowerApps - the good, the bad and the ugly - early 2018
 
Oracle APEX migration to 5.1 - Our experience
Oracle APEX migration to 5.1 - Our experienceOracle APEX migration to 5.1 - Our experience
Oracle APEX migration to 5.1 - Our experience
 
Creating Single Page Applications with Oracle Apex
Creating Single Page Applications with Oracle ApexCreating Single Page Applications with Oracle Apex
Creating Single Page Applications with Oracle Apex
 
A Primer on Web Components in APEX
A Primer on Web Components in APEXA Primer on Web Components in APEX
A Primer on Web Components in APEX
 
Apex RnD APEX 5 - Printing
Apex RnD APEX 5 - PrintingApex RnD APEX 5 - Printing
Apex RnD APEX 5 - Printing
 
COB ESPC18 - Rich PowerApps with offline support
COB ESPC18 - Rich PowerApps with offline supportCOB ESPC18 - Rich PowerApps with offline support
COB ESPC18 - Rich PowerApps with offline support
 
Moving your APEX app to the Oracle Exadata Express Cloud
Moving your APEX app to the Oracle Exadata Express CloudMoving your APEX app to the Oracle Exadata Express Cloud
Moving your APEX app to the Oracle Exadata Express Cloud
 
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - referenceChris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
 
Oracle application express ppt
Oracle application express pptOracle application express ppt
Oracle application express ppt
 
Integration of APEX and Oracle Forms
Integration of APEX and Oracle FormsIntegration of APEX and Oracle Forms
Integration of APEX and Oracle Forms
 
JavaScript straight from the Oracle Database
JavaScript straight from the Oracle DatabaseJavaScript straight from the Oracle Database
JavaScript straight from the Oracle Database
 
Mastering universal theme
Mastering universal themeMastering universal theme
Mastering universal theme
 
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
 
Reporting with Oracle Application Express (APEX)
Reporting with Oracle Application Express (APEX)Reporting with Oracle Application Express (APEX)
Reporting with Oracle Application Express (APEX)
 
TypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkTypeScript and SharePoint Framework
TypeScript and SharePoint Framework
 
APEX Alpe Adria 2019 - JavaScript in APEX - do it right!
APEX Alpe Adria 2019 -  JavaScript in APEX - do it right!APEX Alpe Adria 2019 -  JavaScript in APEX - do it right!
APEX Alpe Adria 2019 - JavaScript in APEX - do it right!
 
SharePoint PowerShell for the Admin and Developer - A Venn Diagram Experience
SharePoint PowerShell for the Admin and Developer - A Venn Diagram ExperienceSharePoint PowerShell for the Admin and Developer - A Venn Diagram Experience
SharePoint PowerShell for the Admin and Developer - A Venn Diagram Experience
 
Can You Do That with APEX? Building Not So Straightforward Pages
Can You Do That with APEX? Building Not So Straightforward PagesCan You Do That with APEX? Building Not So Straightforward Pages
Can You Do That with APEX? Building Not So Straightforward Pages
 

Destacado

5 Cool Things you can do with HTML5 and APEX
5 Cool Things you can do with HTML5 and APEX5 Cool Things you can do with HTML5 and APEX
5 Cool Things you can do with HTML5 and APEXRoel Hartman
 
Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!Gill Cleeren
 
APEX Dashboard Competition - Winners
APEX Dashboard Competition - WinnersAPEX Dashboard Competition - Winners
APEX Dashboard Competition - WinnersTobias Arnhold
 
Building a Flexible UI with Oracle ApEx
Building a Flexible UI with Oracle ApExBuilding a Flexible UI with Oracle ApEx
Building a Flexible UI with Oracle ApExBradley Brown
 
Создание веб-приложений с помощью Oracle APEX
Создание веб-приложений с помощью Oracle APEX Создание веб-приложений с помощью Oracle APEX
Создание веб-приложений с помощью Oracle APEX CUSTIS
 
APEX 5 Demo and Best Practices
APEX 5 Demo and Best PracticesAPEX 5 Demo and Best Practices
APEX 5 Demo and Best PracticesDimitri Gielis
 
Advanced Reporting And Charting With Oracle Application Express 4.0
Advanced Reporting And Charting With Oracle Application Express 4.0Advanced Reporting And Charting With Oracle Application Express 4.0
Advanced Reporting And Charting With Oracle Application Express 4.0Rinie Romme
 
PDB Provisioning with Oracle Multitenant Self Service Application
PDB Provisioning with Oracle Multitenant Self Service ApplicationPDB Provisioning with Oracle Multitenant Self Service Application
PDB Provisioning with Oracle Multitenant Self Service ApplicationLeighton Nelson
 
Offline Web with Oracle JET
Offline Web with Oracle JETOffline Web with Oracle JET
Offline Web with Oracle JETandrejusb
 
Oracle APEX Performance
Oracle APEX PerformanceOracle APEX Performance
Oracle APEX PerformanceScott Wesley
 
Top 5 Tips to Cut the Effort of your Oracle EBS R12 Project by a Third
Top 5 Tips to Cut the Effort of your Oracle EBS R12 Project by a ThirdTop 5 Tips to Cut the Effort of your Oracle EBS R12 Project by a Third
Top 5 Tips to Cut the Effort of your Oracle EBS R12 Project by a ThirdOriginal Software
 
My Top 5 APEX JavaScript API's
My Top 5 APEX JavaScript API'sMy Top 5 APEX JavaScript API's
My Top 5 APEX JavaScript API'sRoel Hartman
 
Oracle Application Express (APEX) and Microsoft Sharepoint integration
Oracle Application Express (APEX) and Microsoft Sharepoint integrationOracle Application Express (APEX) and Microsoft Sharepoint integration
Oracle Application Express (APEX) and Microsoft Sharepoint integrationDimitri Gielis
 
K TO 12 GRADE 1 LEARNING MATERIAL IN MUSIC (Q3-Q4)
K TO 12 GRADE 1 LEARNING MATERIAL IN MUSIC (Q3-Q4)K TO 12 GRADE 1 LEARNING MATERIAL IN MUSIC (Q3-Q4)
K TO 12 GRADE 1 LEARNING MATERIAL IN MUSIC (Q3-Q4)LiGhT ArOhL
 

Destacado (20)

5 Cool Things you can do with HTML5 and APEX
5 Cool Things you can do with HTML5 and APEX5 Cool Things you can do with HTML5 and APEX
5 Cool Things you can do with HTML5 and APEX
 
Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!
 
APEX Dashboard Competition - Winners
APEX Dashboard Competition - WinnersAPEX Dashboard Competition - Winners
APEX Dashboard Competition - Winners
 
Building a Flexible UI with Oracle ApEx
Building a Flexible UI with Oracle ApExBuilding a Flexible UI with Oracle ApEx
Building a Flexible UI with Oracle ApEx
 
Challenges going mobile
Challenges going mobileChallenges going mobile
Challenges going mobile
 
Создание веб-приложений с помощью Oracle APEX
Создание веб-приложений с помощью Oracle APEX Создание веб-приложений с помощью Oracle APEX
Создание веб-приложений с помощью Oracle APEX
 
APEX 5 Demo and Best Practices
APEX 5 Demo and Best PracticesAPEX 5 Demo and Best Practices
APEX 5 Demo and Best Practices
 
APEX Security 101
APEX Security 101APEX Security 101
APEX Security 101
 
Advanced Reporting And Charting With Oracle Application Express 4.0
Advanced Reporting And Charting With Oracle Application Express 4.0Advanced Reporting And Charting With Oracle Application Express 4.0
Advanced Reporting And Charting With Oracle Application Express 4.0
 
APEX Wearables
APEX WearablesAPEX Wearables
APEX Wearables
 
Apex day 1.0 oracle apex 5.0 patrick wolf
Apex day 1.0 oracle apex 5.0 patrick wolfApex day 1.0 oracle apex 5.0 patrick wolf
Apex day 1.0 oracle apex 5.0 patrick wolf
 
PDB Provisioning with Oracle Multitenant Self Service Application
PDB Provisioning with Oracle Multitenant Self Service ApplicationPDB Provisioning with Oracle Multitenant Self Service Application
PDB Provisioning with Oracle Multitenant Self Service Application
 
Offline Web with Oracle JET
Offline Web with Oracle JETOffline Web with Oracle JET
Offline Web with Oracle JET
 
Jsf2 html5-jazoon
Jsf2 html5-jazoonJsf2 html5-jazoon
Jsf2 html5-jazoon
 
Oracle APEX Performance
Oracle APEX PerformanceOracle APEX Performance
Oracle APEX Performance
 
Top 5 Tips to Cut the Effort of your Oracle EBS R12 Project by a Third
Top 5 Tips to Cut the Effort of your Oracle EBS R12 Project by a ThirdTop 5 Tips to Cut the Effort of your Oracle EBS R12 Project by a Third
Top 5 Tips to Cut the Effort of your Oracle EBS R12 Project by a Third
 
My Top 5 APEX JavaScript API's
My Top 5 APEX JavaScript API'sMy Top 5 APEX JavaScript API's
My Top 5 APEX JavaScript API's
 
Web Development In Oracle APEX
Web Development In Oracle APEXWeb Development In Oracle APEX
Web Development In Oracle APEX
 
Oracle Application Express (APEX) and Microsoft Sharepoint integration
Oracle Application Express (APEX) and Microsoft Sharepoint integrationOracle Application Express (APEX) and Microsoft Sharepoint integration
Oracle Application Express (APEX) and Microsoft Sharepoint integration
 
K TO 12 GRADE 1 LEARNING MATERIAL IN MUSIC (Q3-Q4)
K TO 12 GRADE 1 LEARNING MATERIAL IN MUSIC (Q3-Q4)K TO 12 GRADE 1 LEARNING MATERIAL IN MUSIC (Q3-Q4)
K TO 12 GRADE 1 LEARNING MATERIAL IN MUSIC (Q3-Q4)
 

Similar a 5 x HTML5 worth using in APEX (5)

Html5 and web technology update
Html5 and web technology updateHtml5 and web technology update
Html5 and web technology updateDoug Domeny
 
HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on MobileAdam Lu
 
Mobile webapplication development
Mobile webapplication developmentMobile webapplication development
Mobile webapplication developmentGanesh Gembali
 
Javascript first-class citizenery
Javascript first-class citizeneryJavascript first-class citizenery
Javascript first-class citizenerytoddbr
 
IE 8 et les standards du Web - Chris Wilson - Paris Web 2008
IE 8 et les standards du Web - Chris Wilson - Paris Web 2008IE 8 et les standards du Web - Chris Wilson - Paris Web 2008
IE 8 et les standards du Web - Chris Wilson - Paris Web 2008Association Paris-Web
 
Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)Mandakini Kumari
 
Building AOL's High Performance, Enterprise Wide Mail Application With Silver...
Building AOL's High Performance, Enterprise Wide Mail Application With Silver...Building AOL's High Performance, Enterprise Wide Mail Application With Silver...
Building AOL's High Performance, Enterprise Wide Mail Application With Silver...goodfriday
 
Speak the Web 15.02.2010
Speak the Web 15.02.2010Speak the Web 15.02.2010
Speak the Web 15.02.2010Patrick Lauke
 
Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2Asher Martin
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineRicardo Silva
 
HTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsHTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsIvano Malavolta
 

Similar a 5 x HTML5 worth using in APEX (5) (20)

Html5 and web technology update
Html5 and web technology updateHtml5 and web technology update
Html5 and web technology update
 
Html5 For Jjugccc2009fall
Html5 For Jjugccc2009fallHtml5 For Jjugccc2009fall
Html5 For Jjugccc2009fall
 
HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on Mobile
 
Introduccion a HTML5
Introduccion a HTML5Introduccion a HTML5
Introduccion a HTML5
 
html5
html5html5
html5
 
GWT Extreme!
GWT Extreme!GWT Extreme!
GWT Extreme!
 
Mobile webapplication development
Mobile webapplication developmentMobile webapplication development
Mobile webapplication development
 
HTML5
HTML5 HTML5
HTML5
 
Html5
Html5Html5
Html5
 
Html5 CSS3 jQuery Basic
Html5 CSS3 jQuery BasicHtml5 CSS3 jQuery Basic
Html5 CSS3 jQuery Basic
 
HTML5 Refresher
HTML5 RefresherHTML5 Refresher
HTML5 Refresher
 
Javascript first-class citizenery
Javascript first-class citizeneryJavascript first-class citizenery
Javascript first-class citizenery
 
IE 8 et les standards du Web - Chris Wilson - Paris Web 2008
IE 8 et les standards du Web - Chris Wilson - Paris Web 2008IE 8 et les standards du Web - Chris Wilson - Paris Web 2008
IE 8 et les standards du Web - Chris Wilson - Paris Web 2008
 
Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)Html5 drupal7 with mandakini kumari(1)
Html5 drupal7 with mandakini kumari(1)
 
Building AOL's High Performance, Enterprise Wide Mail Application With Silver...
Building AOL's High Performance, Enterprise Wide Mail Application With Silver...Building AOL's High Performance, Enterprise Wide Mail Application With Silver...
Building AOL's High Performance, Enterprise Wide Mail Application With Silver...
 
Speak the Web 15.02.2010
Speak the Web 15.02.2010Speak the Web 15.02.2010
Speak the Web 15.02.2010
 
Practical OData
Practical ODataPractical OData
Practical OData
 
Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2Cape Cod Web Technology Meetup - 2
Cape Cod Web Technology Meetup - 2
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 Engine
 
HTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsHTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile apps
 

Más de Christian Rokitta

Hitchhiker's guide to the Universal Theme
Hitchhiker's guide to the Universal ThemeHitchhiker's guide to the Universal Theme
Hitchhiker's guide to the Universal ThemeChristian Rokitta
 
Browser Developer Tools for APEX Developers
Browser Developer Tools for APEX DevelopersBrowser Developer Tools for APEX Developers
Browser Developer Tools for APEX DevelopersChristian Rokitta
 
Bootstrapify Universal Theme
Bootstrapify Universal ThemeBootstrapify Universal Theme
Bootstrapify Universal ThemeChristian Rokitta
 
Responsive Web Design & APEX Theme 25 (OGh APEX World 2014)
Responsive Web Design & APEX Theme 25 (OGh APEX World 2014)Responsive Web Design & APEX Theme 25 (OGh APEX World 2014)
Responsive Web Design & APEX Theme 25 (OGh APEX World 2014)Christian Rokitta
 
Face off apex template and themes - 3.0 - k-scope11
Face off   apex template and themes - 3.0 - k-scope11Face off   apex template and themes - 3.0 - k-scope11
Face off apex template and themes - 3.0 - k-scope11Christian Rokitta
 
Responsive Web Design & APEX Theme 25
Responsive Web Design & APEX Theme 25Responsive Web Design & APEX Theme 25
Responsive Web Design & APEX Theme 25Christian Rokitta
 
Confessions of an APEX Design Geek
Confessions of an APEX Design GeekConfessions of an APEX Design Geek
Confessions of an APEX Design GeekChristian Rokitta
 

Más de Christian Rokitta (10)

Keep me moving goin mobile
Keep me moving   goin mobileKeep me moving   goin mobile
Keep me moving goin mobile
 
Hitchhiker's guide to the Universal Theme
Hitchhiker's guide to the Universal ThemeHitchhiker's guide to the Universal Theme
Hitchhiker's guide to the Universal Theme
 
Browser Developer Tools for APEX Developers
Browser Developer Tools for APEX DevelopersBrowser Developer Tools for APEX Developers
Browser Developer Tools for APEX Developers
 
Bootstrapify Universal Theme
Bootstrapify Universal ThemeBootstrapify Universal Theme
Bootstrapify Universal Theme
 
Plugins unplugged
Plugins unpluggedPlugins unplugged
Plugins unplugged
 
APEX & Cookie Monster
APEX & Cookie MonsterAPEX & Cookie Monster
APEX & Cookie Monster
 
Responsive Web Design & APEX Theme 25 (OGh APEX World 2014)
Responsive Web Design & APEX Theme 25 (OGh APEX World 2014)Responsive Web Design & APEX Theme 25 (OGh APEX World 2014)
Responsive Web Design & APEX Theme 25 (OGh APEX World 2014)
 
Face off apex template and themes - 3.0 - k-scope11
Face off   apex template and themes - 3.0 - k-scope11Face off   apex template and themes - 3.0 - k-scope11
Face off apex template and themes - 3.0 - k-scope11
 
Responsive Web Design & APEX Theme 25
Responsive Web Design & APEX Theme 25Responsive Web Design & APEX Theme 25
Responsive Web Design & APEX Theme 25
 
Confessions of an APEX Design Geek
Confessions of an APEX Design GeekConfessions of an APEX Design Geek
Confessions of an APEX Design Geek
 

Último

Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 

Último (20)

Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 

5 x HTML5 worth using in APEX (5)

  • 1. 5 x HTML5 in APEX (5) Christian Rokitta HTML5 + APEX5 = Perfect 10 (Shakeeb)
  • 2. Program • HTML 5 – What‘s new? • HTML5 Tags o <dialog> element: Modals made easy o <output> • HTML5 API’s o Drag and Drop o Geolocation API o SSE
  • 3. Why HTML5? • Multiple Devices (Mobile, Mobile, Mobile) • Modular • Multimedia • Semantics (cleaner code, accessibility) • Interactivity (tighter integration with JavaScript) • Structure vs Presentation, CSS3
  • 4. What is New in HTML5? • Simplified DOCTYPE: <!DOCTYPE html> • New HTML Elements • HTML APIs • Elements Removed in HTML5  CSS <center>, <frame>/<frameset>, <big>, <font>, …
  • 5. Standard? Sorry, not yet. Version Year Tim Berners-Lee invented www 1989 Tim Berners-Lee invented HTML 1991 Dave Raggett drafted HTML+ 1993 HTML Working Group defined HTML 2.0 1995 W3C Recommended HTML 3.2 1997 W3C Recommended HTML 4.01 1999 W3C Recommended XHTML 1.0 2000 HTML5 WHATWG* First Public Draft 2008 HTML5 WHATWG Living Standard 2012 HTML5 W3C Final Recommendation 2014 *) Web Hypertext Application Technology Working Group - was formed in response to slow W3C development, and W3C's decision to close down the development of HTML, in favor of XHTML
  • 6. HTML5 New Elements • Semantic/Structural Elements <article>, <aside>, <dialog> <footer>, <header>, <menuitem>, <nav>, <section>, … • Form Elements <datalist>, <output>, … • Input Types tel, timcolor, date, email, number,search, e, url, … • Input Attributes autocomplete, autofocus, min/max, placeholder, … • New Attribute Syntax <input type="text" value=John>, <input type="text" value='John Doe'>, … • HTML5 Graphics <canvas>, <svg> • New Media Elements <audio>, <video>, <track>, …
  • 7. <dialog> element: Modals made easy <table> <tr> <th>January <dialog open>This is an open dialog window</dialog></th> <th>February</th> <th>March</th> </tr> <tr> <td>31</td> <td>28</td> <td>31</td> </tr> </table> <table> <tr> <th>January <dialog>This is an open dialog window</dialog></th> <th>February</th> <th>March</th> </tr> <tr> <td>31</td> <td>28</td> <td>31</td> </tr> </table>
  • 8. <dialog> element: specs • show(): Open dialog. • close(): Close dialog. Takes an optional argument which if present dialog.returnValue is set to. • showModal(): Open modal dialog. • ::backdrop: Pseudo-element to style background behind a modal dialog. • close event: Fired when a dialog is closed. • cancel event: Fired when the Escape key is pressed on a modal dialog.
  • 10. <dialog>, some final questions • Why do we need <dialog> element while it's possible using libraries? o great for accessibility o modal dialogs are pushed on a well-ordered stack (no z- index) • How do I position a dialog? CSS! default CSS includes "position: absolute; left: 0; right: 0; margin: auto;" which horizontally centers the element within its container. • Can I open multiple dialogs? Yes. Much like multiple <div> elements stacked on eachother.
  • 11. <output> element: input Antipode <form> <label for="ticketcount">Number of passes</label> <input type="number" name="ticketcount" id="ticketcount" min="1" max="12" value="1" onchange="spinny()"> <span id="price">@ $25 per ticket</span> = <output name="total" for="ticketcount price">$25</output> </form> var total = document.querySelector('output[name="total"]'); var ticketcount = document.getElementById('ticketcount'); function spinny() { total.value = "$" + parseInt(ticketcount.value) * 25; }
  • 12. <output> element: specs <form oninput="x.value=parseInt(a.value)+parseInt(b.value)">0 <input type="range" id="a" value="50">100 +<input type="number" id="b" value="50"> =<output name="x" for="a b"></output> </form> HTML5 valueAsNumber input element property: <form oninput="x.value=a.valueAsNumber+b.valueAsNumber">0 <input type="range" id="a" value="50">100 +<input type="number" id="b" value="50"> =<output name="x" for="a b"></output> </form>
  • 13. <output> element: Attributes Attribute Value Description for element_id Specifies the relationship between the result of the calculation, and the elements used in the calculation form form_id Specifies one or more forms the output element belongs to name name Specifies a name for the output element
  • 15. Drag and Drop API Drag and drop is a very common feature. It is when you "grab" an object and drag it to a different location. In HTML5, drag and drop is part of the standard, and any element can be draggable.
  • 16. Drag and Drop Example <!DOCTYPE HTML> <html> <head> <script> function allowDrop(ev) { ev.preventDefault(); } function drag(ev) { ev.dataTransfer.setData("text", ev.target.id); } function drop(ev) { ev.preventDefault(); var data = ev.dataTransfer.getData("text"); ev.target.appendChild(document.getElementById(data)); } </script> </head> <body> <div id="div1" ondrop="drop(event)" ondragover="allowDrop(event)"></div> <img id="drag1" src="img_logo.gif" draggable="true" ondragstart="drag(event)" width="336" height="69"> </body> </html>
  • 17. Parts of a Drag and Drop event • Make an Element Draggable <img draggable="true"> • What to Drag - ondragstart and setData() function drag(ev) { ev.dataTransfer.setData("text", ev.target.id); } • Where to Drop – ondragover event.preventDefault() • Do the Drop - ondrop function drop(ev) { ev.preventDefault(); var data = ev.dataTransfer.getData("text"); ev.target.appendChild(document.getElementById(data)); }
  • 19. Geolocation API The HTML Geolocation API is used to get the geographical position of a user/device*. Since this can compromise user privacy, the position is not available unless the user approves it. *) accurate for devices with GPS
  • 20. Using HTML Geolocation <script> var x = document.getElementById("demo"); function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else { x.innerHTML = "Geolocation is not supported by this browser."; } } function showPosition(position) { x.innerHTML = "Latitude: " + position.coords.latitude + "<br>Longitude: " + position.coords.longitude; } </script>
  • 21. Geolocation Example explained • Check if Geolocation is supported • If supported, run the getCurrentPosition() method. If not, display a message to the user • If the getCurrentPosition() method is successful, it returns a coordinates object to the function specified in the parameter ( showPosition ) • The showPosition() function gets the displays the Latitude and Longitude
  • 22. Handling Errors and Rejections navigator.geolocation.getCurrentPosition(showPosition,showError); function showError(error) { switch(error.code) { case error.PERMISSION_DENIED: x.innerHTML = "User denied the request for Geolocation." break; case error.POSITION_UNAVAILABLE: x.innerHTML = "Location information is unavailable." break; case error.TIMEOUT: x.innerHTML = "The request to get user location timed out." break; case error.UNKNOWN_ERROR: x.innerHTML = "An unknown error occurred." break; } }
  • 23. getCurrentPosition() - Return Data Property Description coords.latitude The latitude as a decimal number coords.longitude The longitude as a decimal number coords.accuracy The accuracy of position coords.altitude The altitude in meters above the mean sea level coords.altitudeAccuracy The altitude accuracy of position coords.heading The heading as degrees clockwise from North coords.speed The speed in meters per second timestamp The date/time of the response The getCurrentPosition() method returns an object if it is successful. The latitude, longitude and accuracy properties are always returned. The other properties below are returned if available.
  • 24. Geolocation - Other Methods id = navigator.geolocation.watchPosition( success , error , options); options = { enableHighAccuracy: false , timeout: 5000 , maximumAge: 0 }; navigator.geolocation.clearWatch(id);
  • 26. Server-Sent Events - One Way Messaging • A server-sent event is when a web page automatically gets updates from a server. • A web app "subscribes" to a stream of updates generated by a server and, whenever a new event occurs, a notification is triggered on the client.
  • 27. Server-Sent Events vs. WebSockets Websockets: • APIs like WebSockets provide a richer protocol to perform bi-directional, full-duplex communication. • Two-way channel is more attractive for things like games, messaging apps, and for cases where you need near real-time updates in both directions.
  • 28. Server-Sent Events vs. WebSockets Server-Send Events: • Two-way channel is more attractive for things like games, messaging apps, and for cases where you need near real-time updates in both directions. • SSE in favor when you simply need updates from some server action. If you'll need to send data to a server, XMLHttpRequest is always a friend.
  • 29. Server-Sent Events vs. WebSockets SSEs are sent over traditional HTTP. That means they do not require a special protocol or server implementation to get working. WebSockets on the other hand, require full- duplex connections and new Web Socket servers to handle the protocol. In addition, Server-Sent Events have a variety of features that WebSockets lack by design such as automatic reconnection, event IDs.
  • 30. SSE API - subscribe to an event stream if (!!window.EventSource) { var source = new EventSource('stream.php'); } else { // Result to xhr polling :( } URL passed to the EventSource constructor is an absolute URL, its origin (scheme, domain, port) must match that of the calling page
  • 31. SSE API - handler for the message event source.addEventListener('message', function(e) { console.log(e.data); }, false); Optioneel: source.addEventListener('open', function(e) { // Connection was opened. }, false); source.addEventListener('error', function(e) { if (e.readyState == EventSource.CLOSED) { // Connection was closed. } }, false);
  • 32. SSE API • When updates are pushed from the server, the onmessage handler fires and new data is be available in its e.data property. • The magical part is that whenever the connection is closed, the browser will automatically reconnect to the source after ~3 seconds. • Your server implementation can even have control over this reconnection timeout. • That's it.
  • 33. SSE - Event Stream Format Plaintext response, served with a text/event-stream Content-Type, that follows the SSE format. In its basic form, the response should contain a "data:" line, followed by your message, followed by two "n" characters to end the stream: data: My messagenn Multiline Data: data: first linen data: second linenn
  • 34. SSE - Send JSON Data data: {n data: "msg": "hello world",n data: "id": 12345n data: }nn source.addEventListener('message', function(e) { var data = JSON.parse(e.data); console.log(data.id, data.msg); }, false );
  • 35. SSE - Controlling the Reconnection- timeout The browser attempts to reconnect to the source roughly 3 seconds after each connection is closed. You can change that timeout by including a line beginning with "retry:", followed by the number of milliseconds to wait before trying to reconnect. The following example attempts a reconnect after 10 seconds: retry: 10000n data: hello worldnn
  • 36. SSE Server – APEX Before Header Proces DECLARE dummy VARCHAR2(10); BEGIN sys.HTP.flush; sys.HTP.init; sys.OWA_UTIL.mime_header('text/event-stream', FALSE); sys.OWA_UTIL.http_header_close; sys.HTP.p('retry: 10000'); sys.HTP.p('data: {'); sys.HTP.p('data: "msg": "hello world",'); sys.HTP.p('data: "id": 12345'); sys.HTP.p('data: }'); sys.HTP.p(dummy); APEX_APPLICATION.stop_apex_engine; END;
  • 38. 10. Juni, 11:00 – 11:45, Landskrone