SlideShare uma empresa Scribd logo
1 de 109
Baixar para ler offline
31 mars 2010 - iPhone + iPad DevCamp Qc



Développement Web sur iPhone
      HTML, CSS et Javascript


          Rémi Prévost, iXmédia inc.


                    BY-NC-SA
Mobile Safari
HTML
HTML
CSS
HTML
CSS
Javascript
HTML
CSS
Javascript
Flash
HTML
CSS
Javascript
Flash
HTML         No Flash, LOL.

CSS
Javascript
Flash
HTML
CSS
Javascript
HTML
CSS
Javascript
}
HTML
CSS              HTML5
Javascript
HTML
HTML

Nouveaux éléments
HTML

Nouveaux éléments
       header
       footer
        nav
      section
      article
        time
       figure
       hgroup
      progress
       audio
       video
HTML › Nouveaux éléments

       video
HTML › Nouveaux éléments

           video
<video src="lipdub-ixmedia.mp4"
       width="320" height="240"
       controls preload>
</video>
HTML › Nouveaux éléments

           video
<video src="lipdub-ixmedia.mp4"
       width="320" height="240"
       controls preload>
</video>
HTML › Nouveaux éléments

           video
<video src="lipdub-ixmedia.mp4"
       width="320" height="240"
       controls preload>
</video>
HTML

Nouveaux attributs
HTML

Nouveaux attributs
       required
    contenteditable
      placeholder
         role
       autofocus
HTML › Nouveaux attributs

 placeholder
HTML › Nouveaux attributs

       placeholder
<input placeholder="Recherche…" />
HTML › Nouveaux attributs

       placeholder
<input placeholder="Recherche…" />
HTML › Nouveaux attributs

       placeholder
<input placeholder="Recherche…" />
HTML

Nouveaux types de champs
HTML

Nouveaux types de champs
          search
          email
           tel
          range
           url
         datetime
          month
          color
           time
          number
HTML › Nouveaux types de champs

 email et number
HTML › Nouveaux types de champs

            email et number
<input type="email" />
HTML › Nouveaux types de champs

            email et number
<input type="email" />
HTML › Nouveaux types de champs

            email et number
<input type="email" />        <input type="number" />
HTML › Nouveaux types de champs

            email et number
<input type="email" />        <input type="number" />
HTML

Meta-données
HTML

      Meta-données
              viewport
          format-detection
          apple-touch-icon
      apple-touch-startup-image
    apple-mobile-web-app-capable
apple-mobile-web-app-status-bar-style
HTML › Méta-données iPhone

     viewport
HTML › Méta-données iPhone

           viewport
<meta name="viewport"
      content="width=320" />
HTML › Méta-données iPhone

           viewport
<meta name="viewport"
      content="width=320" />
HTML › Méta-données iPhone

           viewport
<meta name="viewport"
      content="width=320" />

<meta name="viewport"
      content="width=device-width" />
HTML › Méta-données iPhone

           viewport
<meta name="viewport"
      content="width=320" />

<meta name="viewport"
      content="width=device-width" />

<meta name="viewport"
      content="user-scalable=0" />
HTML › Méta-données iPhone

format-detection
HTML › Méta-données iPhone

             format-detection
<meta name="format-detection" content="telephone=no" />
HTML › Méta-données iPhone

             format-detection
<meta name="format-detection" content="telephone=no" />
HTML › Méta-données iPhone

             format-detection
<meta name="format-detection" content="telephone=no" />
HTML › Méta-données iPhone

             format-detection
<meta name="format-detection" content="telephone=no" />
HTML › Méta-données iPhone

apple-touch-icon
HTML › Méta-données iPhone

      apple-touch-icon
<link rel="apple-touch-icon"
      href="/icone-carre.png" />
HTML › Méta-données iPhone

      apple-touch-icon
<link rel="apple-touch-icon"
      href="/icone-carre.png" />

<link rel="apple-touch-icon-precomposed"
      href="/icone-deja-arrangee.png" />
HTML › Méta-données iPhone

      apple-touch-icon
<link rel="apple-touch-icon"
      href="/icone-carre.png" />

<link rel="apple-touch-icon-precomposed"
      href="/icone-deja-arrangee.png" />
