SlideShare una empresa de Scribd logo
1 de 22
Descargar para leer sin conexión
YAPC::Brasil - 2011




                        HTML5        ,

                        e eu com isso?




                                         “Uma novidade só é conhecida, verdadeiramente,
Marcio Ferreira                              quando as pessoas certas ouvem falar dela”
@_marcioferreira                                  – Renato Alexandre dos Santos Freitas
Agenda
●   it's my life
●   HTML4, camada
●   insights HTML5
●   semântica
●   multímidia
●   offline – cache, persistência chave/valor
●   API js – websockets, web workers, geo, history
my life → 4, camada → insights → semântica → multímidia → offline → API js
my life → 4, camada → insights → semântica → multímidia → offline → API js




                                  +
my life → 4, camada → insights → semântica → multímidia → offline → API js
my life → 4,       camada → insights → semântica → multímidia → offline → API js


 ●   HTML Document Representation - Character
     sets, character encodings, and entities            ●   Alignment, font styles, and horizontal rules

     Basic HTML data types - Character data, colors,    ●   Frames - Multi-view presentation of documents
 ●

     lengths, URIs, content types, etc.                 ●   Forms - User-input Forms: Text Fields, Buttons,
                                                            Menus, and more
 ●   The global structure of an HTML document - The
     HEAD and BODY of a document                        ●   Scripts - Animated Documents and Smart Forms
 ●   Language information and text direction -          ●   SGML reference information for HTML - Formal
     International considerations for text                  definition of HTML and validation
                                                            Document Type Definition
 ●   Text - Paragraphs, Lines, and Phrases              ●


                                                        ●   Transitional Document Type Definition
 ●   Lists - Unordered, Ordered, and Definition Lists
                                                        ●   Frameset Document Type Definition
 ●   Tables
                                                        ●   Character entity references in HTML 4
 ●   Links - Hypertext and Media-Independent Links
                                                        ●   Style Sheets - Adding style to HTML documents
 ●   Objects, Images, and Applets
my life → 4,   camada → insights → semântica → multímidia → offline → API js




    text, multimedia, and hyperlink
    goal of making the Web truly World Wide
my life → 4,   camada → insights → semântica → multímidia → offline → API js




    HTML4
        HTML – conteúdo
        CSS 1, 2.1 – formatação
        Javascript – eventos usuário
my life →4, camada → insights → semântica → multímidia → offline → API js



   HTML5
       new features are introduced to help Web application
       authors, new elements are introduced based on
       research into prevailing authoring practices, and
       special attention has been given to defining clear
       conformance criteria for user agents in an effort to
       improve interoperability.
my life →4, camada →insights→ semântica → multímidia → offline → API js



       <!DOCTYPE html>

   ●   header
   ●   nav
   ●   section
   ●   article
   ●   aside
   ●   footer
   ●   figcaption
   ●   figure
   ●   hgroup
   ●   mark
my life →4, camada →insights→ semântica → multímidia → offline → API js



       <input>

   ●   attributes
       ● autocomplete

       ● action

       ● pattern - regex

       ● multiple - list

       ● formnovalidate

       ● min/max/step



   ●   type
       ● email

       ● url

       ● date/datetime/datetime-local/month/week/time

       ● range/number
my life →4, camada →insights→ semântica → multímidia → offline → API js



  crawler – hoje (baseado em xpath - id, class, position, etc -, se o mesmo mudar...)
     $html->findnodes( '//div/p/p[1] | //div/p/font[1] | //div/p/...' ); #sintática



  crawler – amanhã (baseado na semantica das tags - não mais id, class, position)
     $html->section->article->header; #semântica
     $html->section->article->figcaption; #semântica
my life →4, camada →insights→ semântica → multímidia → offline → API js




       <video>, <audio>

   ●   autoplay
   ●   controls
   ●   loop
   ●   muted
   ●   preload
   ●   src
my life →4, camada →insights→ semântica → multímidia → offline → API js



  cache
  <html manifest="myapp.manifest"> onde armazenar se offline
         CACHE MANIFEST
         CACHE: arquivos que desejo obter cache se offline
         index.html


         FALLBACK:
         page.html fallback-page.html requisição para page.html usa cache de
         fallback-page.html


         NETWORK: quem não deve se obter cache
         *
