SlideShare a Scribd company logo
Mobile Best Practices
Responsive Design

•   Responsive design is the practice of
    designing flexible layouts that create a user
    optimized experience across multiple
    viewing contexts.

•   Responsive design is not new.

•   Responsive design is synonomous with CSS3
    Media Queries.
CSS3 Media Queries


•   CSS Media Queries give us a way to control the
    application of styles based on the presence or absence
    of specific media features
•   Not exactly new (media="print/screen/handheld"), but now we
    can apply logic:
     o <link rel="stylesheet" href="awesome.css"
        media="screen and (min-width:500px)" />
    o   @media only screen and (min-width:480px) and (max-
        width:767px) and (orientation : landscape) { /*
        Insert Awesome Style Here */ }
•   Media queries can be either inline or linked
What's so cool about responsive
         design and what's not?

           The Good                              The Ugly
•   Reduced development time.          •   Media query support isn't great
•   Fewer files to maintain.           •   Unnecessary resource loading
•   Looks impressive when viewed       •   Often results in
    on a desktop.                          symmetrical, uninspired
•   Fun to design and develop.
                                           layouts.

•   Earns you instant street cred in
                                       •   Assumes that individuals browse
                                           the same way across devices.
    the web dev community since
    it's been a buzzword for several   •   Can make too many
    years and running.                     compromises resulting in both
•   Endorsed by unicorns.
                                           mediocre or bad desktop and
                                           mobile sites.
Gratuitious LOL Cat
Unnecessary Resource Loading
•   elements set to display:none still load in the background. This
    includes those rascally bandwidth sucking <img>,<script> driven
    widgets, <embed>, <object>.
•   All style sheets linked in a page, even if conditionally not applicable
    through media queries, will load.
•   Background images, even if overwritten by another through a perfectly
    valid cascade, will still load in WebKit based browsers
•   While we can make images fluid, the size of the embedded images
    remains the same between layouts.
•   @font-face web fonts can add overhead and affect performance unless
    applied carefully
Symmetrical, Uninspired layouts
What we can do minimize the
        problems of responsive design

                        A Bit of Good News
•   While WebKit browsers download every stylesheet attached to a page as
    well as fetch every image/element set to display:none, they will only
    display background-image and other assets like @font-face if they
    apply to an applicable @media context (screen-width/max-
    width, portrait/landscape)
•   What does this mean?
•   If we set the mobile layout first (the absence of the capability to read
    media queries is the first media query), then we can progressively layer
    on images and styles that DO NOT apply to mobile and thus WILL NOT be
    loaded at all in that context.
•   For this, CSS sprites and JavaScript based polyfills will be your best friend
CSS Sprites
•   Using CSS sprites will decrease loading time for any site you
    build, especially for mobile.