HTML › Méta-données iPhone

      apple-touch-icon
<link rel="apple-touch-icon"
      href="/icone-carre.png" />

<link rel="apple-touch-icon-precomposed"
      href="/icone-deja-arrangee.png" />
HTML › Méta-données iPhone

apple-touch-startup-image
HTML › Méta-données iPhone

apple-touch-startup-image
  <meta name="apple-touch-startup-image"
        content="/welcome.png" />
HTML › Méta-données iPhone

apple-touch-startup-image
  <meta name="apple-touch-startup-image"
        content="/welcome.png" />
HTML › Méta-données iPhone

apple-mobile-web-app-capable
HTML › Méta-données iPhone

apple-mobile-web-app-capable
   <meta name="apple-mobile-web-app-capable"
         content="yes" />
HTML › Méta-données iPhone

apple-mobile-web-app-capable
   <meta name="apple-mobile-web-app-capable"
         content="yes" />
HTML › Méta-données iPhone

apple-mobile-web-status-bar-style
HTML › Méta-données iPhone

apple-mobile-web-status-bar-style
  <meta name="apple-mobile-web-app-status-bar-style"
        content="black-translucent" />
HTML › Méta-données iPhone

apple-mobile-web-status-bar-style
  <meta name="apple-mobile-web-app-status-bar-style"
        content="black-translucent" />
CSS
CSS
WebKit
CSS

-webkit-border-radius
  -webkit-border-radius: 1em;
CSS

      -webkit-transform
-webkit-transform: rotate(90deg) scale(1.5);
CSS

        -webkit-box-shadow
-webkit-box-shadow: 9px 9px 30px rgba(255,0,255,0.9);
CSS

             -webkit-box-shadow
-webkit-box-shadow: 9px 9px 30px rgba(255,0,255,0.9);




 Source : ledevoir.com
CSS

      text-shadow
text-shadow: 15px 15px 2px #ffff66;




OMG
CSS

            @font-face
@font-face {
	 font-family: 'Megalopolis';
	 src: url('Megalopolis.svg#MegalopolisExtra')
        format('svg');
}

h1 {
  font-family: 'Megalopolis';
}
CSS

@font-face
CSS

-webkit-tap-highlight-color
 propriété non-déclarée   -webkit-tap-highlight-color: rgba(255,0,0,0.5);
Javascript
Javascript

Nouveaux événements
Javascript

Nouveaux événements
       ontouchstart
        ontouchmove
        ontouchend
      ontouchcancel
Javascript

Nouveaux événements
       ontouchstart
        ontouchmove
        ontouchend
      ontouchcancel
Javascript

Nouveaux événements
       ontouchstart
        ontouchmove
        ontouchend
      ontouchcancel
Javascript

Nouveaux événements
       ontouchstart
        ontouchmove
        ontouchend
      ontouchcancel
Javascript

Nouveaux événements
       ontouchstart
        ontouchmove
        ontouchend
      ontouchcancel
Javascript

Nouveaux événements
Javascript

Nouveaux événements
      ongesturestart
     ongesturechange
       ongestureend
Javascript

Nouveaux événements
      ongesturestart
     ongesturechange
       ongestureend
Javascript

Nouveaux événements
      ongesturestart
     ongesturechange
       ongestureend
Javascript

Nouveaux événements
      ongesturestart
     ongesturechange
       ongestureend
Javascript

Nouveaux événements
      ongesturestart
     ongesturechange
       ongestureend
Javascript

Nouveaux événements
Javascript

Nouveaux événements
    onorientationchange
Javascript

    Nouveaux événements
             onorientationchange


window.onorientationchange = function() {
    alert(window.orientation); // 0, 90, -90 ou 180
};
Javascript

    Nouveaux événements
             onorientationchange


window.onorientationchange = function() {
    alert(window.orientation); // 0, 90, -90 ou 180
};
Javascript

    Nouveaux événements
             onorientationchange


window.onorientationchange = function() {
    alert(window.orientation); // 0, 90, -90 ou 180
};
Javascript

Événements supportés
    différemment
Javascript

Événements supportés
    différemment
       onmouseover
       onmousemove
       onmousedown
        onmouseup
         onclick
Javascript

Événements supportés
    différemment
Javascript

