SlideShare ist ein Scribd-Unternehmen logo
1 von 134
Downloaden Sie, um offline zu lesen
HTML5 for PHP Developers
Thorsten Rinne I 20th May 2011




                                 © 201 Mayflower GmbH
                                      1
Team Lead
Scrum Master
Head of Open Source Labs

@ThorstenRinne
                           HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 2
                                                                                   1
Who are you?
         HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 3
                                                                 1
I won‘t talk about
<video> and <audio>


             HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 4
                                                                     1
And I don‘t speak about ...




                 HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 5
                                                                         1
Flash is dead.
But don‘t tell Adobe.


              HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 6
                                                                      1
Who‘s already using ...




                                                   ... ?

               HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 7
                                                                       1
HTML5 in one sentence?




              HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 8
                                                                      1
„HTML5 is about
     moving from
    documents to
applications and from
hacks to solutions.“
                                     Chris Heilmann auf Twitter
             HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 9
                                                                     1
HTML5 for Developers?




             HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 10
                                                                     1
HTML5 ~= HTML + CSS + JS




               HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 1
                                                                       1   1
1999:
PHP 3.0 - MySQL 3.22
     Apache 1.3
             HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 12
                                                                     1
HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 13
                                                        1
1999:
XMLHttpRequest Object
             HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 14
                                                                     1
As time goes by ...




             HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 15
                                                                     1
since 5.0 (1999)


    since 1.0 (2004)


            since 1.2 (2004)


                   since 7.6 (2004)
                    HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 16
                                                                            1
2005:
Ajax: A New Approach to
   Web Applications
                          Blog entry by Jesse James Garret
              HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 17
                                                                      1
HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 18
                                                        1
Google Suggest

 Google Mail

Google Maps
          HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 19
                                                                  1
2006:
 Comet
         HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 20
                                                                 1
HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 21
                                                        1
Push   Ajax




              Push
                                                    Helgi‘s
                                                   birthday




                     HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 22
                                                                             1
Okay, what‘s happening?




              HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 23
                                                                      1
Content
  vs.
Context
     HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 24
                                                             1
Facebook is an
 application!



          HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 25
                                                                  1
Page
  vs.
Stream
    HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 26
                                                            1
Twitter is an
application!



          HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 27
                                                                  1
Applications?

        HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 28
                                                                1
Apps!

    HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 29
                                                            1
HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 30
                                                        1
HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 31
                                                        1
online == offline
          HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 32
                                                                  1
Is this the new web?




                 HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 33
                                                                         1
The future is a web app!


               HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 34
                                                                       1
The mobile browser is
almost identical to the
  desktop browser.

               HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 35
                                                                       1
The mobile browser has
  short release cycles.



               HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 36
                                                                       1
The mobile browser is a
    „cross platform
   realtime runtime“.

               HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 37
                                                                       1
But what about HTML5?
 And what about PHP?



             HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 38
                                                                     1
Requests

 Events
      HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 39
                                                              1
2000: PHP chat style polling




    Client                          Server




                 HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 40
                                                                         1
2000: PHP chat style polling


     Hey, wazzup?



    Client                             Server




                    HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 41
                                                                            1
2000: PHP chat style polling


                    Um, nothing
     Hey, wazzup?   actually...



    Client                                Server




                       HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 42
                                                                               1
2000: PHP chat style polling


                            Um, nothing
     Hey, wazzup?           actually...



    Client          1 sec                         Server




                               HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 43
                                                                                       1
2000: PHP chat style polling




    Client                          Server




                 HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 44
                                                                         1
2000: PHP chat style polling


     Hey, wazzup?



    Client                             Server




                    HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 45
                                                                            1
2000: PHP chat style polling


                    Um, nothing
     Hey, wazzup?   actually...



    Client                                Server




                       HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 46
                                                                               1
2000: PHP chat style polling


                            Um, nothing
     Hey, wazzup?           actually...



    Client          1 sec                         Server




                               HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 47
                                                                                       1
2000: PHP chat style polling

              WTF???




    Client                            Server




                   HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 48
                                                                           1
1 user = 1 req / sec
    CPU #FAIL


             HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 49
                                                                     1
2006: Comet style long poll




    Client                          Server




                 HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 50
                                                                         1
2006: Comet style long poll


     Hey, wazzup?



    Client                             Server




                    HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 51
                                                                            1
2006: Comet style long poll


                     Um, nothing
                     actually...



    Client   1 sec                      Server




                     HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 52
                                                                             1
2006: Comet style long poll

                          Well ...




    Client   1 sec                      Server




                     HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 53
                                                                             1
2006: Comet style long poll

                          Wait ...




    Client   1 sec                      Server




                     HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 54
                                                                             1
2006: Comet style long poll

                      Uh, there is
                      something!




    Client   1 sec                      Server




                     HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 55
                                                                             1
2006: Comet style long poll


                     No, nothing!



    Client   1 sec                      Server




                     HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 56
                                                                             1
2006: Comet style long poll

             WTF???




    Client                               Server




                      HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 57
                                                                              1
1 user = 1 apache child
   MEMORY #FAIL


               HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 58
                                                                       1
We have a problem.
            HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 59
                                                                    1
HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 60
                                                        1
We need help.




         HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 61
                                                                 1
MEMORY: WIN
CPU: 1/2 WIN

        HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 62
                                                                1
PHP
                         Server
Client




   Client



            Client

                     HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 63
                                                                             1
PHP
                         Server
Client




   Client



            Client

                     HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 64
                                                                             1
We know PHP
We know node.js


          HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 65
                                                                  1
What about the client?




              HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 66
                                                                      1
WebSockets
if ("WebSocket" in window) {
  var ws = new WebSocket("ws://example.com/service");
  ws.onopen = function() {
     // WebSocket is connected.
     // You can send data by send() method.
     ws.send("message to send");
    // ....
  };
  ws.onmessage = function (evt) {
     var received_msg = evt.data;
  };
  ws.onclose = function() {
     // WebSocket is closed
  };
} else {
  // the browser doesn't support WebSockets.
}




                                        HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 67
                                                                                                1
Client
GET /demo HTTP/1.1
Upgrade: WebSocket
Connection: Upgrade
Host: example.com
Origin: http://example.com
Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5
Sec-WebSocket-Key2: 12998 5 Y3 1 .P00

