SlideShare ist ein Scribd-Unternehmen logo
1 von 55
Downloaden Sie, um offline zu lesen
Mobile Web
                               Development
                          Tony Thomas - Student Unions & Activities




Tuesday, October 25, 11
Tuesday, October 25, 11

iOS, Android, Blackberry, Windows Mobile and others
Well...not webOS anymore.
320 X 240          480 X 800     240 X 260 800 X 480
       Motorola
       HTC                Motorola      Blackberry HTC
       Blackberry         HTC

     360 X 480                          240 X 320

     Blackberry                         Blackberry
                          480 X 320     HTC
                                                     360 X 400
                          Blackberry
                                                     Blackberry


                          480 X 360

                          Blackberry




Tuesday, October 25, 11

320x480 - iPhone 3, Motorola and HTC Handsets
640x960 - iPhone4
480x800 - HTC, Motorola
480x854 - Motorola
Plus a whole variety of other screen dimensions
AND many of those also work in landscape mode
Browsers




Tuesday, October 25, 11

On top of all that, there is a variety of browsers
Safari Mobile
Webkit
Blackberry
Opera
Firefox
and yes, IE Mobile
Standards Compliant




Tuesday, October 25, 11

Good news. Most of the popular mobile browsers have very good support for web standards
Source: gs.statcounter.com/#mobile_browser-US-monthly-200812-201108



Tuesday, October 25, 11

In fact, lumping these standards-compliant browsers together, you can see that almost 80%
of the mobile browsers out there support web standards.
~90% of Mobile
                          Browsers == Webkit
                     Mobile
                                    Webkit




Tuesday, October 25, 11

Analytics from homecoming.umn.edu
24% of Desktop
                    Browsers are IE 6 or 7
                     Desktop
                                           IE 6 & 7




Tuesday, October 25, 11

Desktop analytics for homecoming.umn.edu
PC: 100,000,000 Users
                           in 1993




            Source: ITU, Mark Lipacis, Morgan Stanley Research
Tuesday, October 25, 11

PC: 100M - 1993
Desktop Internet:
                          1,000,000,000 in 2005




            Source: ITU, Mark Lipacis, Morgan Stanley Research
Tuesday, October 25, 11

PC: 100M - 1993
Desktop Internet 1B - 2005
Mobile Internet:
                          10,000,000,000 by 2020




            Source: ITU, Mark Lipacis, Morgan Stanley Research
Tuesday, October 25, 11

PC: 100M - 1993
Desktop Internet 1B - 2005
Mobile Internet 10B - 2020
Smartphones are More
                    Affordable Than Ever




Tuesday, October 25, 11

They’re cheap. Sometimes free w/ new or renewed plans.
Increase in Mobile
                                Traffic




Tuesday, October 25, 11

Mobile devices accessing homecoming.umn.edu 8/2010 compared to 8/2011 is up 669%.
So how do we deal with all these devices and browsers?
Responsive Web Design
           www.alistapart.com/articles/responsive-web-design/




Tuesday, October 25, 11

Ethan Marcotte introduced responsive design last year. Inspired by responsive architecture.
Buildings change shape in response to their environment.
Responsive
                                    Architecture

                          If a building could change its posture, tighten its
                          muscles and brace itself against the wind, its
                          structural mass could literally be cut in half. -
                          Guy Nordenson




Tuesday, October 25, 11

If you think of image sizes, server requests and file sizes as “structural mass,” this concept
begins to make sense for mobile web design.
alistapart.com/articles/dao/
                  “It’s time to throw out the
                  rituals of the printed page,
                  and to engage the medium
                  of the web and its own
                  nature.”



Tuesday, October 25, 11

Responsive design requires a change in how we think about design for the web. Ethan
Marcotte referenced this article written in 2000.
Responsive Web Design




Tuesday, October 25, 11

One responsive design to rule them all. Page changes according to the dimensions of the
screen.
Content For Mobile




                                     Photo: Dani Ihtatho
                                     flickr.com/people/ihtatho/

Tuesday, October 25, 11

Mobile design requires tightening the focus of your content as well.
Pare it down, simplify.
New projects should be built with this in mind. What about taking an existing site and making
it more mobile-friendly?
springjam.umn.edu
Tuesday, October 25, 11

Spring Jam has an award-winning design. Built w/ desktop in mind.
Large images.
Traffic Focused On
                                  Event




                          Spring Jam Mobile Traffic 4/1/10 - 4/1/11

