SlideShare uma empresa Scribd logo
1 de 100
Baixar para ler offline
2011.04.02
•               Hirokazu Okawa
    twitter : @okyawa



•
•




    •
        CentOS
        Apache
        PostgreSQL
        PHP
PC
WebKit
WebKit



•

    HTML
WebKit


• Safari (iPhone Mobile Safari)

• Chrome (Android                )

• BlackBerry (OS6            )
• Web
• iPhone   Web
•
        980

•

    •         1500
•         (    )




    viewport
<meta name="viewport" width=”device-width;
initial-scale=1.0; maximum-scale=1.0; user-
scalable=no;" />

  • width                    (         )
    default   980
    device-width

  • initial-scale                1.0

  • maximum-scale

  • user-scalable
                    yes/no
CSS
•




    body {
      -webkit-text-size-adjust: none;
    }
•
•


•
           Ajax

•
    HTML
• HTML


• JSON (JavaScript Object Notation)
HTML


•       HTML

    •   Javascript   DOM

    •            PHP
JSON
• PHP                JOSN
    →

•       Javascript

•                           DOM



•
DOM

• HTML

 (appendChild   , insertBefore   )

 • HTML
• Ajax



•
Ajax




Ajax          Ajax
• Cookie

• Web Storage

  ✴

  ✴
Cookie

•


    •


•                (4KB)
Web Storage

• HTML5        API

• Cookie

    • iPhone                5MB

• Cookie             key-value

•                      (※         JSON )
•


•

• Cookie
•       (   )



•

    •
WebStorage


  obj.setItem(key,value)
   ◦
• obj.getItem(key)
   ◦
• obj.removeItem(key)
   ◦
• obj.clear()
   ◦
• obj.key(n)
   ◦n      (0        )
• obj.length
   ◦
•

    •


    •
        obj.getItem(key)

•

    •
Chrome, Safari
Developer Tools   Resources   Local Strage   Session Strage




• key Ajax                            value    JSON
//
if (window.sessionStorage) {
    sessionStorage.clear();
}

//
if (window.sessionStorage) {
    var key = 'go=product-list&mode=line&id=4page=1';
    sessionStorage.setItem(key, jsonData);
    var obj = JSON.parse(jsonData);
    jQuery(obj).each(function(index, jsonElement) {
        // preload image
        new Image().src = jsonElement.photo.url;
    });
}
//
var key = 'go=product-list&mode=line&id=4page=1';
var parseStrageData = null;
if (window.sessionStorage) {
    var strageData = sessionStorage.getItem(key)
    if (key) {
        try {
           var parseStrageData = JSON.parse(strageData);
        } catch (e) {
           parseStrageData = null;
        }
    }
}

if (parseStrageData) {
    //
} else {
   // Ajax
}
•

    •
        GD   PING


    •
         80px
• <img src=”chair.jpg” width=”80” />




80px                            160px
•
• CSS max-width: 100%;
•


•
<li id="listbox_132">
   <a href="javascript:void(0);">
      <img id="thumbnail_132" class="thumbnail_btn" src="thumnail_product01.png">
   </a>
</li>


var mainPhoto = [];
mainPhoto[120] = 'product01.jpg';
mainPhoto[132] = 'product02.jpg';
mainPhoto[181] = 'product03.jpg';
mainPhoto[247] = 'product04.jpg';

jQuery('.thumbnail_btn').each(function(index, elem) {
  var num = elem.id.replace(/thumbnail_/,'');
  var mainImage = new Image();
  mainImage.onload = function() {
    //
      };
      mainImage.src = mainPhoto[num];
});
HTML       input      type


• tel
             iPhone
• number
• email      type

• url
• <input type="tel" />
• <input type="number" />
• <input type="email" />
URL




• <input type="url" />
• <input type=”text” placeholder="   " />
•

•       2

    →

•



•
var autoFitTextareaHeight = function (elem, keyCode, fit) {
  // backspace or delete or onblor
  if (keyCode === 8 || keyCode === 46 || fit) {
      elem.style.height = 'auto';
  }
  if (elem.offsetHeight < elem.scrollHeight) {
      elem.style.height = elem.scrollHeight + 'px';
  }
}

