SlideShare une entreprise Scribd logo
1  sur  85
Corso WebApp iOS
          “Web Dev for iOS Devices”
                             Lezione 06/10

”..you’ve got everything you need if you know
how to write apps using.. ..web standards..”
  Steve Jobs
    Apple Inc. Co-Founder.
Chapter 03
Web Development for iOS Devices


Chapter 07
Web Standards for WebKit




  http://www.apress.com/9781430232469
Diario Lezioni
        LEZIONE 06

 Mobile Touch Development
           HTML5
            CSS3
         Javascript
HTML5
Tim Berners-Lee
HTML5
HTML5
HTML5
     Working in Progress

http://dev.w3.org/html5/spec/
HTML5
Ridefinizione Tag

     <i>
     <b>
    <em>
   <strong>
HTML5
                    tag italic: <i>

                testo in formato italico
senza riferire nessuna particolare enfasi o importanza
                    al testo stesso
HTML5
                   tag bold: <b>

                 testo in formato bold
senza riferire nessuna particolare enfasi o importanza
                     al testo stesso
HTML5
 tag emphatisis: <em>

    testo enfatizzato
per uno specifico motivo
HTML5
tag strong emphasis: <strong>

    testo molto enfatizzato
   per uno specifico motivo
HTML5
Nuova Semantica

      …
   <aside>
      …
   <footer>
   <header>
      …
    <nav>
      …
HTML4 Vs HTML5
HTML5
Nuove Funzionalità

  Audio/Video
      Canvas
Application Caches
   Geolocation
  Web Workers
HTML5
                tag video: <video>

<video
   width="100%" height="148"
   src="videos/iphone_facetime.mp4"
   controls poster="pics/poster-facetime.jpg">
</video>
HTML5
             tag video: <video>

alcuni attributi sono ignorati da iOS (iPhone)

                  autoplay
                  controls
HTML5
                   tag video: <video>

altri attributi hanno comportamenti standard su iOS (iPad)

          controls (full-screen playback toggle)
HTML5
    tag video: <video>

     attributo preload

  (iOS): auto = no preload
(desktop) auto = si preload
HTML5
               tag video: <video>

<video>
   <source src="videos/iphone_facetime.mp4"
   media=”(max-device-width:320px)”></source>
   <source src="videos/ipad_facetime.mp4"
   media=”(min-device-width:768px)”></source>
</video>
HTML5
        tag video: <video>

           formati video

    H.264 (up to 720p, 30fps)
MPEG-4 (up to 2.5 Mbps, 640x480px)
M-JPG (up to 35 Mbps, 1280x720px)
HTML5
tag video: <video>
HTML5
HTML5
         tag audio: <audio>

<audio src="audioName.mp3"></audio>
HTML5
tag audio: <audio>

alcuni formati audio

 AAC (8-320Kbps)
HE-AAC (8-320Kbps)
 MP3 (8-320Kbps)
HTML5
           tag canvas: <canvas>

permette di ottenere effetti grafici avanzati
       uso di immagini dinamiche
     ridurre latenze di caricamento

         downside: GPU overhead
HTML5
                     tag canvas: <canvas>

        e’ un API Javascript che permette allo sviluppatore
di codificare delle operazioni di disegno basate sul singolo pixel
                    (contrapposti ai vettori SVG)

       possono inoltre essere usati tutti gli assets grafici
           compatibili con un browser (png, jpg, …)
HTML5
             tag canvas: <canvas>

 l’elemento <canvas> delimita dove Javascript
         andrà a disegnare on-the-fly

quello che viene disegnato diviene parte del DOM
   e viene “dimenticato” dal Javascript Engine
HTML5
      tag canvas: <canvas>

Canvas Javascript API comprendono:

             2D API
             3D API
HTML5
HTML5
               tag canvas: <canvas>

<canvas id=”canvasTest” width=”320” height=”200”>
  Fallback Content
</canvas>
HTML5
             tag canvas: <canvas>

      disegnare usando <canvas> richiede:

        recuperare un riferimento al canvas
ricevere il “drawing context” dall’elemento canvas
    se si riceve il “drawing context”: disegnare
HTML5
                   tag canvas: <canvas>

function drawOnCanvas() {
   var ctxElement = document.getElementById(“canvasTest”);
   var ctx = ctxElement.getContext(“2d”);
   if (ctx != null) {
       // we can draw using Canvas 2D API
   }
}
HTML5
                   tag canvas: <canvas>

function drawOnCanvas() {
   var ctxElement = document.getElementById(“canvasTest”);
   var ctx = ctxElement.getContext(“2d”);
   if (ctx != null) {
       // we can draw using Canvas 2D API
   }
}
HTML5
                   tag canvas: <canvas>

function drawOnCanvas() {
   var ctxElement = document.getElementById(“canvasTest”);
   var ctx = ctxElement.getContext(“2d”);
   if (ctx != null) {
       // we can draw using Canvas 2D API
   }
}
HTML5




HTML5 Canvas 2D API
HTML5
               tag canvas: <canvas>

<canvas id=”canvasTest” width=”320” height=”200”>
  Please Enable Javascript
</canvas>
HTML5
                     tag canvas: <canvas>

function drawOnCanvas() {
   var ctxElement = document.getElementById(“canvasTest”);
   var ctx = ctxElement.getContext(“2d”);
   if (ctx != null) {
       ctx.fillStyle = "#F00";
        ctx.fillRect(0,0, ctx.canvas.width, ctx.canvas.height);
   }
}
HTML5
HTML5
Diario Lezioni
        LEZIONE 06

 Mobile Touch Development
           HTML5
            CSS3
         Javascript
CSS3
CSS3
CSS3
            Work in Progress