Événements supportés
    différemment
       onfocus
       onblur
Javascript

Événements non supportés
Javascript

Événements non supportés
            oncut
           oncopy
           onpaste
         onselection
Javascript

Événements non supportés
Javascript

Événements non supportés
          ondrag
          ondrop
Javascript

 Géolocalisation :
obtenir la position
Javascript

            Géolocalisation :
           obtenir la position
navigator
.geolocation
.getCurrentPosition(function(p) {
    alert(p.coords.latitude+', '+p.coords.longitude);
});
Javascript

 Géolocalisation :
obtenir la position
Javascript

    Géolocalisation : surveiller
    le changement de position
navigator
.geolocation
.watchPosition(function(p) {
    alert(p.coords.latitude+', '+p.coords.longitude);
});
Javascript

Stockage : sauvegarder
 des données en local
Javascript

Stockage : sauvegarder
 des données en local
localStorage.setItem('foo', 'bar');
localStorage.getItem('foo'); // 'bar'

localStorage['foo'] = 'bar';
localStorage['foo']; // 'bar'

localStorage.clear();
Javascript

Stockage : sauvegarder
 des données en local
Javascript

Stockage : sauvegarder
 des données en local
Javascript

     Canvas : créer
des éléments graphiques
Javascript

           Canvas : créer
      des éléments graphiques
<canvas id="toile" width="500" height="500" />
Javascript

           Canvas : créer
      des éléments graphiques
<canvas id="toile" width="500" height="500" />

c = document.getElementById('toile').getContext('2d');
c.fillStyle = "#f00";
c.fillRect(10,10,100,100);
Javascript

     Canvas : créer
des éléments graphiques
}
HTML
CSS              HTML5
Javascript
Code source
github.com/remiprev/iphonedevcampqc


           En action
    iphonedevcampqc.exomel.com


            Twitter : @remi

Mais conteúdo relacionado

Destaque

Tugas Psikologi Pendidikan
Tugas Psikologi PendidikanTugas Psikologi Pendidikan
Tugas Psikologi Pendidikan
IIKCASIKIN
 
Introduction à Sinatra
Introduction à SinatraIntroduction à Sinatra
Introduction à Sinatra
Rémi Prévost
 

Destaque (12)

Szochalo Start
Szochalo StartSzochalo Start
Szochalo Start
 
Motivate
MotivateMotivate
Motivate
 
Out_Of_The_Trenches_Bell_2016_UIC_IT_Pro_Forum_May_24_2016
Out_Of_The_Trenches_Bell_2016_UIC_IT_Pro_Forum_May_24_2016Out_Of_The_Trenches_Bell_2016_UIC_IT_Pro_Forum_May_24_2016
Out_Of_The_Trenches_Bell_2016_UIC_IT_Pro_Forum_May_24_2016
 
iHT² Health IT Webinar - Leveraging Cloud Computing To Address Public Health ...
iHT² Health IT Webinar - Leveraging Cloud Computing To Address Public Health ...iHT² Health IT Webinar - Leveraging Cloud Computing To Address Public Health ...
iHT² Health IT Webinar - Leveraging Cloud Computing To Address Public Health ...
 
CSS 3 Overview
CSS 3 OverviewCSS 3 Overview
CSS 3 Overview
 
Tugas Psikologi Pendidikan
Tugas Psikologi PendidikanTugas Psikologi Pendidikan
Tugas Psikologi Pendidikan
 
Introduction à Sinatra
Introduction à SinatraIntroduction à Sinatra
Introduction à Sinatra
 
Blue Sky and Bullet Points
Blue Sky and Bullet PointsBlue Sky and Bullet Points
Blue Sky and Bullet Points
 
Simmons Cinematic Society Brand Design
Simmons Cinematic Society Brand DesignSimmons Cinematic Society Brand Design
Simmons Cinematic Society Brand Design
 
Leveraging ArcGIS to Enable Public Health Surveillance of Work-Related Injuries
Leveraging ArcGIS to Enable Public Health Surveillance of Work-Related InjuriesLeveraging ArcGIS to Enable Public Health Surveillance of Work-Related Injuries
Leveraging ArcGIS to Enable Public Health Surveillance of Work-Related Injuries
 
