SlideShare una empresa de Scribd logo
1 de 35
HTML5 & Javascript

      by Mike Taylor
       @miketaylr




1
2




HTML5
3




 HTML5                           “HTML5”
• Canvas   2D Context            • Web Workers

• Microdata   (& vocabularies)   • Web   Storage

• Cross-document    messaging    • Web   Sockets (API & protocol)

• Channel   messaging            • Server-side   events

• Forms                          • Geolocation API

                                 • SVG, MathML, XHR2
4




HTML5
5
5




Webapps‽
 http://bit.ly/webapps-complete
6
7




OUTLINE
• Constraint   validation API

• Canvas   2dContext API

• localStorage API

• Geolocation API

• Life-changing   demo™
8




CONSTRAINT VALIDATION
9




CONSTRAINT VALIDATION API

el.willValidate

el.setCustomValidity(msg)

el.checkValidity()

el.validationMessage
10




CONSTRAINT VALIDATION API
el.validity.valueMissing      required

el.validity.typeMismatch      type

el.validity.patternMismatch   pattern

el.validity.tooLong           maxlength

el.validity.rangeUnderflow    min

el.validity.rangeOverflow     max

el.validity.stepMismatch      step

el.validity.customError       N/A

el.validity.valid             N/A
11
12




      Demos!
http://miketaylr.com/pres/ncjs/

    (http://bit.ly/ncjs-mt)
13




Example 1.1 Type validation
14




Example 1.2 Pattern validation
15




<CANVAS>
16
17
18
19
20




CANVAS 2D CONTEXT API
Transformations
Compositing
Colors and styles
Line styles
Shadows
Simple shapes (rectangles)
Complex shapes (paths)
Focus management
Text
Images
Pixel manipulation
20




CANVAS 2D CONTEXT API
Transformations
Compositing
Colors and styles
Line styles
Shadows
Simple shapes (rectangles)
Complex shapes (paths)
Focus management
Text
Images
Pixel manipulation
21




  Example 2.1 Canvas Paths
var
22




      Example 2.2 Canvas Rectangle

var
23




  Example 2.4 Canvas image

var




                      c
24




  Example 2.5 Canvas text


var




                      c
25




  Example 2.6 Canvas shadow

var




                     c
26




GEOLOCATION
27




        GEOLOCATION API
getCurrentPosition(success, error, options)

watchPosition(success, error, options)

options: enableHighAccuracy,
         timeout
         maximumAge
28




     GEOLOCATION API
position.coords.latitute
position.coords.longitude
position.coords.altitude
position.coords.accuracy
position.coords.altituteAccuracy
position.coords.heading
position.coords.speed
29




Example 3 Geolocation




                    c
30
31




Putting it all together*




                *um, kinda.
32




            Demo!

http://miketaylr.com/pres/ncjs/app/
33




Thanks!

Más contenido relacionado

Similar a Html5 Javascript APIs

How to build a html5 websites.v1
How to build a html5 websites.v1How to build a html5 websites.v1
How to build a html5 websites.v1
Bitla Software
 
【前端Mvc】mvc behind-alphatown
【前端Mvc】mvc behind-alphatown【前端Mvc】mvc behind-alphatown
【前端Mvc】mvc behind-alphatown
taobao.com
 
Rotoscope inthebrowserppt billy
Rotoscope inthebrowserppt billyRotoscope inthebrowserppt billy
Rotoscope inthebrowserppt billy
nimbleltd
 
Modern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScriptModern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScript
martinlippert
 

Similar a Html5 Javascript APIs (20)

Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)
 
The Modern Web, Part 2: HTML5
The Modern Web, Part 2: HTML5The Modern Web, Part 2: HTML5
The Modern Web, Part 2: HTML5
 
Cloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud Foundry
Cloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud FoundryCloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud Foundry
Cloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud Foundry
 
How to build a html5 websites.v1
How to build a html5 websites.v1How to build a html5 websites.v1
How to build a html5 websites.v1
 
Modern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScriptModern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScript
 
Analyzing the Performance of Mobile Web
Analyzing the Performance of Mobile WebAnalyzing the Performance of Mobile Web
Analyzing the Performance of Mobile Web
 
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
 
09 - Fábio Akita - Além do rails
09 - Fábio Akita - Além do rails09 - Fábio Akita - Além do rails
09 - Fábio Akita - Além do rails
 
What's new in Xamarin.Forms
What's new in Xamarin.FormsWhat's new in Xamarin.Forms
What's new in Xamarin.Forms
 
Osgis sept2012 cartogrammar
Osgis sept2012  cartogrammarOsgis sept2012  cartogrammar
Osgis sept2012 cartogrammar
 
An Adaptive Neural Network-Based Method for Tile Replacement in a Web Map Cache
An Adaptive Neural Network-Based Method for Tile Replacement in a Web Map CacheAn Adaptive Neural Network-Based Method for Tile Replacement in a Web Map Cache
An Adaptive Neural Network-Based Method for Tile Replacement in a Web Map Cache
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with Spring
 
Aspnet mvc
Aspnet mvcAspnet mvc
Aspnet mvc
 
新版阿尔法城背后的前端MVC实践
新版阿尔法城背后的前端MVC实践新版阿尔法城背后的前端MVC实践
新版阿尔法城背后的前端MVC实践
 
【前端Mvc】mvc behind-alphatown
【前端Mvc】mvc behind-alphatown【前端Mvc】mvc behind-alphatown
【前端Mvc】mvc behind-alphatown
 
Evolution of a cloud start up: From C# to Node.js
Evolution of a cloud start up: From C# to Node.jsEvolution of a cloud start up: From C# to Node.js
Evolution of a cloud start up: From C# to Node.js
 
Rotoscope inthebrowserppt billy
Rotoscope inthebrowserppt billyRotoscope inthebrowserppt billy
Rotoscope inthebrowserppt billy
 
Modern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScriptModern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScript
 
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon Ritter
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon RitterJava Core | JavaFX 2.0: Great User Interfaces in Java | Simon Ritter
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon Ritter
 
Jak tvořit hry na webu?
Jak tvořit hry na webu?Jak tvořit hry na webu?
Jak tvořit hry na webu?
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 

Html5 Javascript APIs