autoFitTextareaHeight(elem);
jQuery(elem).bind('keyup', function (event) {
    autoFitTextareaHeight(event.target, event.keyCode, false);
});
jQuery(elem).bind('blur', function (event) {
    autoFitTextareaHeight(event.target, event.keyCode, true);
});
• window.orientation

  •   0

  •   90

  •   -90

  •   180
• orientationchange

  • iPhone


  •
<body onorientationchange="alert('
        ');">



window.addEventListener('orientationchange', function () {
  alert('                    ');
}, false);
Android

   •   orientationchange




                 resize

window.addEventListener('resize', orientFunc, false);
• window.onresize            iPhone
              (maximum call stack size exceeded)



      • iPhone
var eventName = 'resize';
if (-1 < navigator.userAgent.indexOf('iPhone') || -1 <
navigator.userAgent.indexOf('iPod')) {
    eventName = 'orientationchange';
}
window.addEventListener(eventName, sampleFunc, false);
•

•


•
    IE
PC
iPhone

                            20px

• iPhone    GS              60px

 320px × 480px

                            356px
• iPhone
 640px × 960px
 (         320px × 480px)

                            44px
Android
• 320px × 480px
• 480px × 800px
• 480px × 854px
• 640px × 960px
• 960px × 480px

•
    320px
•
URL




  • URL
          (60px)



  •
URL


function hideUrlBar() {
  setTimeout(function () {
     if (scrollY < 60) {
         scrollTo(0, 1);
     }
  }, 1);
}
PC


• PC
<a href="tel:1-408-555-5555">1-408-555-5555</a>
•



               651-0096        651-0096


     •
                                meta

<meta name="format-detection" content="telephone=no"/>
YouTube

<a href="youtube:    ID">       </a>
<a href="http://www.youtube.com/v/     ID">      </a>
<a href="http://www.youtube.com/watch?v=      ID">      </a>

  •a
    YouTube

  • YouTube

       YouTube
<a href="maps:q=           ">     </a>
<a href="http://maps.google.com/maps?q=         ">       </a>
<a href="http://maps.google.co.jp/maps?q=           ">   </a>
<a href="http://maps.google.co.jp/maps?q=   ,   +          ">
    </a>
iPhone



• Mac

• iOS SDK
Android

• Android SDK

• Windows
 Mac OS X (intel)
 Linux (i386)

• Andorid
       Platform
[Ctrl]+[F12]

[Ctrl]+[F11]
Opera Mobile



• Opera Mobile emulator

•
Opera Mini

• Opera Mini Simulator

•

•
                  Opera




•                  Opera
BlackBerry

• BlackBerry Smartphone
    Simulators


• Windows XP 7
    Java JDK, Eclipse3.6

•
    Eclipse

    MDS Services Simulator Package
Windows Phone



• Windows Phone Developer Tools
• Windows Vista   Windows7
•
• CSS
PC
<link media="screen and (min-device-
width:481px)" rel="stylesheet" type="text/
css" href="pcsite.css" />

    iPhone
<link media="only screen and (max-
device-width:480px)"
href="smartphone.css" type="text/css"
rel="stylesheet" />
• iUi
• iWebKit
• Universal iPhone UI Kit
• jQTouch
  • WebKit

• jQueryMobile
  •
• Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_1_2 like Mac OS X; en-us) AppleWebKit/
  528.18 (KHTML, like Gecko) Version/4.0 Mobile/7D11 Safari/528.16

• Mozilla/5.0 (iPod; U; CPU iPhone OS 3_1_2 like Mac OS X; en-us) AppleWebKit/
  528.18 (KHTML, like Gecko) Version/4.0 Mobile/7D11 Safari/528.16

• Mozilla/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like
  Gecko) Version/3.0 Mobile/3A100a Safari/419.3

• Mozilla/5.0 (Linux; U; Android 1.6; ja-jp; SonyEricssonSO-01B Build/R1EA018)
  AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1

• Opera/9.80 (J2ME/MIDP; Opera Mini/5.0.0176/1150; U; ja) Presto/2.4.15

• BlackBerry9000/4.6.0.224 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/220
•                   •

    • touchstart        • gesturestart
    • touchend          • gesturechange
    • touchmove         • gestureend
    • touchcancel
•       mousewheel

    •
                         2



    •                2
               1
•

•

•

•
スマートフォンサイトの作成術 - 大川洋一

Mais conteúdo relacionado

Mais procurados