Project Communications Management Success
Project Communications Management SuccessProject Communications Management Success
Project Communications Management Success
 
Html5 Overview
Html5 OverviewHtml5 Overview
Html5 Overview
 

Semelhante a Développement Web sur iPhone (iPhone+iPad DevCamp Québec)

Enib cours c.a.i. web - séance #1 - html5 css3-js - 2
Enib   cours c.a.i. web - séance #1 - html5 css3-js - 2Enib   cours c.a.i. web - séance #1 - html5 css3-js - 2
Enib cours c.a.i. web - séance #1 - html5 css3-js - 2
Horacio Gonzalez
 
Aria au pays du Web
Aria au pays du WebAria au pays du Web
Aria au pays du Web
JPVillain
 

Semelhante a Développement Web sur iPhone (iPhone+iPad DevCamp Québec) (20)

Codedarmor 2012 - 06/03 - HTML5, CSS3 et Javascript
Codedarmor 2012 - 06/03 - HTML5, CSS3 et JavascriptCodedarmor 2012 - 06/03 - HTML5, CSS3 et Javascript
Codedarmor 2012 - 06/03 - HTML5, CSS3 et Javascript
 
Html5 2
Html5 2Html5 2
Html5 2
 
Présentation complète de l'HTML5
Présentation complète de l'HTML5Présentation complète de l'HTML5
Présentation complète de l'HTML5
 
HTML5, le nouveau buzzword
HTML5, le nouveau buzzwordHTML5, le nouveau buzzword
HTML5, le nouveau buzzword
 
Présentation welcom la webperf by object23
Présentation welcom la webperf by object23Présentation welcom la webperf by object23
Présentation welcom la webperf by object23
 
Enib cours c.a.i. web - séance #1 - html5 css3-js - 2
Enib   cours c.a.i. web - séance #1 - html5 css3-js - 2Enib   cours c.a.i. web - séance #1 - html5 css3-js - 2
Enib cours c.a.i. web - séance #1 - html5 css3-js - 2
 
HTML5... La révolution maintenant!
HTML5... La révolution maintenant!HTML5... La révolution maintenant!
HTML5... La révolution maintenant!
 
HTML5... La révolution maintenant!
HTML5... La révolution maintenant!HTML5... La révolution maintenant!
HTML5... La révolution maintenant!
 
La mobilité dans Drupal
La mobilité dans DrupalLa mobilité dans Drupal
La mobilité dans Drupal
 
ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 2/3 - HTML5, CSS3, Twitte...
ENIB 2015-2016 - CAI Web -  S01E01- Côté navigateur 2/3 - HTML5, CSS3, Twitte...ENIB 2015-2016 - CAI Web -  S01E01- Côté navigateur 2/3 - HTML5, CSS3, Twitte...
ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 2/3 - HTML5, CSS3, Twitte...
 
Un site web responsive en une heure
Un site web responsive en une heureUn site web responsive en une heure
Un site web responsive en une heure
 
Symfony2 - Un Framework PHP 5 Performant
Symfony2 - Un Framework PHP 5 PerformantSymfony2 - Un Framework PHP 5 Performant
Symfony2 - Un Framework PHP 5 Performant
 
HTML
HTMLHTML
HTML
 
Internationalisation du Front
Internationalisation du FrontInternationalisation du Front
Internationalisation du Front
 
Développement Web - HTML5, CSS3, APIs Web
Développement Web - HTML5, CSS3, APIs WebDéveloppement Web - HTML5, CSS3, APIs Web
Développement Web - HTML5, CSS3, APIs Web
 
Découverte du moteur de rendu du projet Spartan
Découverte du moteur de rendu du projet SpartanDécouverte du moteur de rendu du projet Spartan
Découverte du moteur de rendu du projet Spartan
 
Html5 & ie
Html5 & ieHtml5 & ie
Html5 & ie
 
Aria au pays du Web
Aria au pays du WebAria au pays du Web
Aria au pays du Web
 
Html5 now light
Html5 now lightHtml5 now light
Html5 now light
 
ASP.NET from Zero to Hero
ASP.NET from Zero to HeroASP.NET from Zero to Hero
ASP.NET from Zero to Hero
 

Développement Web sur iPhone (iPhone+iPad DevCamp Québec)