my life →4, camada →insights→ semântica → multímidia → offline → API js



  cache
  ApplicationCache
  <body onload="updateIndiktor()" ononline="updateIndiktor()" onoffline="updateIndiktor()">

  navigator.onLine ? 'online' : 'offline';
my life →4, camada →insights→ semântica → multímidia → offline → API js



    persistência chave/valor
    ●   document.cookie morreu
●   Web storage
    ●   SessionStorage janela / LocalStorage persiste
        –   sessionStorage.setItem("evento", "YAPC::Brasil")
        –   sessionStorage.getItem("evento")
        –   RemoveItem('evento')
        –   clear()
        –   return string!
               var edition = { number: 2011 };
               sessionStorage.setItem("edition", JSON.stringify(edition) );
               var _edition = JSON.parse(sessionStorage.getItem("edition"));
my life →4, camada →insights→ semântica → multímidia → offline → API js



  document.cookie


  Web storage
     SessionStorage janela / LocalStorage persiste
     –   sessionStorage.setItem("evento", "YAPC::Brasil")
     –   sessionStorage.getItem("evento")
     –   RemoveItem('evento')
     –   clear()
     –   return string!
            var edition = { number: 2011 };
            sessionStorage.setItem("edition", JSON.stringify(edition) );
            var _edition = JSON.parse(sessionStorage.getItem("edition"));
my life →4, camada →insights→ semântica → multímidia → offline → API   js

  websocket
      Var socket = New WebSocket(host)
      Socket.onopen, onmessage, onclose
      socket.readyState
      Socket.Send
      Socket.close
my life →4, camada →insights→ semântica → multímidia → offline → API   js


  web worker
      var worker = new Worker("myscript.js");
      worker.onmessage
      worker.onerror
      worker.postMessage
      worker.close
my life →4, camada →insights→ semântica → multímidia → offline → API   js


  geolocation
  navigator.geolocation.getCurrentPosition(showpos)
  navigator.geolocation.watchPosition(showpos,erropos)
  position.coords.latitude,
  position.coords.longitude
my life →4, camada →insights→ semântica → multímidia → offline → API   js


  history
  go, back e forward
  history.pushState(data,title[,url])
  history.replaceState(data,title[,url])
  window.onpopstate
?!@#$%&*



   YAPC::Brasil
     HTML5,
  E eu com isso?

 @_marcioferreira

Más contenido relacionado

Similar a YAPC::Brasil 2011 - HTML5, e eu com isso?

Course_Presentation cyber --------------.pptx
Course_Presentation cyber --------------.pptxCourse_Presentation cyber --------------.pptx
Course_Presentation cyber --------------.pptx
ssuser020436
 
Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18
Pierre Joye
 
Drupal and the semantic web - SemTechBiz 2012
Drupal and the semantic web - SemTechBiz 2012Drupal and the semantic web - SemTechBiz 2012
Drupal and the semantic web - SemTechBiz 2012
scorlosquet
 
Marc Schwering – Using Flink with MongoDB to enhance relevancy in personaliza...
Marc Schwering – Using Flink with MongoDB to enhance relevancy in personaliza...Marc Schwering – Using Flink with MongoDB to enhance relevancy in personaliza...
Marc Schwering – Using Flink with MongoDB to enhance relevancy in personaliza...
Flink Forward
 
Slides semantic web and Drupal 7 NYCCamp 2012
Slides semantic web and Drupal 7 NYCCamp 2012Slides semantic web and Drupal 7 NYCCamp 2012
Slides semantic web and Drupal 7 NYCCamp 2012
scorlosquet
 
Jordi Romero Api for-the-mobile-era
Jordi Romero Api for-the-mobile-eraJordi Romero Api for-the-mobile-era
Jordi Romero Api for-the-mobile-era
.toster
 

Similar a YAPC::Brasil 2011 - HTML5, e eu com isso? (20)

REST easy with API Platform
REST easy with API PlatformREST easy with API Platform
REST easy with API Platform
 
The Semantic Web and Drupal 7 - Loja 2013
The Semantic Web and Drupal 7 - Loja 2013The Semantic Web and Drupal 7 - Loja 2013
The Semantic Web and Drupal 7 - Loja 2013
 
web2py:Web development like a boss
web2py:Web development like a bossweb2py:Web development like a boss
web2py:Web development like a boss
 