Building a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
Building a Simple Mobile-optimized Web App Using the jQuery Mobile FrameworkBuilding a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
Building a Simple Mobile-optimized Web App Using the jQuery Mobile FrameworkSt. Petersburg College
 
Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!Gill Cleeren
 
Real World Web components
Real World Web componentsReal World Web components
Real World Web componentsJarrod Overson
 
Wordpress Beyond Websites
Wordpress Beyond WebsitesWordpress Beyond Websites
Wordpress Beyond WebsitesScott Saunders
 
Real World Web Standards
Real World Web StandardsReal World Web Standards
Real World Web Standardsgleddy
 
State of jQuery June 2013 - Portland
State of jQuery June 2013 - PortlandState of jQuery June 2013 - Portland
State of jQuery June 2013 - Portlanddmethvin
 
Александр Кашеверов - Polymer
Александр Кашеверов - PolymerАлександр Кашеверов - Polymer
Александр Кашеверов - PolymerDataArt
 
HTML5 workshop, part 1
HTML5 workshop, part 1HTML5 workshop, part 1
HTML5 workshop, part 1Robert Nyman
 
Fake Your Way as a Mobile Developer Rockstar with PhoneGap
Fake Your Way as a Mobile Developer Rockstar with PhoneGapFake Your Way as a Mobile Developer Rockstar with PhoneGap
Fake Your Way as a Mobile Developer Rockstar with PhoneGapglen_a_smith
 
High Performance Mobile Web
High Performance Mobile WebHigh Performance Mobile Web
High Performance Mobile WebMorgan Cheng
 
High Performance Web - Full Stack Toronto
High Performance Web - Full Stack TorontoHigh Performance Web - Full Stack Toronto
High Performance Web - Full Stack TorontoMaximiliano Firtman
 
Progressively Enhancing WordPress Themes
Progressively Enhancing WordPress ThemesProgressively Enhancing WordPress Themes
Progressively Enhancing WordPress ThemesDigitally
 
jQuery Conference 2012 keynote
jQuery Conference 2012 keynotejQuery Conference 2012 keynote
jQuery Conference 2012 keynotedmethvin
 
Frontend Workflow
Frontend WorkflowFrontend Workflow
Frontend WorkflowDelphiCon
 
Does my DIV look big in this?
Does my DIV look big in this?Does my DIV look big in this?
Does my DIV look big in this?glen_a_smith
 
Performance as User Experience [AEADC 2018]
Performance as User Experience [AEADC 2018]Performance as User Experience [AEADC 2018]
Performance as User Experience [AEADC 2018]Aaron Gustafson
 
jQuery Conference Chicago - September 2014
jQuery Conference Chicago - September 2014jQuery Conference Chicago - September 2014
jQuery Conference Chicago - September 2014dmethvin
 
Top 10 HTML5 features
Top 10 HTML5 featuresTop 10 HTML5 features
Top 10 HTML5 featuresGill Cleeren
 
Windy cityrails performance_tuning
Windy cityrails performance_tuningWindy cityrails performance_tuning
Windy cityrails performance_tuningJohn McCaffrey
 
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...Daosheng Mu
 

Mais procurados (20)

Building a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
Building a Simple Mobile-optimized Web App Using the jQuery Mobile FrameworkBuilding a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
Building a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
 
Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!
 
Real World Web components
Real World Web componentsReal World Web components
Real World Web components
 
Wordpress Beyond Websites
Wordpress Beyond WebsitesWordpress Beyond Websites
Wordpress Beyond Websites
 
Real World Web Standards
Real World Web StandardsReal World Web Standards
Real World Web Standards
 
State of jQuery June 2013 - Portland
State of jQuery June 2013 - PortlandState of jQuery June 2013 - Portland
State of jQuery June 2013 - Portland
 
Александр Кашеверов - Polymer
Александр Кашеверов - PolymerАлександр Кашеверов - Polymer
Александр Кашеверов - Polymer
 
HTML5 workshop, part 1
HTML5 workshop, part 1HTML5 workshop, part 1
HTML5 workshop, part 1
 
Fake Your Way as a Mobile Developer Rockstar with PhoneGap
Fake Your Way as a Mobile Developer Rockstar with PhoneGapFake Your Way as a Mobile Developer Rockstar with PhoneGap
Fake Your Way as a Mobile Developer Rockstar with PhoneGap
 