•   Drag and drop tools like Stitches (http://draeton.github.com/stitches/) and
    Spritecow (http://www.spritecow.com/) take the pain out of creating
    sprites and are FOSS.
•   Creating sprites for specific @media contexts will allow you load only the
    assets necessary for that specific view and will only take a single HTTP
    request.
CSS3 Media query polyfills

•    Using the mobile first approach saves bandwidth for mobile users but will
     make your desktop layout invisible to users without advanced
     browsers(like those who still use IE 8 or less and Windows Phone 7). This
     leaves two choices: an IE conditional stylesheet or a JavaScript to hack in
     support for this missing feature(a polyfill).
•    While there are dozens out there, I recommend
     Respond.js(https://github.com/scottjehl/Respond) because of the excellent support
     for inline media queries.
•   So what happens if someone who needs Respond.js turns off JS?
•   They're presented with the simplified mobile site, but all of the primary
    content is still visible and available. Progressive enhancement and
    graceful degredation-- yay!
Responsive best practices in summary


•   Design and code your CSS with mobile in mind first. Use CSS3 media queries to
    apply desktop layout and styles and make sure to limit resources to their
    appropriate context so they won't all be loaded.
•   Use CSS sprites to group elements by context, which will reduce overhead and
    excess HTTP requests. It's just good karma.
•   Setting elements to display:none will only visually hide an element, not
    prevent it from loading. Choose what you embed on the page carefully.
•   Make content area images fluid by applying width:100%; height: auto but
    don't be afraid to apply a min-width and max-width to prevent distortion.
•   Use a CSS3 media query polyfill to make sure less capable browsers are invited to
    the party but can still access the content if they aren't.
•   Use a meta viewport tag to it prevent scaling issues on iOS devices and to
    maintain precise control over how your site is viewed <meta name="viewport"
    content="width=device-width">
Dedicated Mobile Site/Theme


              The Good                                       The Ugly
•   Can be more useful when implementing a     •   Rely on UA sniffing to redirect users to
    mobile optimized version of a more             the correct domain or serve up the
    complex and varied site.                       correct theme, which is an inexact
•   Can serve scaled versions images and           science. Those who fall through the
    completely remove sections and scripts         cracks can always find a link at the
    not present or needed in the mobile            bottom to go to the mobile site, so this
    version, thereby reducing overhead by as       isn't necessarily a bad thing.
    much as 80% compared to responsive         •   Provides a second site/theme to
    counterparts.                                  maintain.
•   Are ultimately easier to create content
    for because there is no concern of
    mucking up the layout for both the
    desktop and mobile site.
•   Allows for different use cases than the
    desktop site/theme.
Which is Which?

•   Ultimately it is good to have both tricks up your sleeve
    as MO state government sites tend to be complex and
    varied. Sometimes a simple responsive site will work
    wonderfully, sometimes it won't.

•   Luck favors the prepared.
Questions?

sam.minter@oa.mo.gov

More Related Content

What's hot

Design4Drupal Boston 2013 - Bumps in the Road to Responsive
Design4Drupal Boston 2013 - Bumps in the Road to ResponsiveDesign4Drupal Boston 2013 - Bumps in the Road to Responsive
Design4Drupal Boston 2013 - Bumps in the Road to Responsive
Salem Ghoweri
 
SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013
Marc D Anderson
 
Responsive Web Design - Introduction & Workflow Overview
Responsive Web Design - Introduction & Workflow OverviewResponsive Web Design - Introduction & Workflow Overview
Responsive Web Design - Introduction & Workflow Overview
Aidan Foster
 
2 bootstrap-3-m1-slides
2 bootstrap-3-m1-slides2 bootstrap-3-m1-slides
2 bootstrap-3-m1-slides
MasterCode.vn
 
Responsive web design ppt
Responsive web design pptResponsive web design ppt
Responsive web design ppt
accede16
 
UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentationsUX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
UX Alive Conference
 
University of Portsmouth Library: A practical approach to Responsive Design
University of Portsmouth Library: A practical approach to Responsive Design University of Portsmouth Library: A practical approach to Responsive Design
University of Portsmouth Library: A practical approach to Responsive Design
Terminalfour
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
Joseph Labrecque
 
Responsive web design with various grids and frameworks comparison
Responsive web design with various grids and frameworks comparisonResponsive web design with various grids and frameworks comparison
Responsive web design with various grids and frameworks comparison
DhrubaJyoti Dey
 
Specialise or cross-skill
Specialise or cross-skillSpecialise or cross-skill
Specialise or cross-skill
Russ Weakley
 
Responsive Design and Information Architecture with Oracle Web Center Content...
Responsive Design and Information Architecture with Oracle Web Center Content...Responsive Design and Information Architecture with Oracle Web Center Content...
Responsive Design and Information Architecture with Oracle Web Center Content...
Dmitri Khanine
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
RZasadzinski
 
Cm i padwebdev_lunch_learn
Cm i padwebdev_lunch_learnCm i padwebdev_lunch_learn
Cm i padwebdev_lunch_learn
Critical Mass
 
The future of BYU web design
The future of BYU web designThe future of BYU web design
The future of BYU web design
Nate Walton
 
Stc 2015 preparing legacy projects for responsive design - technical issues
Stc 2015   preparing legacy projects for responsive design - technical issuesStc 2015   preparing legacy projects for responsive design - technical issues
Stc 2015 preparing legacy projects for responsive design - technical issues
Neil Perlin
 
Testing Drupal Site Performance Across Browsers, Geographies and Networks
Testing Drupal Site Performance Across Browsers, Geographies and NetworksTesting Drupal Site Performance Across Browsers, Geographies and Networks
Testing Drupal Site Performance Across Browsers, Geographies and Networks
Acquia
 
A Web for Everyone
A Web for EveryoneA Web for Everyone
A Web for Everyone
jameswillweb
 
The Mobile Platform World
The Mobile Platform WorldThe Mobile Platform World
The Mobile Platform World
Matt Evans
 
Mobile ux sot a and challenges
Mobile ux sot a and challengesMobile ux sot a and challenges
Mobile ux sot a and challenges
Human Interface Group
 
The future of the CMS
The future of the CMSThe future of the CMS
The future of the CMS
InVision App
 

What's hot (20)

Design4Drupal Boston 2013 - Bumps in the Road to Responsive
Design4Drupal Boston 2013 - Bumps in the Road to ResponsiveDesign4Drupal Boston 2013 - Bumps in the Road to Responsive
Design4Drupal Boston 2013 - Bumps in the Road to Responsive
 
SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013
 
Responsive Web Design - Introduction & Workflow Overview
Responsive Web Design - Introduction & Workflow OverviewResponsive Web Design - Introduction & Workflow Overview
Responsive Web Design - Introduction & Workflow Overview
 
2 bootstrap-3-m1-slides
2 bootstrap-3-m1-slides2 bootstrap-3-m1-slides
2 bootstrap-3-m1-slides
 
Responsive web design ppt
Responsive web design pptResponsive web design ppt
Responsive web design ppt
 
UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentationsUX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
UX Alive Conference speaker is Vitaly Friedman (Smashing Magazine) presentations
 
University of Portsmouth Library: A practical approach to Responsive Design
University of Portsmouth Library: A practical approach to Responsive Design University of Portsmouth Library: A practical approach to Responsive Design
University of Portsmouth Library: A practical approach to Responsive Design
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Responsive web design with various grids and frameworks comparison
Responsive web design with various grids and frameworks comparisonResponsive web design with various grids and frameworks comparison
Responsive web design with various grids and frameworks comparison
 
Specialise or cross-skill
Specialise or cross-skillSpecialise or cross-skill
Specialise or cross-skill
 
Responsive Design and Information Architecture with Oracle Web Center Content...
Responsive Design and Information Architecture with Oracle Web Center Content...Responsive Design and Information Architecture with Oracle Web Center Content...
Responsive Design and Information Architecture with Oracle Web Center Content...
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Cm i padwebdev_lunch_learn
Cm i padwebdev_lunch_learnCm i padwebdev_lunch_learn
Cm i padwebdev_lunch_learn
 
The future of BYU web design
The future of BYU web designThe future of BYU web design
The future of BYU web design
 
Stc 2015 preparing legacy projects for responsive design - technical issues
Stc 2015   preparing legacy projects for responsive design - technical issuesStc 2015   preparing legacy projects for responsive design - technical issues
Stc 2015 preparing legacy projects for responsive design - technical issues
 
Testing Drupal Site Performance Across Browsers, Geographies and Networks
Testing Drupal Site Performance Across Browsers, Geographies and NetworksTesting Drupal Site Performance Across Browsers, Geographies and Networks
Testing Drupal Site Performance Across Browsers, Geographies and Networks
 
A Web for Everyone
A Web for EveryoneA Web for Everyone
A Web for Everyone
 
The Mobile Platform World
The Mobile Platform WorldThe Mobile Platform World
The Mobile Platform World
 
Mobile ux sot a and challenges
Mobile ux sot a and challengesMobile ux sot a and challenges
Mobile ux sot a and challenges
 
The future of the CMS
The future of the CMSThe future of the CMS
The future of the CMS
 

Similar to Mobile Best Practices

Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
Julia Vi
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
Mike Wilcox
 
Using Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work EverywhereUsing Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work Everywhere
Chris Love
 
HTML and Responsive Design
HTML and Responsive Design HTML and Responsive Design
HTML and Responsive Design
Mindy McAdams
 
Node.js 101
 Node.js 101 Node.js 101
Node.js 101
FITC
 
There Is No Mobile: An Introduction To Responsive Web Design
There Is No Mobile: An Introduction To Responsive Web DesignThere Is No Mobile: An Introduction To Responsive Web Design
There Is No Mobile: An Introduction To Responsive Web Design
Chris Love
 
FITC - Bootstrap Unleashed
FITC - Bootstrap UnleashedFITC - Bootstrap Unleashed
FITC - Bootstrap Unleashed
Rami Sayar
 
Responsive Web Design - Why and How
Responsive Web Design - Why and HowResponsive Web Design - Why and How
Responsive Web Design - Why and How
Judi Wunderlich
 
How to Project-Manage and Implement a Responsive Website
How to Project-Manage and Implement a Responsive WebsiteHow to Project-Manage and Implement a Responsive Website
How to Project-Manage and Implement a Responsive Website
Jj Jurgens
 
Reboot-Typography.pptx reboot typography to help you in research
Reboot-Typography.pptx reboot typography to help you in researchReboot-Typography.pptx reboot typography to help you in research
Reboot-Typography.pptx reboot typography to help you in research
AadiChauhan2
 
Talk 03 responsive-web-design
Talk 03 responsive-web-designTalk 03 responsive-web-design
Talk 03 responsive-web-design
Monkeyshot
 
Monkeytalk Fall 2012 - Responsive Web Design
Monkeytalk Fall 2012 - Responsive Web DesignMonkeytalk Fall 2012 - Responsive Web Design
Monkeytalk Fall 2012 - Responsive Web Design
Serge Hufkens
 
Rethinking accessibility related best practices for CSS in the modern age
Rethinking accessibility related best practices for CSS in the modern ageRethinking accessibility related best practices for CSS in the modern age
Rethinking accessibility related best practices for CSS in the modern age
shwetank
 
Responsive Web Design: Tips and Tricks
Responsive Web Design: Tips and TricksResponsive Web Design: Tips and Tricks
Responsive Web Design: Tips and Tricks
Gautam Krishnan
 
CSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignCSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive Design
Zoe Gillenwater
 
Webinar Recording "Best Practices in RWD - Responsive Web Design"
Webinar Recording "Best Practices in RWD - Responsive Web Design"Webinar Recording "Best Practices in RWD - Responsive Web Design"
Webinar Recording "Best Practices in RWD - Responsive Web Design"
Sachin Katariya
 
CSS3: Using media queries to improve the web site experience
CSS3: Using media queries to improve the web site experienceCSS3: Using media queries to improve the web site experience
CSS3: Using media queries to improve the web site experience
Zoe Gillenwater
 
Web designtrends 5-29-2013
Web designtrends 5-29-2013Web designtrends 5-29-2013
Web designtrends 5-29-2013
Angela Bowman
 
Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18
Frédéric Harper
 
Responsive Design Overview for UB CIT
Responsive Design Overview for UB CITResponsive Design Overview for UB CIT
Responsive Design Overview for UB CIT
Adrian Roselli
 

Similar to Mobile Best Practices (20)

Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
 
Using Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work EverywhereUsing Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work Everywhere
 
HTML and Responsive Design
HTML and Responsive Design HTML and Responsive Design
HTML and Responsive Design
 
Node.js 101
 Node.js 101 Node.js 101
Node.js 101
 
There Is No Mobile: An Introduction To Responsive Web Design
There Is No Mobile: An Introduction To Responsive Web DesignThere Is No Mobile: An Introduction To Responsive Web Design
There Is No Mobile: An Introduction To Responsive Web Design
 
FITC - Bootstrap Unleashed
FITC - Bootstrap UnleashedFITC - Bootstrap Unleashed
FITC - Bootstrap Unleashed
 
Responsive Web Design - Why and How
Responsive Web Design - Why and HowResponsive Web Design - Why and How
Responsive Web Design - Why and How
 
How to Project-Manage and Implement a Responsive Website
How to Project-Manage and Implement a Responsive WebsiteHow to Project-Manage and Implement a Responsive Website
How to Project-Manage and Implement a Responsive Website
 
Reboot-Typography.pptx reboot typography to help you in research
Reboot-Typography.pptx reboot typography to help you in researchReboot-Typography.pptx reboot typography to help you in research
Reboot-Typography.pptx reboot typography to help you in research
 
Talk 03 responsive-web-design
Talk 03 responsive-web-designTalk 03 responsive-web-design
Talk 03 responsive-web-design
 
Monkeytalk Fall 2012 - Responsive Web Design
Monkeytalk Fall 2012 - Responsive Web DesignMonkeytalk Fall 2012 - Responsive Web Design
Monkeytalk Fall 2012 - Responsive Web Design
 
Rethinking accessibility related best practices for CSS in the modern age
Rethinking accessibility related best practices for CSS in the modern ageRethinking accessibility related best practices for CSS in the modern age
Rethinking accessibility related best practices for CSS in the modern age
 
Responsive Web Design: Tips and Tricks
Responsive Web Design: Tips and TricksResponsive Web Design: Tips and Tricks
Responsive Web Design: Tips and Tricks
 
CSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignCSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive Design
 
Webinar Recording "Best Practices in RWD - Responsive Web Design"
Webinar Recording "Best Practices in RWD - Responsive Web Design"Webinar Recording "Best Practices in RWD - Responsive Web Design"
Webinar Recording "Best Practices in RWD - Responsive Web Design"
 
CSS3: Using media queries to improve the web site experience
CSS3: Using media queries to improve the web site experienceCSS3: Using media queries to improve the web site experience
CSS3: Using media queries to improve the web site experience
 
Web designtrends 5-29-2013
Web designtrends 5-29-2013Web designtrends 5-29-2013
Web designtrends 5-29-2013
 
Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18
 
Responsive Design Overview for UB CIT
Responsive Design Overview for UB CITResponsive Design Overview for UB CIT
Responsive Design Overview for UB CIT
 

Recently uploaded

How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
HackersList
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
Stephanie Beckett
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
Tatiana Al-Chueyr
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions
 
The Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU CampusesThe Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU Campuses
Larry Smarr
 
WPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide DeckWPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide Deck
Lidia A.
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
Neo4j
 
Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
Aurora Consulting
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
Safe Software
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
SynapseIndia
 
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
ArgaBisma
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
ScyllaDB
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
Vijayananda Mohire
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
BookNet Canada
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
RaminGhanbari2
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
UiPathCommunity
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
jackson110191
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
ScyllaDB
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
SynapseIndia
 

Recently uploaded (20)

How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
 
The Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU CampusesThe Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU Campuses
 
WPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide DeckWPRiders Company Presentation Slide Deck
WPRiders Company Presentation Slide Deck
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
 
Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
 
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
 

Mobile Best Practices

  • 2. Responsive Design • Responsive design is the practice of designing flexible layouts that create a user optimized experience across multiple viewing contexts. • Responsive design is not new. • Responsive design is synonomous with CSS3 Media Queries.
  • 3. CSS3 Media Queries • CSS Media Queries give us a way to control the application of styles based on the presence or absence of specific media features • Not exactly new (media="print/screen/handheld"), but now we can apply logic: o <link rel="stylesheet" href="awesome.css" media="screen and (min-width:500px)" /> o @media only screen and (min-width:480px) and (max- width:767px) and (orientation : landscape) { /* Insert Awesome Style Here */ } • Media queries can be either inline or linked
  • 4. What's so cool about responsive design and what's not? The Good The Ugly • Reduced development time. • Media query support isn't great • Fewer files to maintain. • Unnecessary resource loading • Looks impressive when viewed • Often results in on a desktop. symmetrical, uninspired • Fun to design and develop. layouts. • Earns you instant street cred in • Assumes that individuals browse the same way across devices. the web dev community since it's been a buzzword for several • Can make too many years and running. compromises resulting in both • Endorsed by unicorns. mediocre or bad desktop and mobile sites.
  • 6. Unnecessary Resource Loading • elements set to display:none still load in the background. This includes those rascally bandwidth sucking <img>,<script> driven widgets, <embed>, <object>. • All style sheets linked in a page, even if conditionally not applicable through media queries, will load. • Background images, even if overwritten by another through a perfectly valid cascade, will still load in WebKit based browsers • While we can make images fluid, the size of the embedded images remains the same between layouts. • @font-face web fonts can add overhead and affect performance unless applied carefully
  • 8. What we can do minimize the problems of responsive design A Bit of Good News • While WebKit browsers download every stylesheet attached to a page as well as fetch every image/element set to display:none, they will only display background-image and other assets like @font-face if they apply to an applicable @media context (screen-width/max- width, portrait/landscape) • What does this mean? • If we set the mobile layout first (the absence of the capability to read media queries is the first media query), then we can progressively layer on images and styles that DO NOT apply to mobile and thus WILL NOT be loaded at all in that context. • For this, CSS sprites and JavaScript based polyfills will be your best friend
  • 9. CSS Sprites • Using CSS sprites will decrease loading time for any site you build, especially for mobile. • Drag and drop tools like Stitches (http://draeton.github.com/stitches/) and Spritecow (http://www.spritecow.com/) take the pain out of creating sprites and are FOSS. • Creating sprites for specific @media contexts will allow you load only the assets necessary for that specific view and will only take a single HTTP request.
  • 10. CSS3 Media query polyfills • Using the mobile first approach saves bandwidth for mobile users but will make your desktop layout invisible to users without advanced browsers(like those who still use IE 8 or less and Windows Phone 7). This leaves two choices: an IE conditional stylesheet or a JavaScript to hack in support for this missing feature(a polyfill). • While there are dozens out there, I recommend Respond.js(https://github.com/scottjehl/Respond) because of the excellent support for inline media queries. • So what happens if someone who needs Respond.js turns off JS? • They're presented with the simplified mobile site, but all of the primary content is still visible and available. Progressive enhancement and graceful degredation-- yay!
  • 11. Responsive best practices in summary • Design and code your CSS with mobile in mind first. Use CSS3 media queries to apply desktop layout and styles and make sure to limit resources to their appropriate context so they won't all be loaded. • Use CSS sprites to group elements by context, which will reduce overhead and excess HTTP requests. It's just good karma. • Setting elements to display:none will only visually hide an element, not prevent it from loading. Choose what you embed on the page carefully. • Make content area images fluid by applying width:100%; height: auto but don't be afraid to apply a min-width and max-width to prevent distortion. • Use a CSS3 media query polyfill to make sure less capable browsers are invited to the party but can still access the content if they aren't. • Use a meta viewport tag to it prevent scaling issues on iOS devices and to maintain precise control over how your site is viewed <meta name="viewport" content="width=device-width">
  • 12. Dedicated Mobile Site/Theme The Good The Ugly • Can be more useful when implementing a • Rely on UA sniffing to redirect users to mobile optimized version of a more the correct domain or serve up the complex and varied site. correct theme, which is an inexact • Can serve scaled versions images and science. Those who fall through the completely remove sections and scripts cracks can always find a link at the not present or needed in the mobile bottom to go to the mobile site, so this version, thereby reducing overhead by as isn't necessarily a bad thing. much as 80% compared to responsive • Provides a second site/theme to counterparts. maintain. • Are ultimately easier to create content for because there is no concern of mucking up the layout for both the desktop and mobile site. • Allows for different use cases than the desktop site/theme.
  • 13. Which is Which? • Ultimately it is good to have both tricks up your sleeve as MO state government sites tend to be complex and varied. Sometimes a simple responsive site will work wonderfully, sometimes it won't. • Luck favors the prepared.