MongoDB Days Germany: Data Processing with MongoDB
MongoDB Days Germany: Data Processing with MongoDBMongoDB Days Germany: Data Processing with MongoDB
MongoDB Days Germany: Data Processing with MongoDB
 
Course_Presentation cyber --------------.pptx
Course_Presentation cyber --------------.pptxCourse_Presentation cyber --------------.pptx
Course_Presentation cyber --------------.pptx
 
Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18
 
Drupal and the semantic web - SemTechBiz 2012
Drupal and the semantic web - SemTechBiz 2012Drupal and the semantic web - SemTechBiz 2012
Drupal and the semantic web - SemTechBiz 2012
 
Marc Schwering – Using Flink with MongoDB to enhance relevancy in personaliza...
Marc Schwering – Using Flink with MongoDB to enhance relevancy in personaliza...Marc Schwering – Using Flink with MongoDB to enhance relevancy in personaliza...
Marc Schwering – Using Flink with MongoDB to enhance relevancy in personaliza...
 
phpwebdev.ppt
phpwebdev.pptphpwebdev.ppt
phpwebdev.ppt
 
1.6 米嘉 gobuildweb
1.6 米嘉 gobuildweb1.6 米嘉 gobuildweb
1.6 米嘉 gobuildweb
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
Next Generation Spring MVC with Spring Roo
Next Generation Spring MVC with Spring RooNext Generation Spring MVC with Spring Roo
Next Generation Spring MVC with Spring Roo
 
The Guide to becoming a full stack developer in 2018
The Guide to becoming a full stack developer in 2018The Guide to becoming a full stack developer in 2018
The Guide to becoming a full stack developer in 2018
 
Putting together a web app
Putting together a web appPutting together a web app
Putting together a web app
 
Lightweight web frameworks
Lightweight web frameworksLightweight web frameworks
Lightweight web frameworks
 
Slides semantic web and Drupal 7 NYCCamp 2012
Slides semantic web and Drupal 7 NYCCamp 2012Slides semantic web and Drupal 7 NYCCamp 2012
Slides semantic web and Drupal 7 NYCCamp 2012
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
Drupal and the Semantic Web - ESIP Webinar
Drupal and the Semantic Web - ESIP WebinarDrupal and the Semantic Web - ESIP Webinar
Drupal and the Semantic Web - ESIP Webinar
 
Jordi Romero Api for-the-mobile-era
Jordi Romero Api for-the-mobile-eraJordi Romero Api for-the-mobile-era
Jordi Romero Api for-the-mobile-era
 