High Performance Mobile Web
High Performance Mobile WebHigh Performance Mobile Web
High Performance Mobile Web
 
High Performance Web - Full Stack Toronto
High Performance Web - Full Stack TorontoHigh Performance Web - Full Stack Toronto
High Performance Web - Full Stack Toronto
 
Progressively Enhancing WordPress Themes
Progressively Enhancing WordPress ThemesProgressively Enhancing WordPress Themes
Progressively Enhancing WordPress Themes
 
jQuery Conference 2012 keynote
jQuery Conference 2012 keynotejQuery Conference 2012 keynote
jQuery Conference 2012 keynote
 
Frontend Workflow
Frontend WorkflowFrontend Workflow
Frontend Workflow
 
Does my DIV look big in this?
Does my DIV look big in this?Does my DIV look big in this?
Does my DIV look big in this?
 
Performance as User Experience [AEADC 2018]
Performance as User Experience [AEADC 2018]Performance as User Experience [AEADC 2018]
Performance as User Experience [AEADC 2018]
 
jQuery Conference Chicago - September 2014
jQuery Conference Chicago - September 2014jQuery Conference Chicago - September 2014
jQuery Conference Chicago - September 2014
 
Top 10 HTML5 features
Top 10 HTML5 featuresTop 10 HTML5 features
Top 10 HTML5 features
 
Windy cityrails performance_tuning
Windy cityrails performance_tuningWindy cityrails performance_tuning
Windy cityrails performance_tuning
 
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
 

Destaque

設計から実装まで、今すぐ始める高速化
設計から実装まで、今すぐ始める高速化設計から実装まで、今すぐ始める高速化
設計から実装まで、今すぐ始める高速化masaaki komori
 
文系デザイナーでも大丈夫!レスポンシブWEBサイトをWordPressで作ってみよう
文系デザイナーでも大丈夫!レスポンシブWEBサイトをWordPressで作ってみよう文系デザイナーでも大丈夫!レスポンシブWEBサイトをWordPressで作ってみよう
文系デザイナーでも大丈夫!レスポンシブWEBサイトをWordPressで作ってみようJunko Nukaga
 
ノンプログラマーのためのjQuery入門
ノンプログラマーのためのjQuery入門ノンプログラマーのためのjQuery入門
ノンプログラマーのためのjQuery入門Hayato Mizuno
 
レスポンシブ・ウェブデザイン基礎
レスポンシブ・ウェブデザイン基礎レスポンシブ・ウェブデザイン基礎
レスポンシブ・ウェブデザイン基礎masaaki komori
 
Webデザインのセオリーを学ぼう
Webデザインのセオリーを学ぼうWebデザインのセオリーを学ぼう
Webデザインのセオリーを学ぼうToshiaki Sasaki
 
ノンデザイナーのための配色理論
ノンデザイナーのための配色理論ノンデザイナーのための配色理論
ノンデザイナーのための配色理論tsukasa obara
 
色彩センスのいらない配色講座
色彩センスのいらない配色講座色彩センスのいらない配色講座
色彩センスのいらない配色講座Mariko Yamaguchi
 

Destaque (7)

設計から実装まで、今すぐ始める高速化
設計から実装まで、今すぐ始める高速化設計から実装まで、今すぐ始める高速化
設計から実装まで、今すぐ始める高速化
 
文系デザイナーでも大丈夫!レスポンシブWEBサイトをWordPressで作ってみよう
文系デザイナーでも大丈夫!レスポンシブWEBサイトをWordPressで作ってみよう文系デザイナーでも大丈夫!レスポンシブWEBサイトをWordPressで作ってみよう
文系デザイナーでも大丈夫!レスポンシブWEBサイトをWordPressで作ってみよう
 
ノンプログラマーのためのjQuery入門
ノンプログラマーのためのjQuery入門ノンプログラマーのためのjQuery入門
ノンプログラマーのためのjQuery入門
 
レスポンシブ・ウェブデザイン基礎
レスポンシブ・ウェブデザイン基礎レスポンシブ・ウェブデザイン基礎
レスポンシブ・ウェブデザイン基礎
 
Webデザインのセオリーを学ぼう
Webデザインのセオリーを学ぼうWebデザインのセオリーを学ぼう
Webデザインのセオリーを学ぼう
 
ノンデザイナーのための配色理論
ノンデザイナーのための配色理論ノンデザイナーのための配色理論
ノンデザイナーのための配色理論
 