Tuesday, October 25, 11

Immediacy. The three points in this spike in mobile traffic for Spring Jam are the days of the
event itself.
We focused on events.
Media Queries

                  @media only screen
                and (min-device-width : 320px)
                and (max-device-width : 480px) {
                /* Styles */
                }



Tuesday, October 25, 11

Allow you to write styles based on a range of screen widths.
Media Queries
                          Even though, things like header images could be set
                          to display:none, the image still loads
                          JavaScript files not required in the mobile version
                          Adding yet another style sheet to overwrite the
                          desktop style sheet added overhead
                          The markup and content needed to be pared down
                          for mobile
                          Screen resolutions a moving target


Tuesday, October 25, 11

Mobile bandwidth concerns
Mobile Detection


                           detectmobilebrowsers.com


                                     xkcd.com/869/




Tuesday, October 25, 11

As usual xkcd hits the nail on the head. separate site w/ redirect.
Redirect on first visit and set a cookie so if they want to go to “full site”, they’re no longer
redirected
Mobile Detection


                           detectmobilebrowsers.com




Tuesday, October 25, 11
Mobile Detection
                          $redirect = '/mobile/';
                          if (!empty($_GET))
                          {
                             preg_match('/?.*/i',
                          $_SERVER['REQUEST_URI'], $get_string);
                              $redirect .= $get_string[0];
                          }



Tuesday, October 25, 11
Considerations

                          Fluid Layouts
                          font-size: 100%
                          Proportional margins and padding
                          Fluid images




Tuesday, October 25, 11

Fluid images?
640 X 960          480 X 854            480 X 800               480 X 320

            iPhone 4           Motorola             HTC                     Blackberry
                                                    Motorola
                                                                            480 X 360

                                                                            Blackberry



                                                                                         320 X 480
                                       320 X 240
                                                       800 X 480
                                       Motorola                                          iPhone 3(GS)
                                       HTC                                               Motorola
             480 X 800    360 X 480    Blackberry      HTC                               HTC


                                       360 X 400
             Motorola     Blackberry
             HTC
                                       Blackberry
                                                       240 X 320    240 X 260

                                                       Blackberry   Blackberry
                                                       HTC




Tuesday, October 25, 11

Images that scale so design can respond to all these various screen resolutions. More
specifics to come.
Offline Storage
                                                Connectivity/Realtime
                                                Multimedia
                                                Graphics & 3D Effects
                                                Device Access
                                                Performance &
                                                Integration
                                                Semantics
                                                CSS3/Styling




Tuesday, October 25, 11

A note on HTML5: Don’t believe the hype. It’s not magic. Features and API’s lumped into
HTML5.
These things are brands. HTML5 has useful semantics and support for data, but it’s markup.
It’s not connectivity, multimedia, 3D, device access, semantics or CSS3. It’s a W3C
specification.
springjam.umn.edu
Tuesday, October 25, 11

No framework. Markup is pared down and with fewer images and less JavaScript.
Tuesday, October 25, 11
Spring Jam
                          Fluid layout
                          JQuery
                          Mobile Detection
                          Fluid Header Image
                          JavaScript to Provide User Feedback



Tuesday, October 25, 11
JQuery

                          Not officially supported in Mobile Safari
                          Extra Overhead for the Small Amount of
                          Functionality Needed
                          Only 89 KB




Tuesday, October 25, 11
JavaScript
                          height = screen.height;




Tuesday, October 25, 11

JavaScript: height = screen.height;
Used height because of the landscape issue.
Screen Heights

                     • 320
                     • 800
                     • 960
                     • #header width: 100%

Tuesday, October 25, 11