Building Tomorrow's Web Services
Building Tomorrow's Web ServicesBuilding Tomorrow's Web Services
Building Tomorrow's Web Services
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Último (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

YAPC::Brasil 2011 - HTML5, e eu com isso?

  • 1. YAPC::Brasil - 2011 HTML5 , e eu com isso? “Uma novidade só é conhecida, verdadeiramente, Marcio Ferreira quando as pessoas certas ouvem falar dela” @_marcioferreira – Renato Alexandre dos Santos Freitas
  • 2. Agenda ● it's my life ● HTML4, camada ● insights HTML5 ● semântica ● multímidia ● offline – cache, persistência chave/valor ● API js – websockets, web workers, geo, history
  • 3. my life → 4, camada → insights → semântica → multímidia → offline → API js
  • 4. my life → 4, camada → insights → semântica → multímidia → offline → API js +
  • 5. my life → 4, camada → insights → semântica → multímidia → offline → API js
  • 6. my life → 4, camada → insights → semântica → multímidia → offline → API js ● HTML Document Representation - Character sets, character encodings, and entities ● Alignment, font styles, and horizontal rules Basic HTML data types - Character data, colors, ● Frames - Multi-view presentation of documents ● lengths, URIs, content types, etc. ● Forms - User-input Forms: Text Fields, Buttons, Menus, and more ● The global structure of an HTML document - The HEAD and BODY of a document ● Scripts - Animated Documents and Smart Forms ● Language information and text direction - ● SGML reference information for HTML - Formal International considerations for text definition of HTML and validation Document Type Definition ● Text - Paragraphs, Lines, and Phrases ● ● Transitional Document Type Definition ● Lists - Unordered, Ordered, and Definition Lists ● Frameset Document Type Definition ● Tables ● Character entity references in HTML 4 ● Links - Hypertext and Media-Independent Links ● Style Sheets - Adding style to HTML documents ● Objects, Images, and Applets
  • 7. my life → 4, camada → insights → semântica → multímidia → offline → API js text, multimedia, and hyperlink goal of making the Web truly World Wide
  • 8. my life → 4, camada → insights → semântica → multímidia → offline → API js HTML4 HTML – conteúdo CSS 1, 2.1 – formatação Javascript – eventos usuário
  • 9. my life →4, camada → insights → semântica → multímidia → offline → API js HTML5 new features are introduced to help Web application authors, new elements are introduced based on research into prevailing authoring practices, and special attention has been given to defining clear conformance criteria for user agents in an effort to improve interoperability.
  • 10. my life →4, camada →insights→ semântica → multímidia → offline → API js <!DOCTYPE html> ● header ● nav ● section ● article ● aside ● footer ● figcaption ● figure ● hgroup ● mark
  • 11. my life →4, camada →insights→ semântica → multímidia → offline → API js <input> ● attributes ● autocomplete ● action ● pattern - regex ● multiple - list ● formnovalidate ● min/max/step ● type ● email ● url ● date/datetime/datetime-local/month/week/time ● range/number
  • 12. my life →4, camada →insights→ semântica → multímidia → offline → API js crawler – hoje (baseado em xpath - id, class, position, etc -, se o mesmo mudar...) $html->findnodes( '//div/p/p[1] | //div/p/font[1] | //div/p/...' ); #sintática crawler – amanhã (baseado na semantica das tags - não mais id, class, position) $html->section->article->header; #semântica $html->section->article->figcaption; #semântica
  • 13. my life →4, camada →insights→ semântica → multímidia → offline → API js <video>, <audio> ● autoplay ● controls ● loop ● muted ● preload ● src
  • 14. my life →4, camada →insights→ semântica → multímidia → offline → API js cache <html manifest="myapp.manifest"> onde armazenar se offline CACHE MANIFEST CACHE: arquivos que desejo obter cache se offline index.html FALLBACK: page.html fallback-page.html requisição para page.html usa cache de fallback-page.html NETWORK: quem não deve se obter cache *
  • 15. my life →4, camada →insights→ semântica → multímidia → offline → API js cache ApplicationCache <body onload="updateIndiktor()" ononline="updateIndiktor()" onoffline="updateIndiktor()"> navigator.onLine ? 'online' : 'offline';
  • 16. my life →4, camada →insights→ semântica → multímidia → offline → API js persistência chave/valor ● document.cookie morreu ● Web storage ● SessionStorage janela / LocalStorage persiste – sessionStorage.setItem("evento", "YAPC::Brasil") – sessionStorage.getItem("evento") – RemoveItem('evento') – clear() – return string! var edition = { number: 2011 }; sessionStorage.setItem("edition", JSON.stringify(edition) ); var _edition = JSON.parse(sessionStorage.getItem("edition"));
  • 17. my life →4, camada →insights→ semântica → multímidia → offline → API js document.cookie Web storage SessionStorage janela / LocalStorage persiste – sessionStorage.setItem("evento", "YAPC::Brasil") – sessionStorage.getItem("evento") – RemoveItem('evento') – clear() – return string! var edition = { number: 2011 }; sessionStorage.setItem("edition", JSON.stringify(edition) ); var _edition = JSON.parse(sessionStorage.getItem("edition"));
  • 18. my life →4, camada →insights→ semântica → multímidia → offline → API js websocket Var socket = New WebSocket(host) Socket.onopen, onmessage, onclose socket.readyState Socket.Send Socket.close
  • 19. my life →4, camada →insights→ semântica → multímidia → offline → API js web worker var worker = new Worker("myscript.js"); worker.onmessage worker.onerror worker.postMessage worker.close
  • 20. my life →4, camada →insights→ semântica → multímidia → offline → API js geolocation navigator.geolocation.getCurrentPosition(showpos) navigator.geolocation.watchPosition(showpos,erropos) position.coords.latitude, position.coords.longitude
  • 21. my life →4, camada →insights→ semântica → multímidia → offline → API js history go, back e forward history.pushState(data,title[,url]) history.replaceState(data,title[,url]) window.onpopstate
  • 22. ?!@#$%&* YAPC::Brasil HTML5, E eu com isso? @_marcioferreira