色彩センスのいらない配色講座
色彩センスのいらない配色講座色彩センスのいらない配色講座
色彩センスのいらない配色講座
 

Semelhante a スマートフォンサイトの作成術 - 大川洋一

HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on MobileAdam Lu
 
Attractive HTML5~開発者の視点から~
Attractive HTML5~開発者の視点から~Attractive HTML5~開発者の視点から~
Attractive HTML5~開発者の視点から~Sho Ito
 
About Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSAbout Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSNaga Harish M
 
Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)Adam Lu
 
Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5Roy Clarkson
 
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET DevelopersAccelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET DevelopersTodd Anglin
 
e10sとアプリ間通信
e10sとアプリ間通信e10sとアプリ間通信
e10sとアプリ間通信Makoto Kato
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)Doris Chen
 
HTML5 Hacking - Yahoo! Open Hack Day
HTML5 Hacking - Yahoo! Open Hack DayHTML5 Hacking - Yahoo! Open Hack Day
HTML5 Hacking - Yahoo! Open Hack DayTed Drake
 
HTML5 History & Features
HTML5 History & FeaturesHTML5 History & Features
HTML5 History & FeaturesDave Ross
 
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App DevelopmentChris Morrell
 
Iphone Presentation for MuMe09
Iphone Presentation for MuMe09Iphone Presentation for MuMe09
Iphone Presentation for MuMe09Gonzalo Parra
 
Android lessons you won't learn in school
Android lessons you won't learn in schoolAndroid lessons you won't learn in school
Android lessons you won't learn in schoolMichael Galpin
 
디자인 패턴과 YUI를 이용해 Rich UI 빠르게 구현하기
디자인 패턴과 YUI를 이용해 Rich UI 빠르게 구현하기디자인 패턴과 YUI를 이용해 Rich UI 빠르게 구현하기
디자인 패턴과 YUI를 이용해 Rich UI 빠르게 구현하기Jinho Jung
 
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...Yottaa
 
Mobile web-debug
Mobile web-debugMobile web-debug
Mobile web-debugFINN.no
 

Semelhante a スマートフォンサイトの作成術 - 大川洋一 (20)

Web app
Web appWeb app
Web app
 
Web app
Web appWeb app
Web app
 
HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on Mobile
 
Attractive HTML5~開発者の視点から~
Attractive HTML5~開発者の視点から~Attractive HTML5~開発者の視点から~
Attractive HTML5~開発者の視点から~
 
About Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSAbout Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JS
 
Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)
 
Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5
 
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET DevelopersAccelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
 
e10sとアプリ間通信
e10sとアプリ間通信e10sとアプリ間通信
e10sとアプリ間通信
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
 
HTML5 Hacking - Yahoo! Open Hack Day
HTML5 Hacking - Yahoo! Open Hack DayHTML5 Hacking - Yahoo! Open Hack Day
HTML5 Hacking - Yahoo! Open Hack Day
 
HTML5 History & Features
HTML5 History & FeaturesHTML5 History & Features
HTML5 History & Features
 
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App Development
 
Iphone Presentation for MuMe09
Iphone Presentation for MuMe09Iphone Presentation for MuMe09
Iphone Presentation for MuMe09
 
Android lessons you won't learn in school
Android lessons you won't learn in schoolAndroid lessons you won't learn in school
Android lessons you won't learn in school
 
디자인 패턴과 YUI를 이용해 Rich UI 빠르게 구현하기
디자인 패턴과 YUI를 이용해 Rich UI 빠르게 구현하기디자인 패턴과 YUI를 이용해 Rich UI 빠르게 구현하기
디자인 패턴과 YUI를 이용해 Rich UI 빠르게 구현하기
 
HTML 5 - Overview
HTML 5 - OverviewHTML 5 - Overview
HTML 5 - Overview
 
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
 
Mobile web-debug
Mobile web-debugMobile web-debug
Mobile web-debug
 
InfoTalk#17 1st
InfoTalk#17 1stInfoTalk#17 1st
InfoTalk#17 1st
 

Último