http://www.w3.org/Style/CSS/current-work
CSS3
Divisione in più moduli

     alcuni sono:

    The Box Model
 Multi-Column Layout
Background and Borders
     Lists Module
      Text Effects
        ………
CSS3
                     Prefissi Vendor

fino a quando CSS3 non raggiungerà il “recommended status”
   ogni browser vendor può implementare le sue proprietà

  border-radius: 3px;
  -webkit-border-radius: 3px; (WebKit-based Browser)
  -moz-border-radius: 3px; (Gecko-based Browser)
CSS3
             Snelliscono il Design

es: bordi arrotondati senza immagini aggiuntive

      alcune delle proprietà più utili sono
CSS3
        Border Radious

-webkit-border-radius: <length>;
CSS3
CSS3
                   Gradient

-webkit-gradient ( <gradient-line> <color-stop1>
        <color-stop2> <color-stopN> );
CSS3
CSS3
    Gradient: Caso d’Uso “The Store”

-webkit-gradient(linear, 0% 0%, 0% 100%,
   from(#cdd5df),
   color-stop(3%, #b0bccd),
   color-stop(50%, #889bb3),
   color-stop(51%, #8195af),
   color-stop(97%, #6d84a2),
   to(#2d3642));
CSS3
CSS3
                      Box Shadow

-webkit-box-shadow: <offset-x> <offeset-y> <blur radius>
                       <color>;
CSS3
CSS3
                      Text Shadow

-webkit-text-shadow: <offset-x> <offeset-y> <blur radius>
                        <color>;
CSS3
CSS3
                   Transition

-webkit-transition: <property> <time> <function>;
CSS3
CSS3
                       Transform

-webkit-transition: <transform function> <type of effect>;
CSS3
Diario Lezioni
        LEZIONE 06

 Mobile Touch Development
           HTML5
            CSS3
         Javascript
Javascript

 Javascript NON é Java
Javascript

JAVASCRIPT
  NON E’
   JAVA
Javascript
Javascript
Javascript
                     Reference

https://developer.mozilla.org/en/JavaScript/Reference
Javascript
         No General-Purpose Language

  nato per interagire e manipolare pagine web
            intenzionalmente limitato

es: no accesso a filesystem, database o hardware
Javascript
          Client-Side Scripting Language

     al contrario di altri linguaggi di scripting
Javascript lavora all’interno di un altra applicazione

               Browser: Mobile Safari
Javascript
Javascript
          Client-Side Scripting Language

al contrario di altri linguaggi di scripting (es: php)
        Javascript é interpretato client-side
Javascript
Javascript
        Client-Side Scripting Language

          esiste concetto di oggetto
         non esiste concetto di classe

             debolmente tipizzato
(es: no necessario definire tipo di una variabile)
Javascript
                Linguaggio Interpretato

motore dell’interprete Javascript ha un ruolo dominante
ottimizzare l’interprete migliora di molto le prestazioni
Javascript
         Struttura Linguaggio

      implementa concetti tra cui:
tipo di dato (primitivo e non-primitivo)
                variabile
      statement condizionali/loop
                operatori
                funzione
                 oggetto
Javascript




variabili    proprietà
Javascript
  Come Interagisce con la Pagina Web?

  interagendo con l’oggetto window
messo a disposizione (creati) dal browser

            “window object”

      BOM (Browser Object Model)
Javascript
                                   window object



location object   history object    document object   navigator object   screen object




                  forms object       images object        links object
Javascript
                                   window object



location object   history object    document object   navigator object   screen object




                  forms object       images object        links object
Javascript
Javascript
Javascript
Javascript
Esercitazione
 Utilizzare Guida* di Riferimento
   del Framework e Javascript

1. Implementare le Funzioni Specifiche
2. Implementare la Logica della Dinamica




* versione online e/o formato elettronico
PROSSIMA LEZIONE
            LEGGERE

    Native-Like iOS Interface
  Interazione Servizi Nativi iOS

Contenu connexe

Tendances

MEAN: il nuovo stack di sviluppo per il futuro del web
MEAN: il nuovo stack di sviluppo per il futuro del webMEAN: il nuovo stack di sviluppo per il futuro del web
MEAN: il nuovo stack di sviluppo per il futuro del webEugenio Minardi
 
Cert03 70-486 developing asp.net mvc 4 web applications
Cert03   70-486 developing asp.net mvc 4 web applicationsCert03   70-486 developing asp.net mvc 4 web applications
Cert03 70-486 developing asp.net mvc 4 web applicationsDotNetCampus
 
Asp.net 4 Community Tour VS2010
Asp.net 4 Community Tour VS2010Asp.net 4 Community Tour VS2010
Asp.net 4 Community Tour VS2010Fabrizio Bernabei
 
Niccolò Becchi: Introduzione a GWT
Niccolò Becchi: Introduzione a GWTNiccolò Becchi: Introduzione a GWT
Niccolò Becchi: Introduzione a GWTfirenze-gtug
 
Antica presentazione AJAX
Antica presentazione AJAXAntica presentazione AJAX
Antica presentazione AJAXTommaso Torti
 
Presentazione Corso - Parte 3
Presentazione Corso - Parte 3Presentazione Corso - Parte 3
Presentazione Corso - Parte 3Giorgio Carpoca
 
Drupal Day 2012 - DRUPAL 8: I CAMBIAMENTI CHE CI ASPETTANO
Drupal Day 2012 - DRUPAL 8:  I CAMBIAMENTI CHE CI ASPETTANODrupal Day 2012 - DRUPAL 8:  I CAMBIAMENTI CHE CI ASPETTANO
Drupal Day 2012 - DRUPAL 8: I CAMBIAMENTI CHE CI ASPETTANODrupalDay
 
E suap - tecnologie client
E suap - tecnologie client E suap - tecnologie client
E suap - tecnologie client Sabino Labarile
 
Tech Webinar: Advanced AngularJS, tecniche avanzate per padroneggiare il fram...
Tech Webinar: Advanced AngularJS, tecniche avanzate per padroneggiare il fram...Tech Webinar: Advanced AngularJS, tecniche avanzate per padroneggiare il fram...
Tech Webinar: Advanced AngularJS, tecniche avanzate per padroneggiare il fram...Codemotion
 
Hands on MVC - Mastering the Web
Hands on MVC - Mastering the WebHands on MVC - Mastering the Web
Hands on MVC - Mastering the WebClaudio Gandelli
 
REST API fantastiche e dove trovarle
REST API fantastiche e dove trovarleREST API fantastiche e dove trovarle
REST API fantastiche e dove trovarleMarco Breveglieri
 

Tendances (20)

MEAN: il nuovo stack di sviluppo per il futuro del web
MEAN: il nuovo stack di sviluppo per il futuro del webMEAN: il nuovo stack di sviluppo per il futuro del web
MEAN: il nuovo stack di sviluppo per il futuro del web
 
Html5
Html5Html5
Html5
 
Cert03 70-486 developing asp.net mvc 4 web applications
Cert03   70-486 developing asp.net mvc 4 web applicationsCert03   70-486 developing asp.net mvc 4 web applications
Cert03 70-486 developing asp.net mvc 4 web applications
 
AngularJS 2.0
AngularJS 2.0 AngularJS 2.0
AngularJS 2.0
 
Asp.net 4 Community Tour VS2010
Asp.net 4 Community Tour VS2010Asp.net 4 Community Tour VS2010
Asp.net 4 Community Tour VS2010
 
Niccolò Becchi: Introduzione a GWT
Niccolò Becchi: Introduzione a GWTNiccolò Becchi: Introduzione a GWT
Niccolò Becchi: Introduzione a GWT
 
Html5 - Un anno dopo
Html5 - Un anno dopoHtml5 - Un anno dopo
Html5 - Un anno dopo
 
Antica presentazione AJAX
Antica presentazione AJAXAntica presentazione AJAX
Antica presentazione AJAX
 
JavaScript
JavaScriptJavaScript
JavaScript
 
MVC and Struts 1
MVC and Struts 1MVC and Struts 1
MVC and Struts 1
 
Presentazione Corso - Parte 3
Presentazione Corso - Parte 3Presentazione Corso - Parte 3
Presentazione Corso - Parte 3
 
Angularjs
AngularjsAngularjs
Angularjs
 
Drupal Day 2012 - DRUPAL 8: I CAMBIAMENTI CHE CI ASPETTANO
Drupal Day 2012 - DRUPAL 8:  I CAMBIAMENTI CHE CI ASPETTANODrupal Day 2012 - DRUPAL 8:  I CAMBIAMENTI CHE CI ASPETTANO
Drupal Day 2012 - DRUPAL 8: I CAMBIAMENTI CHE CI ASPETTANO
 
E suap - tecnologie client
E suap - tecnologie client E suap - tecnologie client
E suap - tecnologie client
 
Tech Webinar: Advanced AngularJS, tecniche avanzate per padroneggiare il fram...
Tech Webinar: Advanced AngularJS, tecniche avanzate per padroneggiare il fram...Tech Webinar: Advanced AngularJS, tecniche avanzate per padroneggiare il fram...
Tech Webinar: Advanced AngularJS, tecniche avanzate per padroneggiare il fram...
 
Hands on MVC - Mastering the Web
Hands on MVC - Mastering the WebHands on MVC - Mastering the Web
Hands on MVC - Mastering the Web
 
Novità di Asp.Net 4.0
Novità di Asp.Net 4.0Novità di Asp.Net 4.0
Novità di Asp.Net 4.0
 
AngularJS-Intro
AngularJS-IntroAngularJS-Intro
AngularJS-Intro
 
Yagwto
YagwtoYagwto
Yagwto
 
REST API fantastiche e dove trovarle
REST API fantastiche e dove trovarleREST API fantastiche e dove trovarle
REST API fantastiche e dove trovarle
 

En vedette

10 Consells sobre seguretat i Internet per a famílies i escoles
10 Consells sobre seguretat i Internet per a famílies i escoles10 Consells sobre seguretat i Internet per a famílies i escoles
10 Consells sobre seguretat i Internet per a famílies i escoleseducolab
 
Power analisi escriptura infant
Power analisi escriptura infantPower analisi escriptura infant
Power analisi escriptura infantLaura Bazán
 
Metabuscadores
MetabuscadoresMetabuscadores
MetabuscadoresTavo Edg
 
Propostes per una fiscalitat progressiva ERC
Propostes per una fiscalitat progressiva ERCPropostes per una fiscalitat progressiva ERC
Propostes per una fiscalitat progressiva ERCperearagones
 
dmr acc 26 test
dmr acc 26 testdmr acc 26 test
dmr acc 26 testdmracc26
 
Entrevista a Justin Bieber
Entrevista a Justin BieberEntrevista a Justin Bieber
Entrevista a Justin BieberGildaJohns
 
Presentacio google docs
Presentacio google docsPresentacio google docs
Presentacio google docsRogerMas
 
Actividad 1: "Un paseo por el mundo"
Actividad 1: "Un paseo por el mundo"Actividad 1: "Un paseo por el mundo"
Actividad 1: "Un paseo por el mundo"AAACJS
 

En vedette (20)

10 Consells sobre seguretat i Internet per a famílies i escoles
10 Consells sobre seguretat i Internet per a famílies i escoles10 Consells sobre seguretat i Internet per a famílies i escoles
10 Consells sobre seguretat i Internet per a famílies i escoles
 
Horoscopo chino
Horoscopo chinoHoroscopo chino
Horoscopo chino
 
Kristendom
KristendomKristendom
Kristendom
 
Rhs absolute l
Rhs absolute lRhs absolute l
Rhs absolute l
 
Session 56_2 Magnus Swahn
Session 56_2  Magnus SwahnSession 56_2  Magnus Swahn
Session 56_2 Magnus Swahn
 
Presentatie Asteroiden
Presentatie AsteroidenPresentatie Asteroiden
Presentatie Asteroiden
 
Power analisi escriptura infant
Power analisi escriptura infantPower analisi escriptura infant
Power analisi escriptura infant
 
Metabuscadores
MetabuscadoresMetabuscadores
Metabuscadores
 
Propostes per una fiscalitat progressiva ERC
Propostes per una fiscalitat progressiva ERCPropostes per una fiscalitat progressiva ERC
Propostes per una fiscalitat progressiva ERC
 
dmr acc 26 test
dmr acc 26 testdmr acc 26 test
dmr acc 26 test
 
Simulacro
SimulacroSimulacro
Simulacro
 
Limpfer
LimpferLimpfer
Limpfer
 
Entrevista a Justin Bieber
Entrevista a Justin BieberEntrevista a Justin Bieber
Entrevista a Justin Bieber
 
Taller paper
Taller paperTaller paper
Taller paper
 
Presentacio google docs
Presentacio google docsPresentacio google docs
Presentacio google docs
 
Mushroom
MushroomMushroom
Mushroom
 
El agua fuente de vida
El agua fuente de vidaEl agua fuente de vida
El agua fuente de vida
 
Actividad 1: "Un paseo por el mundo"
Actividad 1: "Un paseo por el mundo"Actividad 1: "Un paseo por el mundo"
Actividad 1: "Un paseo por el mundo"
 
Nota d'actualitat econòmica - novembre 2011
Nota d'actualitat econòmica  - novembre 2011Nota d'actualitat econòmica  - novembre 2011
Nota d'actualitat econòmica - novembre 2011
 
Presentación
PresentaciónPresentación
Presentación
 

Similaire à Corso WebApp iOS - Lezione 06: Web Development for iOS Devices

Html5 e css3 nuovi strumenti per un nuovo web
Html5 e css3 nuovi strumenti per un nuovo webHtml5 e css3 nuovi strumenti per un nuovo web
Html5 e css3 nuovi strumenti per un nuovo webMassimo Bonanni
 
jQuery - 1 | WebMaster & WebDesigner
jQuery - 1 | WebMaster & WebDesignerjQuery - 1 | WebMaster & WebDesigner
jQuery - 1 | WebMaster & WebDesignerMatteo Magni
 
jQuery - 1 | WebMaster & WebDesigner
jQuery - 1 | WebMaster & WebDesignerjQuery - 1 | WebMaster & WebDesigner
jQuery - 1 | WebMaster & WebDesignerMatteo Magni
 
Alessandro Forte - ASP.Net 4.0
Alessandro Forte - ASP.Net 4.0Alessandro Forte - ASP.Net 4.0
Alessandro Forte - ASP.Net 4.0Alessandro Forte
 
Le novita di visual studio 2012
Le novita di visual studio 2012Le novita di visual studio 2012
Le novita di visual studio 2012Crismer La Pignola
 
Applicazioni HTML5 Superveloci - Salvatore Romeo
Applicazioni HTML5 Superveloci - Salvatore RomeoApplicazioni HTML5 Superveloci - Salvatore Romeo
Applicazioni HTML5 Superveloci - Salvatore Romeomarcocasario
 
Blazor: are we ready for the launch?
Blazor: are we ready for the launch?Blazor: are we ready for the launch?
Blazor: are we ready for the launch?Andrea Agnoletto
 
Esposizione RIA
Esposizione RIAEsposizione RIA
Esposizione RIAdiodorato
 
Blazor with .net 5 - di Gerardo Greco
Blazor with .net 5 - di Gerardo GrecoBlazor with .net 5 - di Gerardo Greco
Blazor with .net 5 - di Gerardo GrecoGiuneco S.r.l
 
Javascript - 1 | WebMaster & WebDesigner
Javascript - 1 | WebMaster & WebDesignerJavascript - 1 | WebMaster & WebDesigner
Javascript - 1 | WebMaster & WebDesignerMatteo Magni
 
Best practices per lo sviluppo Frontend
Best practices per lo sviluppo FrontendBest practices per lo sviluppo Frontend
Best practices per lo sviluppo FrontendCristiano Rastelli
 
Sharepoint 2010 JQuery
Sharepoint 2010  JQuerySharepoint 2010  JQuery
Sharepoint 2010 JQueryDecatec
 

Similaire à Corso WebApp iOS - Lezione 06: Web Development for iOS Devices (20)

HTML5
HTML5HTML5
HTML5
 
Mobile UI Design
Mobile UI DesignMobile UI Design
Mobile UI Design
 
Html5 e css3 nuovi strumenti per un nuovo web
Html5 e css3 nuovi strumenti per un nuovo webHtml5 e css3 nuovi strumenti per un nuovo web
Html5 e css3 nuovi strumenti per un nuovo web
 
Ddive Xpage852
Ddive Xpage852Ddive Xpage852
Ddive Xpage852
 
jQuery - 1 | WebMaster & WebDesigner
jQuery - 1 | WebMaster & WebDesignerjQuery - 1 | WebMaster & WebDesigner
jQuery - 1 | WebMaster & WebDesigner
 
jQuery - 1 | WebMaster & WebDesigner
jQuery - 1 | WebMaster & WebDesignerjQuery - 1 | WebMaster & WebDesigner
jQuery - 1 | WebMaster & WebDesigner
 
Domino e HTML5, #dd13
Domino e HTML5, #dd13Domino e HTML5, #dd13
Domino e HTML5, #dd13
 
Alessandro Forte - ASP.Net 4.0
Alessandro Forte - ASP.Net 4.0Alessandro Forte - ASP.Net 4.0
Alessandro Forte - ASP.Net 4.0
 
Le novita di visual studio 2012
Le novita di visual studio 2012Le novita di visual studio 2012
Le novita di visual studio 2012
 
Applicazioni HTML5 Superveloci - Salvatore Romeo
Applicazioni HTML5 Superveloci - Salvatore RomeoApplicazioni HTML5 Superveloci - Salvatore Romeo
Applicazioni HTML5 Superveloci - Salvatore Romeo
 
DDive - 8.5.2 Xpages - L'evoluzione continua
DDive - 8.5.2 Xpages - L'evoluzione continuaDDive - 8.5.2 Xpages - L'evoluzione continua
DDive - 8.5.2 Xpages - L'evoluzione continua
 
Html5
Html5Html5
Html5
 
Html5 e PHP
Html5 e PHPHtml5 e PHP
Html5 e PHP
 
Blazor: are we ready for the launch?
Blazor: are we ready for the launch?Blazor: are we ready for the launch?
Blazor: are we ready for the launch?
 
Esposizione RIA
Esposizione RIAEsposizione RIA
Esposizione RIA
 
Blazor with .net 5 - di Gerardo Greco
Blazor with .net 5 - di Gerardo GrecoBlazor with .net 5 - di Gerardo Greco
Blazor with .net 5 - di Gerardo Greco
 
Javascript - 1 | WebMaster & WebDesigner
Javascript - 1 | WebMaster & WebDesignerJavascript - 1 | WebMaster & WebDesigner
Javascript - 1 | WebMaster & WebDesigner
 
Dojo nuovo look alle vostre applicazioni web Domino
Dojo nuovo look alle vostre applicazioni web DominoDojo nuovo look alle vostre applicazioni web Domino
Dojo nuovo look alle vostre applicazioni web Domino
 
Best practices per lo sviluppo Frontend
Best practices per lo sviluppo FrontendBest practices per lo sviluppo Frontend
Best practices per lo sviluppo Frontend
 
Sharepoint 2010 JQuery
Sharepoint 2010  JQuerySharepoint 2010  JQuery
Sharepoint 2010 JQuery
 

Plus de Andrea Picchi

The New Retail Paradigm: How the Psychological Foundation of Consumer Behavio...
The New Retail Paradigm: How the Psychological Foundation of Consumer Behavio...The New Retail Paradigm: How the Psychological Foundation of Consumer Behavio...
The New Retail Paradigm: How the Psychological Foundation of Consumer Behavio...Andrea Picchi
 
The 3 Dimensions of Design: A Model to scale the Human-Centered Problem-Solvi...
The 3 Dimensions of Design: A Model to scale the Human-Centered Problem-Solvi...The 3 Dimensions of Design: A Model to scale the Human-Centered Problem-Solvi...
The 3 Dimensions of Design: A Model to scale the Human-Centered Problem-Solvi...Andrea Picchi
 
The Evolution of Design Thinking: Shifting from a Product and Service to a Re...
The Evolution of Design Thinking: Shifting from a Product and Service to a Re...The Evolution of Design Thinking: Shifting from a Product and Service to a Re...
The Evolution of Design Thinking: Shifting from a Product and Service to a Re...Andrea Picchi
 
Continuous Innovation: Going beyond Agile, Lean, and Design Thinking toward a...
Continuous Innovation: Going beyond Agile, Lean, and Design Thinking toward a...Continuous Innovation: Going beyond Agile, Lean, and Design Thinking toward a...
Continuous Innovation: Going beyond Agile, Lean, and Design Thinking toward a...Andrea Picchi
 
The 3 Dimensions of Design: Scaling a Human-Centered Practice across the Orga...
The 3 Dimensions of Design: Scaling a Human-Centered Practice across the Orga...The 3 Dimensions of Design: Scaling a Human-Centered Practice across the Orga...
The 3 Dimensions of Design: Scaling a Human-Centered Practice across the Orga...Andrea Picchi
 
Beyond Design Thinking the 3 Dimension of a Design-Driven Company.
Beyond Design Thinking the 3 Dimension of a Design-Driven Company.Beyond Design Thinking the 3 Dimension of a Design-Driven Company.
Beyond Design Thinking the 3 Dimension of a Design-Driven Company.Andrea Picchi
 
Embedding Design Thinking at Sony to accomplish Business Strategy
Embedding Design Thinking at Sony to accomplish Business StrategyEmbedding Design Thinking at Sony to accomplish Business Strategy
Embedding Design Thinking at Sony to accomplish Business StrategyAndrea Picchi
 
How a Design-Driven Company can Multiply its Business Value
How a Design-Driven Company can Multiply its Business ValueHow a Design-Driven Company can Multiply its Business Value
How a Design-Driven Company can Multiply its Business ValueAndrea Picchi
 
The Evolution of Business Strategy: How to use Design Thinking to uncover hid...
The Evolution of Business Strategy: How to use Design Thinking to uncover hid...The Evolution of Business Strategy: How to use Design Thinking to uncover hid...
The Evolution of Business Strategy: How to use Design Thinking to uncover hid...Andrea Picchi
 
Mobile and Wearable Technologies in the Travel Industry
Mobile and Wearable Technologies in the Travel IndustryMobile and Wearable Technologies in the Travel Industry
Mobile and Wearable Technologies in the Travel IndustryAndrea Picchi
 
A Cognitive Approach to Ecosystem Design
A Cognitive Approach to Ecosystem DesignA Cognitive Approach to Ecosystem Design
A Cognitive Approach to Ecosystem DesignAndrea Picchi
 
Introduction to Agile Scrum
Introduction to Agile ScrumIntroduction to Agile Scrum
Introduction to Agile ScrumAndrea Picchi
 
Designing the User Experience
Designing the User ExperienceDesigning the User Experience
Designing the User ExperienceAndrea Picchi
 
Variabili Cognitive dell'Esperienza Utente
Variabili Cognitive dell'Esperienza UtenteVariabili Cognitive dell'Esperienza Utente
Variabili Cognitive dell'Esperienza UtenteAndrea Picchi
 
Ottimizzazione Cognitiva di Contesti Mobile Touch
Ottimizzazione Cognitiva di Contesti Mobile TouchOttimizzazione Cognitiva di Contesti Mobile Touch
Ottimizzazione Cognitiva di Contesti Mobile TouchAndrea Picchi
 
Analisi e Tecniche di Design Cognitivo per Contesti Mobile Touch
Analisi e Tecniche di Design Cognitivo per Contesti Mobile TouchAnalisi e Tecniche di Design Cognitivo per Contesti Mobile Touch
Analisi e Tecniche di Design Cognitivo per Contesti Mobile TouchAndrea Picchi
 
Ottimizzazione e Analisi Cognitiva di Contesti Mobile Touch
Ottimizzazione e Analisi Cognitiva di Contesti Mobile TouchOttimizzazione e Analisi Cognitiva di Contesti Mobile Touch
Ottimizzazione e Analisi Cognitiva di Contesti Mobile TouchAndrea Picchi
 
Corso WebApp iOS - Lezione 09: Testing iOS WebApp
Corso WebApp iOS - Lezione 09: Testing iOS WebAppCorso WebApp iOS - Lezione 09: Testing iOS WebApp
Corso WebApp iOS - Lezione 09: Testing iOS WebAppAndrea Picchi
 
Corso WebApp iOS - Lezione 08: Optimize iOS WebApp
Corso WebApp iOS - Lezione 08: Optimize iOS WebAppCorso WebApp iOS - Lezione 08: Optimize iOS WebApp
Corso WebApp iOS - Lezione 08: Optimize iOS WebAppAndrea Picchi
 
Corso WebApp iOS - Lezione 07: iOS WebApp Anatomy
Corso WebApp iOS - Lezione 07: iOS WebApp AnatomyCorso WebApp iOS - Lezione 07: iOS WebApp Anatomy
Corso WebApp iOS - Lezione 07: iOS WebApp AnatomyAndrea Picchi
 

Plus de Andrea Picchi (20)

The New Retail Paradigm: How the Psychological Foundation of Consumer Behavio...
The New Retail Paradigm: How the Psychological Foundation of Consumer Behavio...The New Retail Paradigm: How the Psychological Foundation of Consumer Behavio...
The New Retail Paradigm: How the Psychological Foundation of Consumer Behavio...
 
The 3 Dimensions of Design: A Model to scale the Human-Centered Problem-Solvi...
The 3 Dimensions of Design: A Model to scale the Human-Centered Problem-Solvi...The 3 Dimensions of Design: A Model to scale the Human-Centered Problem-Solvi...
The 3 Dimensions of Design: A Model to scale the Human-Centered Problem-Solvi...
 
The Evolution of Design Thinking: Shifting from a Product and Service to a Re...
The Evolution of Design Thinking: Shifting from a Product and Service to a Re...The Evolution of Design Thinking: Shifting from a Product and Service to a Re...
The Evolution of Design Thinking: Shifting from a Product and Service to a Re...
 
Continuous Innovation: Going beyond Agile, Lean, and Design Thinking toward a...
Continuous Innovation: Going beyond Agile, Lean, and Design Thinking toward a...Continuous Innovation: Going beyond Agile, Lean, and Design Thinking toward a...
Continuous Innovation: Going beyond Agile, Lean, and Design Thinking toward a...
 
The 3 Dimensions of Design: Scaling a Human-Centered Practice across the Orga...
The 3 Dimensions of Design: Scaling a Human-Centered Practice across the Orga...The 3 Dimensions of Design: Scaling a Human-Centered Practice across the Orga...
The 3 Dimensions of Design: Scaling a Human-Centered Practice across the Orga...
 
Beyond Design Thinking the 3 Dimension of a Design-Driven Company.
Beyond Design Thinking the 3 Dimension of a Design-Driven Company.Beyond Design Thinking the 3 Dimension of a Design-Driven Company.
Beyond Design Thinking the 3 Dimension of a Design-Driven Company.
 
Embedding Design Thinking at Sony to accomplish Business Strategy
Embedding Design Thinking at Sony to accomplish Business StrategyEmbedding Design Thinking at Sony to accomplish Business Strategy
Embedding Design Thinking at Sony to accomplish Business Strategy
 
How a Design-Driven Company can Multiply its Business Value
How a Design-Driven Company can Multiply its Business ValueHow a Design-Driven Company can Multiply its Business Value
How a Design-Driven Company can Multiply its Business Value
 
The Evolution of Business Strategy: How to use Design Thinking to uncover hid...
The Evolution of Business Strategy: How to use Design Thinking to uncover hid...The Evolution of Business Strategy: How to use Design Thinking to uncover hid...
The Evolution of Business Strategy: How to use Design Thinking to uncover hid...
 
Mobile and Wearable Technologies in the Travel Industry
Mobile and Wearable Technologies in the Travel IndustryMobile and Wearable Technologies in the Travel Industry
Mobile and Wearable Technologies in the Travel Industry
 
A Cognitive Approach to Ecosystem Design
A Cognitive Approach to Ecosystem DesignA Cognitive Approach to Ecosystem Design
A Cognitive Approach to Ecosystem Design
 
Introduction to Agile Scrum
Introduction to Agile ScrumIntroduction to Agile Scrum
Introduction to Agile Scrum
 
Designing the User Experience
Designing the User ExperienceDesigning the User Experience
Designing the User Experience
 
Variabili Cognitive dell'Esperienza Utente
Variabili Cognitive dell'Esperienza UtenteVariabili Cognitive dell'Esperienza Utente
Variabili Cognitive dell'Esperienza Utente
 
Ottimizzazione Cognitiva di Contesti Mobile Touch
Ottimizzazione Cognitiva di Contesti Mobile TouchOttimizzazione Cognitiva di Contesti Mobile Touch
Ottimizzazione Cognitiva di Contesti Mobile Touch
 
Analisi e Tecniche di Design Cognitivo per Contesti Mobile Touch
Analisi e Tecniche di Design Cognitivo per Contesti Mobile TouchAnalisi e Tecniche di Design Cognitivo per Contesti Mobile Touch
Analisi e Tecniche di Design Cognitivo per Contesti Mobile Touch
 
Ottimizzazione e Analisi Cognitiva di Contesti Mobile Touch
Ottimizzazione e Analisi Cognitiva di Contesti Mobile TouchOttimizzazione e Analisi Cognitiva di Contesti Mobile Touch
Ottimizzazione e Analisi Cognitiva di Contesti Mobile Touch
 
Corso WebApp iOS - Lezione 09: Testing iOS WebApp
Corso WebApp iOS - Lezione 09: Testing iOS WebAppCorso WebApp iOS - Lezione 09: Testing iOS WebApp
Corso WebApp iOS - Lezione 09: Testing iOS WebApp
 
Corso WebApp iOS - Lezione 08: Optimize iOS WebApp
Corso WebApp iOS - Lezione 08: Optimize iOS WebAppCorso WebApp iOS - Lezione 08: Optimize iOS WebApp
Corso WebApp iOS - Lezione 08: Optimize iOS WebApp
 
Corso WebApp iOS - Lezione 07: iOS WebApp Anatomy
Corso WebApp iOS - Lezione 07: iOS WebApp AnatomyCorso WebApp iOS - Lezione 07: iOS WebApp Anatomy
Corso WebApp iOS - Lezione 07: iOS WebApp Anatomy
 

Corso WebApp iOS - Lezione 06: Web Development for iOS Devices

  • 1. Corso WebApp iOS “Web Dev for iOS Devices” Lezione 06/10 ”..you’ve got everything you need if you know how to write apps using.. ..web standards..” Steve Jobs Apple Inc. Co-Founder.
  • 2. Chapter 03 Web Development for iOS Devices Chapter 07 Web Standards for WebKit http://www.apress.com/9781430232469
  • 3. Diario Lezioni LEZIONE 06 Mobile Touch Development HTML5 CSS3 Javascript
  • 7. HTML5 Working in Progress http://dev.w3.org/html5/spec/
  • 8. HTML5 Ridefinizione Tag <i> <b> <em> <strong>
  • 9. HTML5 tag italic: <i> testo in formato italico senza riferire nessuna particolare enfasi o importanza al testo stesso
  • 10. HTML5 tag bold: <b> testo in formato bold senza riferire nessuna particolare enfasi o importanza al testo stesso
  • 11. HTML5 tag emphatisis: <em> testo enfatizzato per uno specifico motivo
  • 12. HTML5 tag strong emphasis: <strong> testo molto enfatizzato per uno specifico motivo
  • 13. HTML5 Nuova Semantica … <aside> … <footer> <header> … <nav> …
  • 15. HTML5 Nuove Funzionalità Audio/Video Canvas Application Caches Geolocation Web Workers
  • 16. HTML5 tag video: <video> <video width="100%" height="148" src="videos/iphone_facetime.mp4" controls poster="pics/poster-facetime.jpg"> </video>
  • 17. HTML5 tag video: <video> alcuni attributi sono ignorati da iOS (iPhone) autoplay controls
  • 18. HTML5 tag video: <video> altri attributi hanno comportamenti standard su iOS (iPad) controls (full-screen playback toggle)
  • 19. HTML5 tag video: <video> attributo preload (iOS): auto = no preload (desktop) auto = si preload
  • 20. HTML5 tag video: <video> <video> <source src="videos/iphone_facetime.mp4" media=”(max-device-width:320px)”></source> <source src="videos/ipad_facetime.mp4" media=”(min-device-width:768px)”></source> </video>
  • 21. HTML5 tag video: <video> formati video H.264 (up to 720p, 30fps) MPEG-4 (up to 2.5 Mbps, 640x480px) M-JPG (up to 35 Mbps, 1280x720px)
  • 23. HTML5
  • 24. HTML5 tag audio: <audio> <audio src="audioName.mp3"></audio>
  • 25. HTML5 tag audio: <audio> alcuni formati audio AAC (8-320Kbps) HE-AAC (8-320Kbps) MP3 (8-320Kbps)
  • 26. HTML5 tag canvas: <canvas> permette di ottenere effetti grafici avanzati uso di immagini dinamiche ridurre latenze di caricamento downside: GPU overhead
  • 27. HTML5 tag canvas: <canvas> e’ un API Javascript che permette allo sviluppatore di codificare delle operazioni di disegno basate sul singolo pixel (contrapposti ai vettori SVG) possono inoltre essere usati tutti gli assets grafici compatibili con un browser (png, jpg, …)
  • 28. HTML5 tag canvas: <canvas> l’elemento <canvas> delimita dove Javascript andrà a disegnare on-the-fly quello che viene disegnato diviene parte del DOM e viene “dimenticato” dal Javascript Engine
  • 29. HTML5 tag canvas: <canvas> Canvas Javascript API comprendono: 2D API 3D API
  • 30. HTML5
  • 31. HTML5 tag canvas: <canvas> <canvas id=”canvasTest” width=”320” height=”200”> Fallback Content </canvas>
  • 32. HTML5 tag canvas: <canvas> disegnare usando <canvas> richiede: recuperare un riferimento al canvas ricevere il “drawing context” dall’elemento canvas se si riceve il “drawing context”: disegnare
  • 33. HTML5 tag canvas: <canvas> function drawOnCanvas() { var ctxElement = document.getElementById(“canvasTest”); var ctx = ctxElement.getContext(“2d”); if (ctx != null) { // we can draw using Canvas 2D API } }
  • 34. HTML5 tag canvas: <canvas> function drawOnCanvas() { var ctxElement = document.getElementById(“canvasTest”); var ctx = ctxElement.getContext(“2d”); if (ctx != null) { // we can draw using Canvas 2D API } }
  • 35. HTML5 tag canvas: <canvas> function drawOnCanvas() { var ctxElement = document.getElementById(“canvasTest”); var ctx = ctxElement.getContext(“2d”); if (ctx != null) { // we can draw using Canvas 2D API } }
  • 37. HTML5 tag canvas: <canvas> <canvas id=”canvasTest” width=”320” height=”200”> Please Enable Javascript </canvas>
  • 38. HTML5 tag canvas: <canvas> function drawOnCanvas() { var ctxElement = document.getElementById(“canvasTest”); var ctx = ctxElement.getContext(“2d”); if (ctx != null) { ctx.fillStyle = "#F00"; ctx.fillRect(0,0, ctx.canvas.width, ctx.canvas.height); } }
  • 39. HTML5
  • 40. HTML5
  • 41. Diario Lezioni LEZIONE 06 Mobile Touch Development HTML5 CSS3 Javascript
  • 42. CSS3
  • 43. CSS3
  • 44. CSS3 Work in Progress http://www.w3.org/Style/CSS/current-work
  • 45. CSS3 Divisione in più moduli alcuni sono: The Box Model Multi-Column Layout Background and Borders Lists Module Text Effects ………
  • 46. CSS3 Prefissi Vendor fino a quando CSS3 non raggiungerà il “recommended status” ogni browser vendor può implementare le sue proprietà border-radius: 3px; -webkit-border-radius: 3px; (WebKit-based Browser) -moz-border-radius: 3px; (Gecko-based Browser)
  • 47. CSS3 Snelliscono il Design es: bordi arrotondati senza immagini aggiuntive alcune delle proprietà più utili sono
  • 48. CSS3 Border Radious -webkit-border-radius: <length>;
  • 49. CSS3
  • 50. CSS3 Gradient -webkit-gradient ( <gradient-line> <color-stop1> <color-stop2> <color-stopN> );
  • 51. CSS3
  • 52. CSS3 Gradient: Caso d’Uso “The Store” -webkit-gradient(linear, 0% 0%, 0% 100%, from(#cdd5df), color-stop(3%, #b0bccd), color-stop(50%, #889bb3), color-stop(51%, #8195af), color-stop(97%, #6d84a2), to(#2d3642));
  • 53. CSS3
  • 54. CSS3 Box Shadow -webkit-box-shadow: <offset-x> <offeset-y> <blur radius> <color>;
  • 55. CSS3
  • 56. CSS3 Text Shadow -webkit-text-shadow: <offset-x> <offeset-y> <blur radius> <color>;
  • 57. CSS3
  • 58. CSS3 Transition -webkit-transition: <property> <time> <function>;
  • 59. CSS3
  • 60. CSS3 Transform -webkit-transition: <transform function> <type of effect>;
  • 61. CSS3
  • 62. Diario Lezioni LEZIONE 06 Mobile Touch Development HTML5 CSS3 Javascript
  • 67. Javascript Reference https://developer.mozilla.org/en/JavaScript/Reference
  • 68. Javascript No General-Purpose Language nato per interagire e manipolare pagine web intenzionalmente limitato es: no accesso a filesystem, database o hardware
  • 69. Javascript Client-Side Scripting Language al contrario di altri linguaggi di scripting Javascript lavora all’interno di un altra applicazione Browser: Mobile Safari
  • 71. Javascript Client-Side Scripting Language al contrario di altri linguaggi di scripting (es: php) Javascript é interpretato client-side
  • 73. Javascript Client-Side Scripting Language esiste concetto di oggetto non esiste concetto di classe debolmente tipizzato (es: no necessario definire tipo di una variabile)
  • 74. Javascript Linguaggio Interpretato motore dell’interprete Javascript ha un ruolo dominante ottimizzare l’interprete migliora di molto le prestazioni
  • 75. Javascript Struttura Linguaggio implementa concetti tra cui: tipo di dato (primitivo e non-primitivo) variabile statement condizionali/loop operatori funzione oggetto
  • 76. Javascript variabili proprietà
  • 77. Javascript Come Interagisce con la Pagina Web? interagendo con l’oggetto window messo a disposizione (creati) dal browser “window object” BOM (Browser Object Model)
  • 78. Javascript window object location object history object document object navigator object screen object forms object images object links object
  • 79. Javascript window object location object history object document object navigator object screen object forms object images object links object
  • 84. Esercitazione Utilizzare Guida* di Riferimento del Framework e Javascript 1. Implementare le Funzioni Specifiche 2. Implementare la Logica della Dinamica * versione online e/o formato elettronico
  • 85. PROSSIMA LEZIONE LEGGERE Native-Like iOS Interface Interazione Servizi Nativi iOS