^n:ds[4U


                                                                               Server
                   HTTP/1.1 101 WebSocket Protocol Handshake
                   Upgrade: WebSocket
                   Connection: Upgrade
                   Sec-WebSocket-Origin: http://example.com
                   Sec-WebSocket-Location: ws://example.com/demo
                   Sec-WebSocket-Protocol: sample

                   8jKS'y:G*Co,Wxa-


                                          HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 68
                                                                                                  1
More logic will move to the
  client... the browser.


                 HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 69
                                                                         1
WebWorker
                                                                             main.js
var myWorker = new Worker('backgroundtask.js');

myWorker.onmessage = function(event) {
   alert(event.data);
};



                                                                      backgroundtask.js
self.onmessage = function(event) {
  // Do some heavy work
  self.postMessage('Hello, Amsterdam');
}




                                          HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 70
                                                                                                  1
WebMessaging
<form>
<input type="text" name="msg" value="My message" id="msg">
<input type="submit">
<h2>Ziel iFrame:</h2>
<iframe id="iframe" src="postmessage.html"></iframe>
</form>
<script>
  var win = document.getElementById("iframe").contentWindow;
  addEvent(
    document.getElementsByTagName('form')[0], 'submit',
      function (e) {
         if (e.preventDefault)
           e.preventDefault();
         win.postMessage(document.getElementById("msg").value,
           "http://www.phpconference.nl");
         e.returnValue = false;
         return false;
  });
  </script>


                                          HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 71
                                                                                                  1
Offline application cache
                                                                        index.html
<html manifest="cache.manifest">
<script>
window.applicationCache.addEventListener(
  'checking',
  updateCacheStatus,
  false)
</script>


                                                                     cache.manifest
CACHE MANIFEST

CACHE:
/html5/demo/index.html
/html5/demo/css/style.css
/html5/demo/images/background.png
/html5/demo/js/application.js



                                        HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 72
                                                                                                1
Web Storage
‣„short living“ data
 ‣sessionStorage object
 ‣will be deleted by closing the browser
‣„long living“ data
 ‣localStorage object
 ‣won‘t be deleted after closing the browser

Safari/Chrome     Firefox          IE                                  Opera

     2 MB       5 MB ~ 200MB      5 MB                                    4 MB



                                     HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 73
                                                                                             1
Web Storage
 <p>This page was requested <b>
 <script>
 if (!sessionStorage.pageCounter) {
   sessionStorage.setItem('pageCounter',0);
 }

  sessionStorage.setItem('pageCounter',
    parseInt(sessionStorage.pageCounter)+1);

  document.write(sessionStorage.pageCounter);
  </script>
  </b> times.</p>
  <p>
  <input value="sessionStorage leeren" type="button"
onClick="sessionStorage.clear();location.reload(true);">
  <input value="Seite laden" type="button"
onClick="location.reload(true);">
  </p>



                                        HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 74
                                                                                                1
2007: iPhone
web apps should
be only based on
  HTML5,CSS3,
      JavaScript,
           offline
      application
       cache and
    web storage.
  HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 75
                                                          1
Web SQL Database
var db = openDatabase('myDatabase',
                      '1.0',
                      'My first Web SQL database',
                      2 * 1024 * 1024);

db.transaction(function (tx) {
  tx.executeSql('CREATE TABLE IF NOT EXISTS conferences

  Work on specs have stopped in
    (id unique, text)');
  tx.executeSql('INSERT INTO conferences (id, text)
    VALUES (1, "Dutch PHP Conference")');

     late 2010. Don‘t use it.
});




                                      HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 76
                                                                                              1
Geolocation
if (navigator.geolocation) {
  navigator.geolocation.getCurrentPosition(
    function(position) {
      var lat     = position.coords.latitude;
      var lng     = position.coords.longitude;
      var options = {
        position: new google.maps.LatLng(lat, lng) }
      var marker = new google.maps.Marker(options);

          marker.setMap(map);
    });
}




                                      HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 77
                                                                                              1
Drag and Drop API
  <li draggable="true" id="pic" ondragstart="drag(this, event)">
    <span>foobar.png</span></li>



  <div id="trash" ondrop="drop(this, event)" ondropenter="return
false" ondropover="return false"></div>



  function drag(target, e) {
    e.dataTransfer.setData("Text", target.id);
  }

  function drop(target, e) {
    var id = e.dataTransfer.getData("Text");
    target.appendChild(document.getElementById(id);
    e.preventDefault();
  }


                                          HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 78
                                                                                                  1
FileReader API (I)
var reader = new FileReader();

reader.onload = function(e) {
   var bin = e.target.result; // bin is a binary string
};

reader.readAsBinaryString(file);




                                         HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 79
                                                                                                 1
FileReader API (II)
var xhr = new XMLHttpRequest();

xhr.open("POST", "upload.php");
xhr.overrideMimeType("text/plain;
  charset=x-user-defined-binary");
xhr.sendAsBinary();




xhr.upload.addEventListener("progress", function(e) {
  if (e.lengthComputable) {
    var percentage = Math.round((e.loaded * 100) / e.total);
    // do something
  }
}, false);




                                        HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 80
                                                                                                1
This was just the JavaScript
      part of HTML5.


                  HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 81
                                                                          1
What‘s left for us
PHP Developers?


             HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 82
                                                                     1
HTML5 is part of an
application framework.


              HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 83
                                                                      1
The LAMP stack gets a
    bust of Janus.


              HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 84
                                                                      1
Realtime       Web
component     component
 HTML5 / JS   PHP / MySQL



              HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 85
                                                                      1
PHP Developer have to learn
    JavaScript as well!


                 HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 86
                                                                         1
Modern PHP applications
 use both techniques:


      JavaScript   PHP
         50%       50%




                     HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 87
                                                                             1
HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 88
                                                        1
<!DOCTYPE html>



         HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 89
                                                                 1
Page structure tags

    <header>
    <hgroup>
      <nav>
    <article>
    <footer>


             HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 90
                                                                     1
Article structure tags

     <section>
      <aside>




               HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 91
                                                                       1
New semantic tags

     <time>
   <details>
    <figure>
  <figcaption>
     <mark>


            HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 92
                                                                    1
New <link> relations
<link rel="alternate" type="application/atom+xml"
      title="My Weblog feed"
      href="http://www.phpconference.nl/feed/">
<link rel="search" type="application/opensearchdescription+xml"
      title="My Weblog search"
      href="http://www.phpconference.nl/opensearch.xml">
<link rel="icon" href="/favicon.ico">

<link   rel="pingback" href="http://www.phpconference.nl/xmlrpc.php">
<link   rel="prefetch" href="http://www.phpconference.nl/main.php">
<link   rel="archives" href="http://www.phpconference.nl/archive/">
<link   rel="external" href="http://www.php.net">
<link   rel="license" href="http://www.gnu.org/licenses/gpl.html">
<link   rel="nofollow" href="http://www.ruby-lang.org">




                                           HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 93
                                                                                                   1
WebForms

      HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 94
                                                              1
WebForms attributes (I)
<input type="text" placeholder="Mayflower GmbH">




                                        HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 95
                                                                                                1
WebForms attributes (II)
<input type="text" maxlength="256" name="q" autofocus>




<input type="text" maxlength="256" name="q" required="true">




                                        HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 96
                                                                                                1
WebForms attributes (III)
<input type="tel" name="phonenumber">




<input type="url" name="url">




<input type="email" name="emailaddress">




                                           HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 97
                                                                                                   1
WebForms attributes (IV)
<input type="number" min="0" max="10" step="2" value="6">




                                        HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 98
                                                                                                1
WebForms attributes (V)
<input type="range" min="0" max="10" step="2" value="6">




                                        HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 99
                                                                                                1
HTML5 Speech Input
<input type="text" x-webit-speech>




                                     HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 100
                                                                                             1
Date Picker
<input   type="date">
<input   type="month">
<input   type="week">
<input   type="time">
<input   type="datetime">




                             HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 101
                                                                                     1
Color Picker
<input type="color">




                          HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 102
                                                                                  1
contenteditable
<p contenteditable="true">Hello, Amsterdam!</p>




You can save the content to
‣ sessionStorage
‣ localStorage
‣ or with PHP using XMLHttpRequest

                                        HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 103
                                                                                                1
Canvas




         HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 104
                                                                 1
Canvas
<canvas id="rss" width="24" height="24"></canvas>

<script type="text/javascript">
function draw() {
  var canvas = document.getElementById('rss');
  if (canvas.getContext){
    var ctx = canvas.getContext('2d');
  }
}
</script>




                                        HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 105
                                                                                                1
Canvas
// The triangle
ctx.fillStyle = 'rgb(236,138,68)';
ctx.fillRect(0,0,24,24);

// The lines and the dot
ctx.strokeStyle = "#ffffff";
ctx.lineWidth = 3;
ctx.beginPath();
ctx.arc(4,21,15,Math.PI*3/2,0,false);
ctx.moveTo(4,11);
ctx.arc(4,21,10,Math.PI*3/2,0,false);
ctx.moveTo(8,18);
ctx.arc(7,18,1,Math.PI*2,0,false);
ctx.stroke();




                                        HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 106
                                                                                                1
Canvas
// The gradient
var gradient = ctx.createLinearGradient(0,0,24,24);
gradient.addColorStop(0, 'rgb(236,138,68)');
gradient.addColorStop(0.5, 'rgb(252,158,60)');
gradient.addColorStop(1, 'rgb(220,98,44)');

ctx.fillStyle = gradient;

ctx.beginPath();
ctx.moveTo(0,5);
ctx.quadraticCurveTo(0,0,5,0);
ctx.lineTo(19,0);
ctx.quadraticCurveTo(24,0,24,5);
ctx.lineTo(24,19);
ctx.quadraticCurveTo(24,24,19,24);
ctx.lineTo(5,24);
ctx.quadraticCurveTo(0,24,0,19);
ctx.fill();


                                        HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 107
                                                                                                1
Canvas




         HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 108
                                                                 1
And what about CSS3?




             HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 109
                                                                     1
New selectors
.row:nth-child(even) { background: #cccccc; }
.row:nth-child(odd) { background: #ffffff; }




   row 1
   row 2
   row 3
   row 4


                                        HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 1
                                                                                                1   10
Web Fonts
@font-face {
  font-family: 'Papyrus';
  src: url(Papyrus.otf);
}

header {
  font-family: 'Papyrus';
}




       Ik zal handhaven
                            HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 1 1
                                                                                    1   1
More new CSS3 features...




                HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 1
                                                                        1   12
Lorem ipsum dolor sit     Lorem ipsum dolor sit     Lorem ipsum dolor sit          Lorem ipsum dolor sit
amet, consectetur         amet, consectetur         amet, consectetur              amet, consectetur
adipisicing elit, sed     adipisicing elit, sed     adipisicing elit, sed          adipisicing elit, sed
do eiusmod tempor         do eiusmod tempor         do eiusmod tempor              do eiusmod tempor
incididunt ut labore et   incididunt ut labore et   incididunt ut labore et        incididunt ut labore et
dolore magna aliqua.      dolore magna aliqua.      dolore magna aliqua.           dolore magna aliqua.
Ut enim ad minim          Ut enim ad minim          Ut enim ad minim               Ut enim ad minim
veniam, quis nostrud      veniam, quis nostrud      veniam, quis nostrud           veniam, quis nostrud


              Multi-column layouts
exercitation ullamco      exercitation ullamco      exercitation ullamco           exercitation ullamco
laboris nisi ut aliquip   laboris nisi ut aliquip   laboris nisi ut aliquip        laboris nisi ut aliquip
ex ea commodo             ex ea commodo             ex ea commodo                  ex ea commodo
consequat. Duis aute      consequat. Duis aute      consequat. Duis aute           consequat. Duis aute
irure dolor in            irure dolor in            irure dolor in                 irure dolor in
reprehenderit in          reprehenderit in          reprehenderit in               reprehenderit in
voluptate velit esse      voluptate velit esse      voluptate velit esse           voluptate velit esse
cillum dolore eu          cillum dolore eu          cillum dolore eu               cillum dolore eu
fugiat nulla pariatur.    fugiat nulla pariatur.    fugiat nulla pariatur.         fugiat nulla pariatur.
Excepteur sint            Excepteur sint            Excepteur sint                 Excepteur sint
occaecat cupidatat        occaecat cupidatat        occaecat cupidatat             occaecat cupidatat
non proident, sunt in     non proident, sunt in     non proident, sunt in          non proident, sunt in
culpa qui officia          culpa qui officia          culpa qui officia               culpa qui officia
deserunt mollit anim      deserunt mollit anim      deserunt mollit anim           deserunt mollit anim
id est laborum.           id est laborum.           id est laborum.                id est laborum.

                                                                   HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 1
                                                                                                                           1   13
Opacity
Opacity
Opacity
Opacity
Opacity
      HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 1
                                                              1   14
HSL / HSLA colours




            HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 1
                                                                    1   15
Finally rounded corners! :-)



                  HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 1
                                                                          1   16
Gradients




        HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 1
                                                                1   17
Shadows
    HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 1
                                                            1   18
Shadows
    HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 1
                                                            1   19
Transitions and animations




                HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 120
                                                                        1
Great.
But can I use HTML5 today?


                HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 121
                                                                        1
HTML5 in Browsern
                                                                             73 %

                                              65 %
                                 64 %
                      57 %
          52 %



33 %




IE9    Mobile Safari Safari 5
                                Firefox 4
                                            Opera 11.1
                                                                          Chrome 11

                                              HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 122
                                                                                                      1
HTML5 support
in the year 2011


           HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 123
                                                                   1
Cross
                          content
              Document               New tags              <audio>                    <video>
                          editable
              Messaging


IE 9            yes        yes        yes                     yes                       yes

FF 4            yes        yes        yes                     yes                       yes

Chrome 11       yes        yes        yes                     yes                       yes

Safari 5        yes        yes        yes                     yes                       yes

Opera 11.10     yes        yes        yes                     yes                       yes

                                                HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 124
                                                                                                        1
Simple                                      Offline
                          Texts in                                                     HTML5
              <canvas>               Drag and Drop       Application
                         <canvas>                          Cache                     WebForms
              support


IE 9           yes         no            yes                   no                        no

FF 4           yes         yes           yes                  yes                       yes

Chrome 11      yes         yes           yes                  yes                       yes

Safari 5       yes         yes           yes                  yes                       yes

Opera 11.10    yes         yes           no                   yes                       yes

                                                HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 125
                                                                                                        1
But...




         HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 126
                                                                 1
Browser statistics 2011




               HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 127
                                                                       1
What‘s safe to use today?




                HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 128
                                                                        1
contenteditable
  postMessage
Web Storage (IE 8+)
New semantic tags

             HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 129
                                                                     1
Any HTML5 helpers?



            HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 130
                                                                    1
HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 131
                                                        1
HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 132
                                                        1
Questions?




        HTML5 for PHP Developer I   Mayflower GmbH I 20th May 201 I 133
                                                                1
Thank you very much!
Please rate me at http://joind.in/3239




Contact   Thorsten Rinne
          thorsten.rinne@mayflower.de
          +49 89 242054-31
          @ThorstenRinne

          Mayflower GmbH
          Mannhardtstr. 6
          80538 München
          Germany


                                         © 201 Mayflower GmbH
                                              1

Weitere ähnliche Inhalte

Ähnlich wie HTML5 for PHP Developers - DPC11

One click deployment with Jenkins - PHP Munich
One click deployment with Jenkins - PHP MunichOne click deployment with Jenkins - PHP Munich
One click deployment with Jenkins - PHP MunichMayflower GmbH
 
One Click Deployment with Jenkins - PHP Unconference 2011
One Click Deployment with Jenkins - PHP Unconference 2011One Click Deployment with Jenkins - PHP Unconference 2011
One Click Deployment with Jenkins - PHP Unconference 2011Mayflower GmbH
 
Continuous Improvement in PHP Projects - PHP UK Conference 2011
Continuous Improvement in PHP Projects - PHP UK Conference 2011Continuous Improvement in PHP Projects - PHP UK Conference 2011
Continuous Improvement in PHP Projects - PHP UK Conference 2011Mayflower GmbH
 
Agile php software development
Agile php software developmentAgile php software development
Agile php software developmentMayflower GmbH
 
Continuous Improvement in PHP projects
Continuous Improvement in PHP projectsContinuous Improvement in PHP projects
Continuous Improvement in PHP projectsMayflower GmbH
 
HTML5 for PHP Developers - IPC
HTML5 for PHP Developers - IPCHTML5 for PHP Developers - IPC
HTML5 for PHP Developers - IPCMayflower GmbH
 
State-of-the-art real-time web applications
State-of-the-art real-time web applicationsState-of-the-art real-time web applications
State-of-the-art real-time web applicationsPaul Seiffert
 
One-Click Deployment with Jenkins
One-Click Deployment with JenkinsOne-Click Deployment with Jenkins
One-Click Deployment with JenkinsMayflower GmbH
 
Robin Böhm - Angular 2 - code.talks 2015
Robin Böhm - Angular 2 - code.talks 2015Robin Böhm - Angular 2 - code.talks 2015
Robin Böhm - Angular 2 - code.talks 2015AboutYouGmbH
 
HTML 5 Interview Questions And Answers 2022.pdf
HTML 5 Interview Questions And Answers 2022.pdfHTML 5 Interview Questions And Answers 2022.pdf
HTML 5 Interview Questions And Answers 2022.pdfSprintzeal
 
Html5 Video Vs Flash Video presentation
Html5 Video Vs Flash Video presentationHtml5 Video Vs Flash Video presentation
Html5 Video Vs Flash Video presentationMatthew Fabb
 
iPhone Apps with HTML5
iPhone Apps with HTML5iPhone Apps with HTML5
iPhone Apps with HTML5Mayflower GmbH
 
Mozilla Firefox OS #OpenExpoDay 2014
Mozilla Firefox OS #OpenExpoDay 2014Mozilla Firefox OS #OpenExpoDay 2014
Mozilla Firefox OS #OpenExpoDay 2014OpenExpoES
 
[Pdf ready]go rated-ecommerce
[Pdf ready]go rated-ecommerce[Pdf ready]go rated-ecommerce
[Pdf ready]go rated-ecommerceRagde Falcis
 
New trends of web technology on mobile: HTML5, PhoneGap & NaCl - Barcamp Saig...
New trends of web technology on mobile: HTML5, PhoneGap & NaCl - Barcamp Saig...New trends of web technology on mobile: HTML5, PhoneGap & NaCl - Barcamp Saig...
New trends of web technology on mobile: HTML5, PhoneGap & NaCl - Barcamp Saig...Oliver N
 
MediaMosa Player v2_0 - OPEN SOURCE HTML5 WEBLECTURES PLAYER
MediaMosa Player v2_0 - OPEN SOURCE HTML5 WEBLECTURES PLAYERMediaMosa Player v2_0 - OPEN SOURCE HTML5 WEBLECTURES PLAYER
MediaMosa Player v2_0 - OPEN SOURCE HTML5 WEBLECTURES PLAYERMediaMosa
 

Ähnlich wie HTML5 for PHP Developers - DPC11 (20)

One click deployment with Jenkins - PHP Munich
One click deployment with Jenkins - PHP MunichOne click deployment with Jenkins - PHP Munich
One click deployment with Jenkins - PHP Munich
 
One Click Deployment with Jenkins - PHP Unconference 2011
One Click Deployment with Jenkins - PHP Unconference 2011One Click Deployment with Jenkins - PHP Unconference 2011
One Click Deployment with Jenkins - PHP Unconference 2011
 
Continuous Improvement in PHP Projects - PHP UK Conference 2011
Continuous Improvement in PHP Projects - PHP UK Conference 2011Continuous Improvement in PHP Projects - PHP UK Conference 2011
Continuous Improvement in PHP Projects - PHP UK Conference 2011
 
Agile php software development
Agile php software developmentAgile php software development
Agile php software development
 
Continuous Improvement in PHP projects
Continuous Improvement in PHP projectsContinuous Improvement in PHP projects
Continuous Improvement in PHP projects
 
HTML5 for PHP Developers - IPC
HTML5 for PHP Developers - IPCHTML5 for PHP Developers - IPC
HTML5 for PHP Developers - IPC
 
State-of-the-art real-time web applications
State-of-the-art real-time web applicationsState-of-the-art real-time web applications
State-of-the-art real-time web applications
 
Realtime web
Realtime webRealtime web
Realtime web
 
One-Click Deployment with Jenkins
One-Click Deployment with JenkinsOne-Click Deployment with Jenkins
One-Click Deployment with Jenkins
 
Robin Böhm - Angular 2 - code.talks 2015
Robin Böhm - Angular 2 - code.talks 2015Robin Böhm - Angular 2 - code.talks 2015
Robin Böhm - Angular 2 - code.talks 2015
 
HTML 5 Interview Questions And Answers 2022.pdf
HTML 5 Interview Questions And Answers 2022.pdfHTML 5 Interview Questions And Answers 2022.pdf
HTML 5 Interview Questions And Answers 2022.pdf
 
Html5 Video Vs Flash Video presentation
Html5 Video Vs Flash Video presentationHtml5 Video Vs Flash Video presentation
Html5 Video Vs Flash Video presentation
 
iPhone Apps with HTML5
iPhone Apps with HTML5iPhone Apps with HTML5
iPhone Apps with HTML5
 
HTML5 Introduction – Features and Resources for HTML5
HTML5 Introduction – Features and Resources for HTML5HTML5 Introduction – Features and Resources for HTML5
HTML5 Introduction – Features and Resources for HTML5
 
Mozilla Firefox OS #OpenExpoDay 2014
Mozilla Firefox OS #OpenExpoDay 2014Mozilla Firefox OS #OpenExpoDay 2014
Mozilla Firefox OS #OpenExpoDay 2014
 
[Pdf ready]go rated-ecommerce
[Pdf ready]go rated-ecommerce[Pdf ready]go rated-ecommerce
[Pdf ready]go rated-ecommerce
 
New trends of web technology on mobile: HTML5, PhoneGap & NaCl - Barcamp Saig...
New trends of web technology on mobile: HTML5, PhoneGap & NaCl - Barcamp Saig...New trends of web technology on mobile: HTML5, PhoneGap & NaCl - Barcamp Saig...
New trends of web technology on mobile: HTML5, PhoneGap & NaCl - Barcamp Saig...
 
What is PHP ?
What is PHP ?What is PHP ?
What is PHP ?
 
Hhvm vs php
Hhvm vs phpHhvm vs php
Hhvm vs php
 
MediaMosa Player v2_0 - OPEN SOURCE HTML5 WEBLECTURES PLAYER
MediaMosa Player v2_0 - OPEN SOURCE HTML5 WEBLECTURES PLAYERMediaMosa Player v2_0 - OPEN SOURCE HTML5 WEBLECTURES PLAYER
MediaMosa Player v2_0 - OPEN SOURCE HTML5 WEBLECTURES PLAYER
 

Mehr von Mayflower GmbH

Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...
Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...
Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...Mayflower GmbH
 
JavaScript Days 2015: Security
JavaScript Days 2015: SecurityJavaScript Days 2015: Security
JavaScript Days 2015: SecurityMayflower GmbH
 
Vom Entwickler zur Führungskraft
Vom Entwickler zur FührungskraftVom Entwickler zur Führungskraft
Vom Entwickler zur FührungskraftMayflower GmbH
 
Salt and pepper — native code in the browser Browser using Google native Client
Salt and pepper — native code in the browser Browser using Google native ClientSalt and pepper — native code in the browser Browser using Google native Client
Salt and pepper — native code in the browser Browser using Google native ClientMayflower GmbH
 
Plugging holes — javascript memory leak debugging
Plugging holes — javascript memory leak debuggingPlugging holes — javascript memory leak debugging
Plugging holes — javascript memory leak debuggingMayflower GmbH
 
50 mal produktiver - oder warum ich gute Teams brauche und nicht gute Entwick...
50 mal produktiver - oder warum ich gute Teams brauche und nicht gute Entwick...50 mal produktiver - oder warum ich gute Teams brauche und nicht gute Entwick...
50 mal produktiver - oder warum ich gute Teams brauche und nicht gute Entwick...Mayflower GmbH
 
Native Cross-Platform-Apps mit Titanium Mobile und Alloy
Native Cross-Platform-Apps mit Titanium Mobile und AlloyNative Cross-Platform-Apps mit Titanium Mobile und Alloy
Native Cross-Platform-Apps mit Titanium Mobile und AlloyMayflower GmbH
 
Pair Programming Mythbusters
Pair Programming MythbustersPair Programming Mythbusters
Pair Programming MythbustersMayflower GmbH
 
Shoeism - Frau im Glück
Shoeism - Frau im GlückShoeism - Frau im Glück
Shoeism - Frau im GlückMayflower GmbH
 
Bessere Software schneller liefern
Bessere Software schneller liefernBessere Software schneller liefern
Bessere Software schneller liefernMayflower GmbH
 
Von 0 auf 100 in 2 Sprints
Von 0 auf 100 in 2 SprintsVon 0 auf 100 in 2 Sprints
Von 0 auf 100 in 2 SprintsMayflower GmbH
 
Piwik anpassen und skalieren
Piwik anpassen und skalierenPiwik anpassen und skalieren
Piwik anpassen und skalierenMayflower GmbH
 
Agilitaet im E-Commerce - E-Commerce Breakfast
Agilitaet im E-Commerce - E-Commerce BreakfastAgilitaet im E-Commerce - E-Commerce Breakfast
Agilitaet im E-Commerce - E-Commerce BreakfastMayflower GmbH
 

Mehr von Mayflower GmbH (20)

Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...
Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...
Mit Maintenance umgehen können- Fixt du noch Bugs oder lieferst du schon neue...
 
Why and what is go
Why and what is goWhy and what is go
Why and what is go
 
Agile Anti-Patterns
Agile Anti-PatternsAgile Anti-Patterns
Agile Anti-Patterns
 
JavaScript Days 2015: Security
JavaScript Days 2015: SecurityJavaScript Days 2015: Security
JavaScript Days 2015: Security
 
Vom Entwickler zur Führungskraft
Vom Entwickler zur FührungskraftVom Entwickler zur Führungskraft
Vom Entwickler zur Führungskraft
 
Produktive teams
Produktive teamsProduktive teams
Produktive teams
 
Salt and pepper — native code in the browser Browser using Google native Client
Salt and pepper — native code in the browser Browser using Google native ClientSalt and pepper — native code in the browser Browser using Google native Client
Salt and pepper — native code in the browser Browser using Google native Client
 
Plugging holes — javascript memory leak debugging
Plugging holes — javascript memory leak debuggingPlugging holes — javascript memory leak debugging
Plugging holes — javascript memory leak debugging
 
Usability im web
Usability im webUsability im web
Usability im web
 
Rewrites überleben
Rewrites überlebenRewrites überleben
Rewrites überleben
 
JavaScript Security
JavaScript SecurityJavaScript Security
JavaScript Security
 
50 mal produktiver - oder warum ich gute Teams brauche und nicht gute Entwick...
50 mal produktiver - oder warum ich gute Teams brauche und nicht gute Entwick...50 mal produktiver - oder warum ich gute Teams brauche und nicht gute Entwick...
50 mal produktiver - oder warum ich gute Teams brauche und nicht gute Entwick...
 
Responsive Webdesign
Responsive WebdesignResponsive Webdesign
Responsive Webdesign
 
Native Cross-Platform-Apps mit Titanium Mobile und Alloy
Native Cross-Platform-Apps mit Titanium Mobile und AlloyNative Cross-Platform-Apps mit Titanium Mobile und Alloy
Native Cross-Platform-Apps mit Titanium Mobile und Alloy
 
Pair Programming Mythbusters
Pair Programming MythbustersPair Programming Mythbusters
Pair Programming Mythbusters
 
Shoeism - Frau im Glück
Shoeism - Frau im GlückShoeism - Frau im Glück
Shoeism - Frau im Glück
 
Bessere Software schneller liefern
Bessere Software schneller liefernBessere Software schneller liefern
Bessere Software schneller liefern
 
Von 0 auf 100 in 2 Sprints
Von 0 auf 100 in 2 SprintsVon 0 auf 100 in 2 Sprints
Von 0 auf 100 in 2 Sprints
 
Piwik anpassen und skalieren
Piwik anpassen und skalierenPiwik anpassen und skalieren
Piwik anpassen und skalieren
 
Agilitaet im E-Commerce - E-Commerce Breakfast
Agilitaet im E-Commerce - E-Commerce BreakfastAgilitaet im E-Commerce - E-Commerce Breakfast
Agilitaet im E-Commerce - E-Commerce Breakfast
 

Kürzlich hochgeladen

Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 

Kürzlich hochgeladen (20)

Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 

HTML5 for PHP Developers - DPC11

  • 1. HTML5 for PHP Developers Thorsten Rinne I 20th May 2011 © 201 Mayflower GmbH 1
  • 2. Team Lead Scrum Master Head of Open Source Labs @ThorstenRinne HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 2 1
  • 3. Who are you? HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 3 1
  • 4. I won‘t talk about <video> and <audio> HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 4 1
  • 5. And I don‘t speak about ... HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 5 1
  • 6. Flash is dead. But don‘t tell Adobe. HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 6 1
  • 7. Who‘s already using ... ... ? HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 7 1
  • 8. HTML5 in one sentence? HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 8 1
  • 9. „HTML5 is about moving from documents to applications and from hacks to solutions.“ Chris Heilmann auf Twitter HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 9 1
  • 10. HTML5 for Developers? HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 10 1
  • 11. HTML5 ~= HTML + CSS + JS HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 1 1 1
  • 12. 1999: PHP 3.0 - MySQL 3.22 Apache 1.3 HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 12 1
  • 13. HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 13 1
  • 14. 1999: XMLHttpRequest Object HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 14 1
  • 15. As time goes by ... HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 15 1
  • 16. since 5.0 (1999) since 1.0 (2004) since 1.2 (2004) since 7.6 (2004) HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 16 1
  • 17. 2005: Ajax: A New Approach to Web Applications Blog entry by Jesse James Garret HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 17 1
  • 18. HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 18 1
  • 19. Google Suggest Google Mail Google Maps HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 19 1
  • 20. 2006: Comet HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 20 1
  • 21. HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 21 1
  • 22. Push Ajax Push Helgi‘s birthday HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 22 1
  • 23. Okay, what‘s happening? HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 23 1
  • 24. Content vs. Context HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 24 1
  • 25. Facebook is an application! HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 25 1
  • 26. Page vs. Stream HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 26 1
  • 27. Twitter is an application! HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 27 1
  • 28. Applications? HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 28 1
  • 29. Apps! HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 29 1
  • 30. HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 30 1
  • 31. HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 31 1
  • 32. online == offline HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 32 1
  • 33. Is this the new web? HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 33 1
  • 34. The future is a web app! HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 34 1
  • 35. The mobile browser is almost identical to the desktop browser. HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 35 1
  • 36. The mobile browser has short release cycles. HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 36 1
  • 37. The mobile browser is a „cross platform realtime runtime“. HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 37 1
  • 38. But what about HTML5? And what about PHP? HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 38 1
  • 39. Requests Events HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 39 1
  • 40. 2000: PHP chat style polling Client Server HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 40 1
  • 41. 2000: PHP chat style polling Hey, wazzup? Client Server HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 41 1
  • 42. 2000: PHP chat style polling Um, nothing Hey, wazzup? actually... Client Server HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 42 1
  • 43. 2000: PHP chat style polling Um, nothing Hey, wazzup? actually... Client 1 sec Server HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 43 1
  • 44. 2000: PHP chat style polling Client Server HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 44 1
  • 45. 2000: PHP chat style polling Hey, wazzup? Client Server HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 45 1
  • 46. 2000: PHP chat style polling Um, nothing Hey, wazzup? actually... Client Server HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 46 1
  • 47. 2000: PHP chat style polling Um, nothing Hey, wazzup? actually... Client 1 sec Server HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 47 1
  • 48. 2000: PHP chat style polling WTF??? Client Server HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 48 1
  • 49. 1 user = 1 req / sec CPU #FAIL HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 49 1
  • 50. 2006: Comet style long poll Client Server HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 50 1
  • 51. 2006: Comet style long poll Hey, wazzup? Client Server HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 51 1
  • 52. 2006: Comet style long poll Um, nothing actually... Client 1 sec Server HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 52 1
  • 53. 2006: Comet style long poll Well ... Client 1 sec Server HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 53 1
  • 54. 2006: Comet style long poll Wait ... Client 1 sec Server HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 54 1
  • 55. 2006: Comet style long poll Uh, there is something! Client 1 sec Server HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 55 1
  • 56. 2006: Comet style long poll No, nothing! Client 1 sec Server HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 56 1
  • 57. 2006: Comet style long poll WTF??? Client Server HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 57 1
  • 58. 1 user = 1 apache child MEMORY #FAIL HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 58 1
  • 59. We have a problem. HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 59 1
  • 60. HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 60 1
  • 61. We need help. HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 61 1
  • 62. MEMORY: WIN CPU: 1/2 WIN HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 62 1
  • 63. PHP Server Client Client Client HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 63 1
  • 64. PHP Server Client Client Client HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 64 1
  • 65. We know PHP We know node.js HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 65 1
  • 66. What about the client? HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 66 1
  • 67. WebSockets if ("WebSocket" in window) { var ws = new WebSocket("ws://example.com/service"); ws.onopen = function() { // WebSocket is connected. // You can send data by send() method. ws.send("message to send"); // .... }; ws.onmessage = function (evt) { var received_msg = evt.data; }; ws.onclose = function() { // WebSocket is closed }; } else { // the browser doesn't support WebSockets. } HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 67 1
  • 68. Client GET /demo HTTP/1.1 Upgrade: WebSocket Connection: Upgrade Host: example.com Origin: http://example.com Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5 Sec-WebSocket-Key2: 12998 5 Y3 1 .P00 ^n:ds[4U Server HTTP/1.1 101 WebSocket Protocol Handshake Upgrade: WebSocket Connection: Upgrade Sec-WebSocket-Origin: http://example.com Sec-WebSocket-Location: ws://example.com/demo Sec-WebSocket-Protocol: sample 8jKS'y:G*Co,Wxa- HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 68 1
  • 69. More logic will move to the client... the browser. HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 69 1
  • 70. WebWorker main.js var myWorker = new Worker('backgroundtask.js'); myWorker.onmessage = function(event) { alert(event.data); }; backgroundtask.js self.onmessage = function(event) { // Do some heavy work self.postMessage('Hello, Amsterdam'); } HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 70 1
  • 71. WebMessaging <form> <input type="text" name="msg" value="My message" id="msg"> <input type="submit"> <h2>Ziel iFrame:</h2> <iframe id="iframe" src="postmessage.html"></iframe> </form> <script> var win = document.getElementById("iframe").contentWindow; addEvent( document.getElementsByTagName('form')[0], 'submit', function (e) { if (e.preventDefault) e.preventDefault(); win.postMessage(document.getElementById("msg").value, "http://www.phpconference.nl"); e.returnValue = false; return false; }); </script> HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 71 1
  • 72. Offline application cache index.html <html manifest="cache.manifest"> <script> window.applicationCache.addEventListener( 'checking', updateCacheStatus, false) </script> cache.manifest CACHE MANIFEST CACHE: /html5/demo/index.html /html5/demo/css/style.css /html5/demo/images/background.png /html5/demo/js/application.js HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 72 1
  • 73. Web Storage ‣„short living“ data ‣sessionStorage object ‣will be deleted by closing the browser ‣„long living“ data ‣localStorage object ‣won‘t be deleted after closing the browser Safari/Chrome Firefox IE Opera 2 MB 5 MB ~ 200MB 5 MB 4 MB HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 73 1
  • 74. Web Storage <p>This page was requested <b> <script> if (!sessionStorage.pageCounter) { sessionStorage.setItem('pageCounter',0); } sessionStorage.setItem('pageCounter', parseInt(sessionStorage.pageCounter)+1); document.write(sessionStorage.pageCounter); </script> </b> times.</p> <p> <input value="sessionStorage leeren" type="button" onClick="sessionStorage.clear();location.reload(true);"> <input value="Seite laden" type="button" onClick="location.reload(true);"> </p> HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 74 1
  • 75. 2007: iPhone web apps should be only based on HTML5,CSS3, JavaScript, offline application cache and web storage. HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 75 1
  • 76. Web SQL Database var db = openDatabase('myDatabase', '1.0', 'My first Web SQL database', 2 * 1024 * 1024); db.transaction(function (tx) { tx.executeSql('CREATE TABLE IF NOT EXISTS conferences Work on specs have stopped in (id unique, text)'); tx.executeSql('INSERT INTO conferences (id, text) VALUES (1, "Dutch PHP Conference")'); late 2010. Don‘t use it. }); HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 76 1
  • 77. Geolocation if (navigator.geolocation) { navigator.geolocation.getCurrentPosition( function(position) { var lat = position.coords.latitude; var lng = position.coords.longitude; var options = { position: new google.maps.LatLng(lat, lng) } var marker = new google.maps.Marker(options); marker.setMap(map); }); } HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 77 1
  • 78. Drag and Drop API <li draggable="true" id="pic" ondragstart="drag(this, event)"> <span>foobar.png</span></li> <div id="trash" ondrop="drop(this, event)" ondropenter="return false" ondropover="return false"></div> function drag(target, e) { e.dataTransfer.setData("Text", target.id); } function drop(target, e) { var id = e.dataTransfer.getData("Text"); target.appendChild(document.getElementById(id); e.preventDefault(); } HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 78 1
  • 79. FileReader API (I) var reader = new FileReader(); reader.onload = function(e) { var bin = e.target.result; // bin is a binary string }; reader.readAsBinaryString(file); HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 79 1
  • 80. FileReader API (II) var xhr = new XMLHttpRequest(); xhr.open("POST", "upload.php"); xhr.overrideMimeType("text/plain; charset=x-user-defined-binary"); xhr.sendAsBinary(); xhr.upload.addEventListener("progress", function(e) { if (e.lengthComputable) { var percentage = Math.round((e.loaded * 100) / e.total); // do something } }, false); HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 80 1
  • 81. This was just the JavaScript part of HTML5. HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 81 1
  • 82. What‘s left for us PHP Developers? HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 82 1
  • 83. HTML5 is part of an application framework. HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 83 1
  • 84. The LAMP stack gets a bust of Janus. HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 84 1
  • 85. Realtime Web component component HTML5 / JS PHP / MySQL HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 85 1
  • 86. PHP Developer have to learn JavaScript as well! HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 86 1
  • 87. Modern PHP applications use both techniques: JavaScript PHP 50% 50% HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 87 1
  • 88. HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 88 1
  • 89. <!DOCTYPE html> HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 89 1
  • 90. Page structure tags <header> <hgroup> <nav> <article> <footer> HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 90 1
  • 91. Article structure tags <section> <aside> HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 91 1
  • 92. New semantic tags <time> <details> <figure> <figcaption> <mark> HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 92 1
  • 93. New <link> relations <link rel="alternate" type="application/atom+xml" title="My Weblog feed" href="http://www.phpconference.nl/feed/"> <link rel="search" type="application/opensearchdescription+xml" title="My Weblog search" href="http://www.phpconference.nl/opensearch.xml"> <link rel="icon" href="/favicon.ico"> <link rel="pingback" href="http://www.phpconference.nl/xmlrpc.php"> <link rel="prefetch" href="http://www.phpconference.nl/main.php"> <link rel="archives" href="http://www.phpconference.nl/archive/"> <link rel="external" href="http://www.php.net"> <link rel="license" href="http://www.gnu.org/licenses/gpl.html"> <link rel="nofollow" href="http://www.ruby-lang.org"> HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 93 1
  • 94. WebForms HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 94 1
  • 95. WebForms attributes (I) <input type="text" placeholder="Mayflower GmbH"> HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 95 1
  • 96. WebForms attributes (II) <input type="text" maxlength="256" name="q" autofocus> <input type="text" maxlength="256" name="q" required="true"> HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 96 1
  • 97. WebForms attributes (III) <input type="tel" name="phonenumber"> <input type="url" name="url"> <input type="email" name="emailaddress"> HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 97 1
  • 98. WebForms attributes (IV) <input type="number" min="0" max="10" step="2" value="6"> HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 98 1
  • 99. WebForms attributes (V) <input type="range" min="0" max="10" step="2" value="6"> HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 99 1
  • 100. HTML5 Speech Input <input type="text" x-webit-speech> HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 100 1
  • 101. Date Picker <input type="date"> <input type="month"> <input type="week"> <input type="time"> <input type="datetime"> HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 101 1
  • 102. Color Picker <input type="color"> HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 102 1
  • 103. contenteditable <p contenteditable="true">Hello, Amsterdam!</p> You can save the content to ‣ sessionStorage ‣ localStorage ‣ or with PHP using XMLHttpRequest HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 103 1
  • 104. Canvas HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 104 1
  • 105. Canvas <canvas id="rss" width="24" height="24"></canvas> <script type="text/javascript"> function draw() { var canvas = document.getElementById('rss'); if (canvas.getContext){ var ctx = canvas.getContext('2d'); } } </script> HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 105 1
  • 106. Canvas // The triangle ctx.fillStyle = 'rgb(236,138,68)'; ctx.fillRect(0,0,24,24); // The lines and the dot ctx.strokeStyle = "#ffffff"; ctx.lineWidth = 3; ctx.beginPath(); ctx.arc(4,21,15,Math.PI*3/2,0,false); ctx.moveTo(4,11); ctx.arc(4,21,10,Math.PI*3/2,0,false); ctx.moveTo(8,18); ctx.arc(7,18,1,Math.PI*2,0,false); ctx.stroke(); HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 106 1
  • 107. Canvas // The gradient var gradient = ctx.createLinearGradient(0,0,24,24); gradient.addColorStop(0, 'rgb(236,138,68)'); gradient.addColorStop(0.5, 'rgb(252,158,60)'); gradient.addColorStop(1, 'rgb(220,98,44)'); ctx.fillStyle = gradient; ctx.beginPath(); ctx.moveTo(0,5); ctx.quadraticCurveTo(0,0,5,0); ctx.lineTo(19,0); ctx.quadraticCurveTo(24,0,24,5); ctx.lineTo(24,19); ctx.quadraticCurveTo(24,24,19,24); ctx.lineTo(5,24); ctx.quadraticCurveTo(0,24,0,19); ctx.fill(); HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 107 1
  • 108. Canvas HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 108 1
  • 109. And what about CSS3? HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 109 1
  • 110. New selectors .row:nth-child(even) { background: #cccccc; } .row:nth-child(odd) { background: #ffffff; } row 1 row 2 row 3 row 4 HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 1 1 10
  • 111. Web Fonts @font-face { font-family: 'Papyrus'; src: url(Papyrus.otf); } header { font-family: 'Papyrus'; } Ik zal handhaven HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 1 1 1 1
  • 112. More new CSS3 features... HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 1 1 12
  • 113. Lorem ipsum dolor sit Lorem ipsum dolor sit Lorem ipsum dolor sit Lorem ipsum dolor sit amet, consectetur amet, consectetur amet, consectetur amet, consectetur adipisicing elit, sed adipisicing elit, sed adipisicing elit, sed adipisicing elit, sed do eiusmod tempor do eiusmod tempor do eiusmod tempor do eiusmod tempor incididunt ut labore et incididunt ut labore et incididunt ut labore et incididunt ut labore et dolore magna aliqua. dolore magna aliqua. dolore magna aliqua. dolore magna aliqua. Ut enim ad minim Ut enim ad minim Ut enim ad minim Ut enim ad minim veniam, quis nostrud veniam, quis nostrud veniam, quis nostrud veniam, quis nostrud Multi-column layouts exercitation ullamco exercitation ullamco exercitation ullamco exercitation ullamco laboris nisi ut aliquip laboris nisi ut aliquip laboris nisi ut aliquip laboris nisi ut aliquip ex ea commodo ex ea commodo ex ea commodo ex ea commodo consequat. Duis aute consequat. Duis aute consequat. Duis aute consequat. Duis aute irure dolor in irure dolor in irure dolor in irure dolor in reprehenderit in reprehenderit in reprehenderit in reprehenderit in voluptate velit esse voluptate velit esse voluptate velit esse voluptate velit esse cillum dolore eu cillum dolore eu cillum dolore eu cillum dolore eu fugiat nulla pariatur. fugiat nulla pariatur. fugiat nulla pariatur. fugiat nulla pariatur. Excepteur sint Excepteur sint Excepteur sint Excepteur sint occaecat cupidatat occaecat cupidatat occaecat cupidatat occaecat cupidatat non proident, sunt in non proident, sunt in non proident, sunt in non proident, sunt in culpa qui officia culpa qui officia culpa qui officia culpa qui officia deserunt mollit anim deserunt mollit anim deserunt mollit anim deserunt mollit anim id est laborum. id est laborum. id est laborum. id est laborum. HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 1 1 13
  • 114. Opacity Opacity Opacity Opacity Opacity HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 1 1 14
  • 115. HSL / HSLA colours HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 1 1 15
  • 116. Finally rounded corners! :-) HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 1 1 16
  • 117. Gradients HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 1 1 17
  • 118. Shadows HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 1 1 18
  • 119. Shadows HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 1 1 19
  • 120. Transitions and animations HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 120 1
  • 121. Great. But can I use HTML5 today? HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 121 1
  • 122. HTML5 in Browsern 73 % 65 % 64 % 57 % 52 % 33 % IE9 Mobile Safari Safari 5 Firefox 4 Opera 11.1 Chrome 11 HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 122 1
  • 123. HTML5 support in the year 2011 HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 123 1
  • 124. Cross content Document New tags <audio> <video> editable Messaging IE 9 yes yes yes yes yes FF 4 yes yes yes yes yes Chrome 11 yes yes yes yes yes Safari 5 yes yes yes yes yes Opera 11.10 yes yes yes yes yes HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 124 1
  • 125. Simple Offline Texts in HTML5 <canvas> Drag and Drop Application <canvas> Cache WebForms support IE 9 yes no yes no no FF 4 yes yes yes yes yes Chrome 11 yes yes yes yes yes Safari 5 yes yes yes yes yes Opera 11.10 yes yes no yes yes HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 125 1
  • 126. But... HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 126 1
  • 127. Browser statistics 2011 HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 127 1
  • 128. What‘s safe to use today? HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 128 1
  • 129. contenteditable postMessage Web Storage (IE 8+) New semantic tags HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 129 1
  • 130. Any HTML5 helpers? HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 130 1
  • 131. HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 131 1
  • 132. HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 132 1
  • 133. Questions? HTML5 for PHP Developer I Mayflower GmbH I 20th May 201 I 133 1
  • 134. Thank you very much! Please rate me at http://joind.in/3239 Contact Thorsten Rinne thorsten.rinne@mayflower.de +49 89 242054-31 @ThorstenRinne Mayflower GmbH Mannhardtstr. 6 80538 München Germany © 201 Mayflower GmbH 1