VIP Kolkata Call Girl Gariahat 👉 8250192130 Available With Room
VIP Kolkata Call Girl Gariahat 👉 8250192130  Available With RoomVIP Kolkata Call Girl Gariahat 👉 8250192130  Available With Room
VIP Kolkata Call Girl Gariahat 👉 8250192130 Available With Roomdivyansh0kumar0
 
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...Suhani Kapoor
 
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdfThe_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdfAmirYakdi
 
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...home
 
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...Call Girls in Nagpur High Profile
 
Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...
Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...
Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...Yantram Animation Studio Corporation
 
Booking open Available Pune Call Girls Nanded City 6297143586 Call Hot India...
Booking open Available Pune Call Girls Nanded City  6297143586 Call Hot India...Booking open Available Pune Call Girls Nanded City  6297143586 Call Hot India...
Booking open Available Pune Call Girls Nanded City 6297143586 Call Hot India...Call Girls in Nagpur High Profile
 
VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...
VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...
VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...Suhani Kapoor
 
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130Suhani Kapoor
 
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...ranjana rawat
 
SCRIP Lua HTTP PROGRACMACION PLC WECON CA
SCRIP Lua HTTP PROGRACMACION PLC  WECON CASCRIP Lua HTTP PROGRACMACION PLC  WECON CA
SCRIP Lua HTTP PROGRACMACION PLC WECON CANestorGamez6
 
DragonBall PowerPoint Template for demo.pptx
DragonBall PowerPoint Template for demo.pptxDragonBall PowerPoint Template for demo.pptx
DragonBall PowerPoint Template for demo.pptxmirandajeremy200221
 
Cheap Rate Call girls Kalkaji 9205541914 shot 1500 night
Cheap Rate Call girls Kalkaji 9205541914 shot 1500 nightCheap Rate Call girls Kalkaji 9205541914 shot 1500 night
Cheap Rate Call girls Kalkaji 9205541914 shot 1500 nightDelhi Call girls
 
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service 🧵
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service  🧵CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service  🧵
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service 🧵anilsa9823
 
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️soniya singh
 
Kindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUpKindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUpmainac1
 

Último (20)

VIP Kolkata Call Girl Gariahat 👉 8250192130 Available With Room
VIP Kolkata Call Girl Gariahat 👉 8250192130  Available With RoomVIP Kolkata Call Girl Gariahat 👉 8250192130  Available With Room
VIP Kolkata Call Girl Gariahat 👉 8250192130 Available With Room
 