Looked at handset data to come group screen heights into three rough groups
Screen Heights

        $('a#header-home-link').html('<img src="/sj-
        images/mobile/' + directory + '/header.png"
        alt="Student Unions &amp; Activities logo."
        id="sua-logo" class="logos" />');




Tuesday, October 25, 11
Responsive Images


                          adaptive-images.com
                          z.umn.edu/responsiveimages




Tuesday, October 25, 11

Two techniques that look interesting
I haven’t had a chance to try them yet
User Feedback
                          $('a').bind('click', function()
                          {
                              $('.active').removeClass('active');
                              $(this).addClass('active');
                              href = $(this).attr('href');
                              window.setTimeout('send(href)', 300);
                              return false
                          });




Tuesday, October 25, 11

Active state was inconsistent. Set 300 millisecond delay w/ active CSS class to ensure user
feedback
User Feedback

                              function send(url)
                              {
                                 window.location = url;
                              }




Tuesday, October 25, 11

Then used a simple redirect
Phone Numbers




Tuesday, October 25, 11

Touching “Call Student Unions & Activities” opens phone app
Phone Numbers


                          <a href="tel:612-624-4636">Call
                          Student Unions &amp; Activities</a>




Tuesday, October 25, 11
Homecoming




Tuesday, October 25, 11
Homecoming


                     • Audience focused research
                     • Used JQuery Mobile Framework


Tuesday, October 25, 11
JQuery Mobile
                          jquerymobile.com
                          Official JQuery framework
                          Large Community
                          Broad Browser Support
                          Easy



Tuesday, October 25, 11
JQuery Mobile

                          Useful but constraining
                          Markup could be more semantic
                          Cookie cutter websites
                          Slight case of “classitis”




Tuesday, October 25, 11
JQuery Mobile
                                 Requirements
                          HTML5
                          JQuery
                          JQuery Mobile Library
                          JQuery Mobile Stylesheet




Tuesday, October 25, 11
HTML5 data


                           data-role=”page”




Tuesday, October 25, 11
<div data-role="page">

                             <div data-role="header">

                                 <h1>Page Title</h1>

                             </div><!-- /header -->

                             <div data-role="content">

                                 <p>Page content goes here.</p>

                             </div><!-- /content -->

                             <div data-role="footer">

                                 <h4>Page Footer</h4>

                             </div><!-- /footer -->

                          </div><!-- /page -->




Tuesday, October 25, 11

Example for body from JQuery mobile website
<div data-role="page">

                             <header data-role="header">

                                 <h1>Page Title</h1>

                             </header><!-- /header -->

                             <div data-role="content">

                                 <p>Page content goes here.</p>

                             </div><!-- /content -->

                             <footer data-role="footer">

                                 <h4>Page Footer</h4>

                             </footer><!-- /footer -->

                          </div><!-- /page -->




Tuesday, October 25, 11

Same page, better semantics
Built-in Themes


                            data-theme=”a”




Tuesday, October 25, 11

Themes a,b,c,d & e
Define and style your own theme
Built-in Themes




Tuesday, October 25, 11
Heavy Lifting
                          Links to AJAX Page Loads
                          Fancy Page Transitions
                          Updated Browser History (Back Button)
                          Styling
                          Long Titles Truncated w/ Ellipses



Tuesday, October 25, 11
Classitis


           <html lang="en" class="ui-mobile landscape
           min-width-320px min-width-480px min-
           width-768px min-width-1024px">




Tuesday, October 25, 11

This is valid, but messy and not very semantic
Testing

                          iPhone & Android SDK’s
                          springbox.com/mobilizer/
                          Safari Developer Menu (iPhone User Agent
                          String)




Tuesday, October 25, 11
Recommendations
                          use analytics to inform your decisions
                          use responsive design in new sites
                          focus content & pare it down
                          use responsive techniques
                          don’t be afraid of mobile detection
                          use frameworks when they’re helpful
                          use HTML5 if you like


Tuesday, October 25, 11
What are your questions?
                          adaptive-images.com
                          z.umn.edu/responsiveimages
                          lukew.com (@lukew)
                          jquerymobile.com
                          z.umn.edu/smartphonematrices
                          detectmobilebrowser.com
                          springbox.com/mobilizer/



Tuesday, October 25, 11

Weitere ähnliche Inhalte

Ähnlich wie Mobile Web Design for Any Device

Cloud Computing - Myths & Reality
Cloud Computing - Myths & RealityCloud Computing - Myths & Reality
Cloud Computing - Myths & RealityErik Riedel
 
How to build a mobile website with Drupal?
How to build a mobile website with Drupal?How to build a mobile website with Drupal?
How to build a mobile website with Drupal?LEKTUM
 
Web Development for Mobile Devices
Web Development for Mobile DevicesWeb Development for Mobile Devices
Web Development for Mobile Devicesraykimsey
 
Developing for Mobility
Developing for MobilityDeveloping for Mobility
Developing for MobilityScotty Logan
 
Cloud Computing in Mobile
Cloud Computing in MobileCloud Computing in Mobile
Cloud Computing in MobileSVWB
 
Develop & Deploy cloud-native apps as resilient Microservices Architectures
Develop & Deploy cloud-native apps as resilient Microservices ArchitecturesDevelop & Deploy cloud-native apps as resilient Microservices Architectures
Develop & Deploy cloud-native apps as resilient Microservices ArchitecturesRed Hat Developers
 
Why HTML5 is getting on my nerves…
Why HTML5 is getting on my nerves…Why HTML5 is getting on my nerves…
Why HTML5 is getting on my nerves…Avenga Germany GmbH
 
Singapore Mobile 2.0 & Ux Trends 2009: Scott Weiss
Singapore Mobile 2.0 & Ux Trends 2009: Scott WeissSingapore Mobile 2.0 & Ux Trends 2009: Scott Weiss
Singapore Mobile 2.0 & Ux Trends 2009: Scott WeissYOGESH TADWALKAR
 
Mobil Uygulama Geliştirmenin Zorlukları ve Çözüm Yolları [Mobil 13]
Mobil Uygulama Geliştirmenin Zorlukları ve Çözüm Yolları [Mobil 13]Mobil Uygulama Geliştirmenin Zorlukları ve Çözüm Yolları [Mobil 13]
Mobil Uygulama Geliştirmenin Zorlukları ve Çözüm Yolları [Mobil 13]Ali Koca
 
Responsive Web Design & the state of the Web
Responsive Web Design & the state of the WebResponsive Web Design & the state of the Web
Responsive Web Design & the state of the WebYiannis Konstantakopoulos
 
Speed and simplicity
Speed and simplicitySpeed and simplicity
Speed and simplicitymStoner, Inc.
 
Speed and Simplicity: Design and Usability for Multi-device Websites
Speed and Simplicity: Design and Usability for Multi-device WebsitesSpeed and Simplicity: Design and Usability for Multi-device Websites
Speed and Simplicity: Design and Usability for Multi-device WebsitesDoug Gapinski
 
Mobile Cloud Computing
Mobile Cloud ComputingMobile Cloud Computing
Mobile Cloud Computingguestc37919f
 
Mobile Cloud Computing
Mobile Cloud ComputingMobile Cloud Computing
Mobile Cloud ComputingSimeon Oriko
 
Desigan Chinniah Head of global partenrships and business development de Fire...
Desigan Chinniah Head of global partenrships and business development de Fire...Desigan Chinniah Head of global partenrships and business development de Fire...
Desigan Chinniah Head of global partenrships and business development de Fire...videos
 
(WI2012) Lucijan Blagonic - Responsive web design
(WI2012) Lucijan Blagonic - Responsive web design(WI2012) Lucijan Blagonic - Responsive web design
(WI2012) Lucijan Blagonic - Responsive web designWeb::INDUSTRIJA
 

Ähnlich wie Mobile Web Design for Any Device (20)

Cloud Computing - Myths & Reality
Cloud Computing - Myths & RealityCloud Computing - Myths & Reality
Cloud Computing - Myths & Reality
 
Html5 Apps
Html5 AppsHtml5 Apps
Html5 Apps
 
How to build a mobile website with Drupal?
How to build a mobile website with Drupal?How to build a mobile website with Drupal?
How to build a mobile website with Drupal?
 
Web Development for Mobile Devices
Web Development for Mobile DevicesWeb Development for Mobile Devices
Web Development for Mobile Devices
 
Developing for Mobility
Developing for MobilityDeveloping for Mobility
Developing for Mobility
 
ModUX keynote
ModUX keynoteModUX keynote
ModUX keynote
 
Cloud Computing in Mobile
Cloud Computing in MobileCloud Computing in Mobile
Cloud Computing in Mobile
 
Develop & Deploy cloud-native apps as resilient Microservices Architectures
Develop & Deploy cloud-native apps as resilient Microservices ArchitecturesDevelop & Deploy cloud-native apps as resilient Microservices Architectures
Develop & Deploy cloud-native apps as resilient Microservices Architectures
 
Mobile Cloud Computing
Mobile Cloud ComputingMobile Cloud Computing
Mobile Cloud Computing
 
Html5 Development
Html5 DevelopmentHtml5 Development
Html5 Development
 
Why HTML5 is getting on my nerves…
Why HTML5 is getting on my nerves…Why HTML5 is getting on my nerves…
Why HTML5 is getting on my nerves…
 
Singapore Mobile 2.0 & Ux Trends 2009: Scott Weiss
Singapore Mobile 2.0 & Ux Trends 2009: Scott WeissSingapore Mobile 2.0 & Ux Trends 2009: Scott Weiss
Singapore Mobile 2.0 & Ux Trends 2009: Scott Weiss
 
Mobil Uygulama Geliştirmenin Zorlukları ve Çözüm Yolları [Mobil 13]
Mobil Uygulama Geliştirmenin Zorlukları ve Çözüm Yolları [Mobil 13]Mobil Uygulama Geliştirmenin Zorlukları ve Çözüm Yolları [Mobil 13]
Mobil Uygulama Geliştirmenin Zorlukları ve Çözüm Yolları [Mobil 13]
 
Responsive Web Design & the state of the Web
Responsive Web Design & the state of the WebResponsive Web Design & the state of the Web
Responsive Web Design & the state of the Web
 
Speed and simplicity
Speed and simplicitySpeed and simplicity
Speed and simplicity
 
Speed and Simplicity: Design and Usability for Multi-device Websites
Speed and Simplicity: Design and Usability for Multi-device WebsitesSpeed and Simplicity: Design and Usability for Multi-device Websites
Speed and Simplicity: Design and Usability for Multi-device Websites
 
Mobile Cloud Computing
Mobile Cloud ComputingMobile Cloud Computing
Mobile Cloud Computing
 
Mobile Cloud Computing
Mobile Cloud ComputingMobile Cloud Computing
Mobile Cloud Computing
 
Desigan Chinniah Head of global partenrships and business development de Fire...
Desigan Chinniah Head of global partenrships and business development de Fire...Desigan Chinniah Head of global partenrships and business development de Fire...
Desigan Chinniah Head of global partenrships and business development de Fire...
 
(WI2012) Lucijan Blagonic - Responsive web design
(WI2012) Lucijan Blagonic - Responsive web design(WI2012) Lucijan Blagonic - Responsive web design
(WI2012) Lucijan Blagonic - Responsive web design
 

Kürzlich hochgeladen

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 

Kürzlich hochgeladen (20)

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 

Mobile Web Design for Any Device

  • 1. Mobile Web Development Tony Thomas - Student Unions & Activities Tuesday, October 25, 11
  • 2. Tuesday, October 25, 11 iOS, Android, Blackberry, Windows Mobile and others Well...not webOS anymore.
  • 3. 320 X 240 480 X 800 240 X 260 800 X 480 Motorola HTC Motorola Blackberry HTC Blackberry HTC 360 X 480 240 X 320 Blackberry Blackberry 480 X 320 HTC 360 X 400 Blackberry Blackberry 480 X 360 Blackberry Tuesday, October 25, 11 320x480 - iPhone 3, Motorola and HTC Handsets 640x960 - iPhone4 480x800 - HTC, Motorola 480x854 - Motorola Plus a whole variety of other screen dimensions AND many of those also work in landscape mode
  • 4. Browsers Tuesday, October 25, 11 On top of all that, there is a variety of browsers Safari Mobile Webkit Blackberry Opera Firefox and yes, IE Mobile
  • 5. Standards Compliant Tuesday, October 25, 11 Good news. Most of the popular mobile browsers have very good support for web standards
  • 6. Source: gs.statcounter.com/#mobile_browser-US-monthly-200812-201108 Tuesday, October 25, 11 In fact, lumping these standards-compliant browsers together, you can see that almost 80% of the mobile browsers out there support web standards.
  • 7. ~90% of Mobile Browsers == Webkit Mobile Webkit Tuesday, October 25, 11 Analytics from homecoming.umn.edu
  • 8. 24% of Desktop Browsers are IE 6 or 7 Desktop IE 6 & 7 Tuesday, October 25, 11 Desktop analytics for homecoming.umn.edu
  • 9. PC: 100,000,000 Users in 1993 Source: ITU, Mark Lipacis, Morgan Stanley Research Tuesday, October 25, 11 PC: 100M - 1993
  • 10. Desktop Internet: 1,000,000,000 in 2005 Source: ITU, Mark Lipacis, Morgan Stanley Research Tuesday, October 25, 11 PC: 100M - 1993 Desktop Internet 1B - 2005
  • 11. Mobile Internet: 10,000,000,000 by 2020 Source: ITU, Mark Lipacis, Morgan Stanley Research Tuesday, October 25, 11 PC: 100M - 1993 Desktop Internet 1B - 2005 Mobile Internet 10B - 2020
  • 12. Smartphones are More Affordable Than Ever Tuesday, October 25, 11 They’re cheap. Sometimes free w/ new or renewed plans.
  • 13. Increase in Mobile Traffic Tuesday, October 25, 11 Mobile devices accessing homecoming.umn.edu 8/2010 compared to 8/2011 is up 669%. So how do we deal with all these devices and browsers?
  • 14. Responsive Web Design www.alistapart.com/articles/responsive-web-design/ Tuesday, October 25, 11 Ethan Marcotte introduced responsive design last year. Inspired by responsive architecture. Buildings change shape in response to their environment.
  • 15. Responsive Architecture If a building could change its posture, tighten its muscles and brace itself against the wind, its structural mass could literally be cut in half. - Guy Nordenson Tuesday, October 25, 11 If you think of image sizes, server requests and file sizes as “structural mass,” this concept begins to make sense for mobile web design.
  • 16. alistapart.com/articles/dao/ “It’s time to throw out the rituals of the printed page, and to engage the medium of the web and its own nature.” Tuesday, October 25, 11 Responsive design requires a change in how we think about design for the web. Ethan Marcotte referenced this article written in 2000.
  • 17. Responsive Web Design Tuesday, October 25, 11 One responsive design to rule them all. Page changes according to the dimensions of the screen.
  • 18. Content For Mobile Photo: Dani Ihtatho flickr.com/people/ihtatho/ Tuesday, October 25, 11 Mobile design requires tightening the focus of your content as well. Pare it down, simplify. New projects should be built with this in mind. What about taking an existing site and making it more mobile-friendly?
  • 19. springjam.umn.edu Tuesday, October 25, 11 Spring Jam has an award-winning design. Built w/ desktop in mind. Large images.
  • 20. Traffic Focused On Event Spring Jam Mobile Traffic 4/1/10 - 4/1/11 Tuesday, October 25, 11 Immediacy. The three points in this spike in mobile traffic for Spring Jam are the days of the event itself. We focused on events.
  • 21. Media Queries @media only screen and (min-device-width : 320px) and (max-device-width : 480px) { /* Styles */ } Tuesday, October 25, 11 Allow you to write styles based on a range of screen widths.
  • 22. Media Queries Even though, things like header images could be set to display:none, the image still loads JavaScript files not required in the mobile version Adding yet another style sheet to overwrite the desktop style sheet added overhead The markup and content needed to be pared down for mobile Screen resolutions a moving target Tuesday, October 25, 11 Mobile bandwidth concerns
  • 23. Mobile Detection detectmobilebrowsers.com xkcd.com/869/ Tuesday, October 25, 11 As usual xkcd hits the nail on the head. separate site w/ redirect. Redirect on first visit and set a cookie so if they want to go to “full site”, they’re no longer redirected
  • 24. Mobile Detection detectmobilebrowsers.com Tuesday, October 25, 11
  • 25. Mobile Detection $redirect = '/mobile/'; if (!empty($_GET)) { preg_match('/?.*/i', $_SERVER['REQUEST_URI'], $get_string); $redirect .= $get_string[0]; } Tuesday, October 25, 11
  • 26. Considerations Fluid Layouts font-size: 100% Proportional margins and padding Fluid images Tuesday, October 25, 11 Fluid images?
  • 27. 640 X 960 480 X 854 480 X 800 480 X 320 iPhone 4 Motorola HTC Blackberry Motorola 480 X 360 Blackberry 320 X 480 320 X 240 800 X 480 Motorola iPhone 3(GS) HTC Motorola 480 X 800 360 X 480 Blackberry HTC HTC 360 X 400 Motorola Blackberry HTC Blackberry 240 X 320 240 X 260 Blackberry Blackberry HTC Tuesday, October 25, 11 Images that scale so design can respond to all these various screen resolutions. More specifics to come.
  • 28. Offline Storage Connectivity/Realtime Multimedia Graphics & 3D Effects Device Access Performance & Integration Semantics CSS3/Styling Tuesday, October 25, 11 A note on HTML5: Don’t believe the hype. It’s not magic. Features and API’s lumped into HTML5. These things are brands. HTML5 has useful semantics and support for data, but it’s markup. It’s not connectivity, multimedia, 3D, device access, semantics or CSS3. It’s a W3C specification.
  • 29. springjam.umn.edu Tuesday, October 25, 11 No framework. Markup is pared down and with fewer images and less JavaScript.
  • 31. Spring Jam Fluid layout JQuery Mobile Detection Fluid Header Image JavaScript to Provide User Feedback Tuesday, October 25, 11
  • 32. JQuery Not officially supported in Mobile Safari Extra Overhead for the Small Amount of Functionality Needed Only 89 KB Tuesday, October 25, 11
  • 33. JavaScript height = screen.height; Tuesday, October 25, 11 JavaScript: height = screen.height; Used height because of the landscape issue.
  • 34. Screen Heights • 320 • 800 • 960 • #header width: 100% Tuesday, October 25, 11 Looked at handset data to come group screen heights into three rough groups
  • 35. Screen Heights $('a#header-home-link').html('<img src="/sj- images/mobile/' + directory + '/header.png" alt="Student Unions &amp; Activities logo." id="sua-logo" class="logos" />'); Tuesday, October 25, 11
  • 36. Responsive Images adaptive-images.com z.umn.edu/responsiveimages Tuesday, October 25, 11 Two techniques that look interesting I haven’t had a chance to try them yet
  • 37. User Feedback $('a').bind('click', function() { $('.active').removeClass('active'); $(this).addClass('active'); href = $(this).attr('href'); window.setTimeout('send(href)', 300); return false }); Tuesday, October 25, 11 Active state was inconsistent. Set 300 millisecond delay w/ active CSS class to ensure user feedback
  • 38. User Feedback function send(url) { window.location = url; } Tuesday, October 25, 11 Then used a simple redirect
  • 39. Phone Numbers Tuesday, October 25, 11 Touching “Call Student Unions & Activities” opens phone app
  • 40. Phone Numbers <a href="tel:612-624-4636">Call Student Unions &amp; Activities</a> Tuesday, October 25, 11
  • 42. Homecoming • Audience focused research • Used JQuery Mobile Framework Tuesday, October 25, 11
  • 43. JQuery Mobile jquerymobile.com Official JQuery framework Large Community Broad Browser Support Easy Tuesday, October 25, 11
  • 44. JQuery Mobile Useful but constraining Markup could be more semantic Cookie cutter websites Slight case of “classitis” Tuesday, October 25, 11
  • 45. JQuery Mobile Requirements HTML5 JQuery JQuery Mobile Library JQuery Mobile Stylesheet Tuesday, October 25, 11
  • 46. HTML5 data data-role=”page” Tuesday, October 25, 11
  • 47. <div data-role="page"> <div data-role="header"> <h1>Page Title</h1> </div><!-- /header --> <div data-role="content"> <p>Page content goes here.</p> </div><!-- /content --> <div data-role="footer"> <h4>Page Footer</h4> </div><!-- /footer --> </div><!-- /page --> Tuesday, October 25, 11 Example for body from JQuery mobile website
  • 48. <div data-role="page"> <header data-role="header"> <h1>Page Title</h1> </header><!-- /header --> <div data-role="content"> <p>Page content goes here.</p> </div><!-- /content --> <footer data-role="footer"> <h4>Page Footer</h4> </footer><!-- /footer --> </div><!-- /page --> Tuesday, October 25, 11 Same page, better semantics
  • 49. Built-in Themes data-theme=”a” Tuesday, October 25, 11 Themes a,b,c,d & e Define and style your own theme
  • 51. Heavy Lifting Links to AJAX Page Loads Fancy Page Transitions Updated Browser History (Back Button) Styling Long Titles Truncated w/ Ellipses Tuesday, October 25, 11
  • 52. Classitis <html lang="en" class="ui-mobile landscape min-width-320px min-width-480px min- width-768px min-width-1024px"> Tuesday, October 25, 11 This is valid, but messy and not very semantic
  • 53. Testing iPhone & Android SDK’s springbox.com/mobilizer/ Safari Developer Menu (iPhone User Agent String) Tuesday, October 25, 11
  • 54. Recommendations use analytics to inform your decisions use responsive design in new sites focus content & pare it down use responsive techniques don’t be afraid of mobile detection use frameworks when they’re helpful use HTML5 if you like Tuesday, October 25, 11
  • 55. What are your questions? adaptive-images.com z.umn.edu/responsiveimages lukew.com (@lukew) jquerymobile.com z.umn.edu/smartphonematrices detectmobilebrowser.com springbox.com/mobilizer/ Tuesday, October 25, 11