escort service sasti (*~Call Girls in Prasad Nagar Metro❤️9953056974
escort service sasti (*~Call Girls in Prasad Nagar Metro❤️9953056974escort service sasti (*~Call Girls in Prasad Nagar Metro❤️9953056974
escort service sasti (*~Call Girls in Prasad Nagar Metro❤️9953056974
 
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...
VIP Russian Call Girls in Gorakhpur Deepika 8250192130 Independent Escort Ser...
 
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdfThe_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
 
young call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Service
young call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Service
young call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Service
 
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
 
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
 
Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...
Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...
Captivating Charm: Exploring Marseille's Hillside Villas with Our 3D Architec...
 
Booking open Available Pune Call Girls Nanded City 6297143586 Call Hot India...
Booking open Available Pune Call Girls Nanded City  6297143586 Call Hot India...Booking open Available Pune Call Girls Nanded City  6297143586 Call Hot India...
Booking open Available Pune Call Girls Nanded City 6297143586 Call Hot India...
 
VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...
VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...
VIP College Call Girls Gorakhpur Bhavna 8250192130 Independent Escort Service...
 
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130
 
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...
(AISHA) Ambegaon Khurd Call Girls Just Call 7001035870 [ Cash on Delivery ] P...
 
SCRIP Lua HTTP PROGRACMACION PLC WECON CA
SCRIP Lua HTTP PROGRACMACION PLC  WECON CASCRIP Lua HTTP PROGRACMACION PLC  WECON CA
SCRIP Lua HTTP PROGRACMACION PLC WECON CA
 
DragonBall PowerPoint Template for demo.pptx
DragonBall PowerPoint Template for demo.pptxDragonBall PowerPoint Template for demo.pptx
DragonBall PowerPoint Template for demo.pptx
 
Cheap Rate Call girls Kalkaji 9205541914 shot 1500 night
Cheap Rate Call girls Kalkaji 9205541914 shot 1500 nightCheap Rate Call girls Kalkaji 9205541914 shot 1500 night
Cheap Rate Call girls Kalkaji 9205541914 shot 1500 night
 
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service 🧵
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service  🧵CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service  🧵
CALL ON ➥8923113531 🔝Call Girls Kalyanpur Lucknow best Female service 🧵
 
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
 
Kindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUpKindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUp
 
B. Smith. (Architectural Portfolio.).pdf
B. Smith. (Architectural Portfolio.).pdfB. Smith. (Architectural Portfolio.).pdf
B. Smith. (Architectural Portfolio.).pdf
 
young call girls in Vivek Vihar🔝 9953056974 🔝 Delhi escort Service
young call girls in Vivek Vihar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Vivek Vihar🔝 9953056974 🔝 Delhi escort Service
young call girls in Vivek Vihar🔝 9953056974 🔝 Delhi escort Service
 

スマートフォンサイトの作成術 - 大川洋一

  • 2. Hirokazu Okawa twitter : @okyawa •
  • 3. • CentOS Apache PostgreSQL PHP
  • 4. PC
  • 6. WebKit • HTML
  • 7. WebKit • Safari (iPhone Mobile Safari) • Chrome (Android ) • BlackBerry (OS6 )
  • 8.
  • 10. • iPhone Web
  • 11. 980 • • 1500
  • 12. ( ) viewport
  • 13. <meta name="viewport" width=”device-width; initial-scale=1.0; maximum-scale=1.0; user- scalable=no;" /> • width ( ) default 980 device-width • initial-scale 1.0 • maximum-scale • user-scalable yes/no
  • 14. CSS
  • 15. body { -webkit-text-size-adjust: none; }
  • 16.
  • 17.
  • 18. • • Ajax • HTML
  • 19. • HTML • JSON (JavaScript Object Notation)
  • 20. HTML • HTML • Javascript DOM • PHP
  • 21. JSON • PHP JOSN → • Javascript • DOM •
  • 22. DOM • HTML (appendChild , insertBefore ) • HTML
  • 24. Ajax Ajax Ajax
  • 25. • Cookie • Web Storage ✴ ✴
  • 26. Cookie • • • (4KB)
  • 27. Web Storage • HTML5 API • Cookie • iPhone 5MB • Cookie key-value • (※ JSON )
  • 29. ( ) • •
  • 30. WebStorage obj.setItem(key,value) ◦ • obj.getItem(key) ◦ • obj.removeItem(key) ◦ • obj.clear() ◦ • obj.key(n) ◦n (0 ) • obj.length ◦
  • 31. • • obj.getItem(key) • •
  • 32. Chrome, Safari Developer Tools Resources Local Strage Session Strage • key Ajax value JSON
  • 33. // if (window.sessionStorage) { sessionStorage.clear(); } // if (window.sessionStorage) { var key = 'go=product-list&mode=line&id=4page=1'; sessionStorage.setItem(key, jsonData); var obj = JSON.parse(jsonData); jQuery(obj).each(function(index, jsonElement) { // preload image new Image().src = jsonElement.photo.url; }); }
  • 34. // var key = 'go=product-list&mode=line&id=4page=1'; var parseStrageData = null; if (window.sessionStorage) { var strageData = sessionStorage.getItem(key) if (key) { try { var parseStrageData = JSON.parse(strageData); } catch (e) { parseStrageData = null; } } } if (parseStrageData) { // } else { // Ajax }
  • 35.
  • 36. • GD PING • 80px
  • 37. • <img src=”chair.jpg” width=”80” /> 80px 160px
  • 40. <li id="listbox_132"> <a href="javascript:void(0);"> <img id="thumbnail_132" class="thumbnail_btn" src="thumnail_product01.png"> </a> </li> var mainPhoto = []; mainPhoto[120] = 'product01.jpg'; mainPhoto[132] = 'product02.jpg'; mainPhoto[181] = 'product03.jpg'; mainPhoto[247] = 'product04.jpg'; jQuery('.thumbnail_btn').each(function(index, elem) { var num = elem.id.replace(/thumbnail_/,''); var mainImage = new Image(); mainImage.onload = function() { // }; mainImage.src = mainPhoto[num]; });
  • 41.
  • 42. HTML input type • tel iPhone • number • email type • url
  • 47. • <input type=”text” placeholder=" " />
  • 48. • • 2 → • •
  • 49. var autoFitTextareaHeight = function (elem, keyCode, fit) { // backspace or delete or onblor if (keyCode === 8 || keyCode === 46 || fit) { elem.style.height = 'auto'; } if (elem.offsetHeight < elem.scrollHeight) { elem.style.height = elem.scrollHeight + 'px'; } } autoFitTextareaHeight(elem); jQuery(elem).bind('keyup', function (event) { autoFitTextareaHeight(event.target, event.keyCode, false); }); jQuery(elem).bind('blur', function (event) { autoFitTextareaHeight(event.target, event.keyCode, true); });
  • 50.
  • 51. • window.orientation • 0 • 90 • -90 • 180
  • 52. • orientationchange • iPhone •
  • 53. <body onorientationchange="alert(' ');"> window.addEventListener('orientationchange', function () { alert(' '); }, false);
  • 54. Android • orientationchange resize window.addEventListener('resize', orientFunc, false);
  • 55. • window.onresize iPhone (maximum call stack size exceeded) • iPhone var eventName = 'resize'; if (-1 < navigator.userAgent.indexOf('iPhone') || -1 < navigator.userAgent.indexOf('iPod')) { eventName = 'orientationchange'; } window.addEventListener(eventName, sampleFunc, false);
  • 56.
  • 58.
  • 59. PC
  • 60.
  • 61.
  • 62. iPhone 20px • iPhone GS 60px 320px × 480px 356px • iPhone 640px × 960px ( 320px × 480px) 44px
  • 63. Android • 320px × 480px • 480px × 800px • 480px × 854px • 640px × 960px • 960px × 480px • 320px
  • 64.
  • 65. URL • URL (60px) •
  • 66. URL function hideUrlBar() { setTimeout(function () { if (scrollY < 60) { scrollTo(0, 1); } }, 1); }
  • 68.
  • 70. 651-0096 651-0096 • meta <meta name="format-detection" content="telephone=no"/>
  • 71. YouTube <a href="youtube: ID"> </a> <a href="http://www.youtube.com/v/ ID"> </a> <a href="http://www.youtube.com/watch?v= ID"> </a> •a YouTube • YouTube YouTube
  • 72.
  • 73. <a href="maps:q= "> </a> <a href="http://maps.google.com/maps?q= "> </a> <a href="http://maps.google.co.jp/maps?q= "> </a> <a href="http://maps.google.co.jp/maps?q= , + "> </a>
  • 74.
  • 76.
  • 77. Android • Android SDK • Windows Mac OS X (intel) Linux (i386) • Andorid Platform
  • 79. Opera Mobile • Opera Mobile emulator •
  • 80. Opera Mini • Opera Mini Simulator • • Opera • Opera
  • 81. BlackBerry • BlackBerry Smartphone Simulators • Windows XP 7 Java JDK, Eclipse3.6 • Eclipse MDS Services Simulator Package
  • 82.
  • 83.
  • 84.
  • 85.
  • 86.
  • 87. Windows Phone • Windows Phone Developer Tools • Windows Vista Windows7
  • 88.
  • 89.
  • 91. PC <link media="screen and (min-device- width:481px)" rel="stylesheet" type="text/ css" href="pcsite.css" /> iPhone <link media="only screen and (max- device-width:480px)" href="smartphone.css" type="text/css" rel="stylesheet" />
  • 92. • iUi • iWebKit • Universal iPhone UI Kit • jQTouch • WebKit • jQueryMobile •
  • 93.
  • 94. • Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_1_2 like Mac OS X; en-us) AppleWebKit/ 528.18 (KHTML, like Gecko) Version/4.0 Mobile/7D11 Safari/528.16 • Mozilla/5.0 (iPod; U; CPU iPhone OS 3_1_2 like Mac OS X; en-us) AppleWebKit/ 528.18 (KHTML, like Gecko) Version/4.0 Mobile/7D11 Safari/528.16 • Mozilla/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3A100a Safari/419.3 • Mozilla/5.0 (Linux; U; Android 1.6; ja-jp; SonyEricssonSO-01B Build/R1EA018) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1 • Opera/9.80 (J2ME/MIDP; Opera Mini/5.0.0176/1150; U; ja) Presto/2.4.15 • BlackBerry9000/4.6.0.224 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/220
  • 95.
  • 96. • • touchstart • gesturestart • touchend • gesturechange • touchmove • gestureend • touchcancel
  • 97. mousewheel • 2 • 2 1
  • 98.