SlideShare a Scribd company logo
Responsive DesignTopic :
Milan AdamovskyPresenter :
05 / 30 / 2013Date :
http://milan.adamovsky.comBlog :
milan.adamovsky@gmail.comEmail :
7/2/2013 Prepared & Presented by Milan Adamovsky 2
• Fixed
• Fluid
• Elastic
• Accessible
• Responsive
• Adaptive
Design Evolution
Paradigm Adoption
• Static
7/2/2013 Prepared & Presented by Milan Adamovsky 3
• Content pushed inline
• Pixels
• Nothing resizes
• No specifics
• Minimum 640px width
Fixed Positions
Fixed Dimensions
• Nothing repositions
• Pixels
• System agnostic
• Simplest implementation
Considerations
• Browser agnostic
7/2/2013 Prepared & Presented by Milan Adamovsky 4
• Fixed
• Fluid
• Elastic
• Accessible
• Responsive
• Adaptive
Design Evolution
Paradigm Adoption
• Static
960
7/2/2013
Prepared & Presented by Milan
Adamovsky
5
• Fixed
• Fluid
• Elastic
• Accessible
• Responsive
• Adaptive
Design Evolution
Paradigm Adoption
• Static
7/2/2013 Prepared & Presented by Milan Adamovsky 6
• Floated
• No explicit resizing
• Predecessor to responsive
• Keep information visible
• Width agnostic
Elements
Purpose
• Shifts according to container
• Mobile friendly
• Avoid fixed content
• Less predictable
Considerations
• Mix with elastic design
• Supported in all browsers
7/2/2013 Prepared & Presented by Milan Adamovsky 7
• Fixed
• Fluid
• Elastic
• Accessible
• Responsive
• Adaptive
Design Evolution
Paradigm Adoption
• Static
% %
7/2/2013 Prepared & Presented by Milan Adamovsky 8
• Fixed
• Fluid
• Elastic
• Accessibility
• Responsive
• Adaptive
Design Evolution
Paradigm Adoption
• Static
7/2/2013 Prepared & Presented by Milan Adamovsky 9
• Fixed
• Fluid
• Elastic
• Accessible
• Responsive
• Adaptive
Design Evolution
Paradigm Adoption
• Static
7/2/2013 Prepared & Presented by Milan Adamovsky 10
• Do not use JavaScript
• Only use CSS engine
• No hidden cheat markup
• Keep page lightweight
• No markup regeneration
Dos & Don’ts
• Reuse same markup
• Use @media queries
• Speed is key
• Not same as adaptive
Reminders
• @import downloads files
• Not supported < IE9
• Use @import at-rule
• Mobile first
• Use min-width
7/2/2013 Prepared & Presented by Milan Adamovsky 11
• Fixed
• Fluid
• Elastic
• Accessible
• Responsive
• Adaptive
Design Evolution
Paradigm Adoption
• Static
7/2/2013 Prepared & Presented by Milan Adamovsky 12
• Do not use JavaScript
• Only use CSS engine
• No hidden cheat markup
• Keep page lightweight
• No markup regeneration
Dos & Don’ts
• Different markup per device
• Use server-side logic
• Keep CSS minimal
• Keep JS minimal
Reminders
• Keep markup minimal
• Supported in all browsers
• Only target given device
• Mobile first
7/2/2013 Prepared & Presented by Milan Adamovsky 13
• Progressively enhance
• Use of CSS3
• Use of @media
• Fluid grids *
• EMs *
Responsive Design Basics
• Minimum widths
• Flexible images
• Respond to any device
• Respond to any width
Idea
• Ethan Marcotte
* Optional
• Flexible videos
• Fluid type *
7/2/2013 Prepared & Presented by Milan Adamovsky 14
Graceful Degradation Example
@media screen and (max-width: 320px)
{
body
{
background-color: #fff;
}
}
@media screen and (max-width: 480px)
{
body
{
background-color: #000;
}
}
7/2/2013 Prepared & Presented by Milan Adamovsky 15
Progressive Enhancement Example
@media screen and (min-width: 0px)
{
body
{
background-color: #fff;
}
}
@media screen and (min-width: 320px)
{
body
{
background-color: #000;
}
}
7/2/2013 Prepared & Presented by Milan Adamovsky 16
CSS File Override
0 320 480 600 992 1382
Design Benefits
• Progressively add styles as they are needed for given min-width
• Use the zero min-width as the site’s base style
• Prevents heavier device styles from loading in lighter devices
• Promote a disciplined style management culture to avoid bloat
7/2/2013 Prepared & Presented by Milan Adamovsky 17
• What do you need ?
• What do you want ?
Stop & Think
• What’s best for you ?
• What to leverage ?
• What device support ?
• Borrows responsive concepts
• Borrows elastic concepts
• Borrows fluid concepts
• Does not rely on grids
• Does not rely on EMs
Our Solution
• Borrows adaptive concepts
• Uses assembler
• Uses minifier
• Uses global include function
7/2/2013 Prepared & Presented by Milan Adamovsky 18
File Hierarchy
• Router CSS file *
• Two tiers
• Section filenames
http://www.com/contact/index.html
Section: contact
First Tier
• min-width
Second Tier
• max-width
7/2/2013 Prepared & Presented by Milan Adamovsky 19
Typical Section CSS File
• Proper order
• No media queries
• Min-width CSS only
http://www.com/contact/index.html
Section: contact
Min-width: 320
selector
{
property: value;
}
.some_class
{
property: value;
}
• Allow overrides
Design Benefits
• Cache server support
• IE8 and older support
• Mobile desktop ready
7/2/2013 Prepared & Presented by Milan Adamovsky 20
Min-width: 0
div
{
border: 1;
}
Min-width: 480
div
{
border: 3;
}
Min-width: 768
div
{
border: 5;
}
7/2/2013 Prepared & Presented by Milan Adamovsky 21
Router CSS File @import url(global.css);
@import url(footer.css);
@import url(header.css);
@media … min-width: 320px
@import url(320/contact.css);
@media … min-width: 480px;
@import url(480/contact.css);
@media … min-width: 600px;
@import url(600/contact.css);
@import url(600/footer.css);
@import url(600/header.css);
@media … min-width: 768px;
@import url(768/contact.css);
@media … min-width: 992px;
@import url(992/contact.css);
@import url(992/footer.css);
@media … min-width: 1382px;
@import
url(1382/contact.css);
• Manages media queries
• Contains media cut-offs
• One router per section
• Adaptive ready
• Dependency overview
• Clean separation
Major Disadvantage
• All files download
7/2/2013 Prepared & Presented by Milan Adamovsky 22
Media Query Begin Files
• Section agnostic
• Only one media query
• No closing brace
@media only screen and (min-width: 320px)
{
Media Query End Files
• Only a closing brace
}
7/2/2013 Prepared & Presented by Milan Adamovsky 23
@media only screen and (min-width: 320px)
{
}
File: /@media/320
File: /320/contact.css
File: /@media/end
body
{
background-color: #000;
}
7/2/2013 Prepared & Presented by Milan Adamovsky 24
@media only screen and (min-width: 320px) and (max-width: 480px)
{
}
File: /@media/320/480
File: /320/480/contact.css
File: /@media/end
body
{
background-color: #fff;
}
7/2/2013 Prepared & Presented by Milan Adamovsky 25
Homepage: https://github.com/buunguyen/combres
Configuration: XML
Integration: ASP.NET
Assemblers
• Combres
Homepage: http://www.gruntjs.com
Configuration: JavaScript
Integration: Command-line, NodeJS
• GruntJS
7/2/2013 Prepared & Presented by Milan Adamovsky 26
Phone
Tablet
Desktop
Full
Responsive
Adaptive
7/2/2013 Prepared & Presented by Milan Adamovsky 27
File Hierarchy
• Optional temp folder
• Three tiers
http://www.com/contact/index.html
Section: contact
First Tier
• Paradigm
Second Tier
• Buckets
Third Tier
• CSS files
Buckets: phone, tablet
desktop, full
7/2/2013 Prepared & Presented by Milan Adamovsky 28
• Bucket number is arbitrary
• Bucket always pre-built
Noteworthy
• Buckets are arbitrary
• Tablet builds on Phone
• Phone builds on “base”
• Full builds on all
• Full has no @media queries
• Assembler pre-builds all files
Workflow Logic
• Desktop builds on Tablet
• Device is resolved
• Device is passed to function
• Function include pre-built file
7/2/2013 Prepared & Presented by Milan Adamovsky 29
Lifecycle
Request Cache Server Web Server Web Page
User Agent Device Type
Phone
Tablet
Desktop
Full
CSS Files includeCSS()
Pre-build
function includeCSS(section)
{
html csshtml;
string x = "adaptive/" + request.device + "/" + section + ".css";
csshtml = "<link href=' + x + ' rel='stylesheet' type='text/css'>";
return csshtml;
}
7/2/2013 Prepared & Presented by Milan Adamovsky 30
Include Function
• Takes one parameters
• Included on every page
• Returns link markup
• PHP, ASP, JSP, SSI, etc.
Achieved Goals
• No flicker
• Do not rely on JavaScript
• No copy & paste
• Central maintenance
<link href="adaptive/tablet/contact.css" rel="stylesheet" type="text/css">
7/2/2013 Prepared & Presented by Milan Adamovsky 31
Include Function Example
<%
includeCSS('contact');
%>
Function Output
function includeCSS(section)
{
html csshtml;
string device = querystring["device"] || request.device;
string x = "adaptive/" + device + "/" + section + ".css";
csshtml = "<link href=' + x + ' rel='stylesheet' type='text/css'>";
return csshtml;
}
7/2/2013 Prepared & Presented by Milan Adamovsky 32
Optional Improvement
• Ideal for testing
• Force device type
Usage
• Append ?device= to URL
7/2/2013 Prepared & Presented by Milan Adamovsky 33
Mobile Scaling
<meta name="viewport"
content="width=device-width,
initial-scale=1.0,
maximum-scale=1.0">
html
{
-webkit-text-size-adjust: 100%;
}
• iPhone doesn’t
• Android auto-scales
• Do not use ; delimiter[1]
• Use constants
• Play with options
HTML: Auto-scale
CSS: Text inflation
Text Inflation
• Not standardized
• Never use none
• Opt-out not in
text-size-adjust
-moz-text-size-adjust
-ms-text-size-adjust
7/2/2013 Prepared & Presented by Milan Adamovsky 34
Text Inflation
7/2/2013
Prepared & Presented by Milan
Adamovsky
35
• Less custom
• More uniform
• More predictable
• Responsive Ready
• Percentage based
Grid Architecture
• Interval spacing
• More maintainable
• Think in columns
• Often 12-column
7/2/2013 Prepared & Presented by Milan Adamovsky 36
• Market traction
Grid Systems
• Do not reinvent the wheel
• Align business to think in grid
• Grid System Generator (http://www.gridsystemgenerator.com)
Tools
• Scaffolding (http://twitter.github.io/bootstrap/scaffolding.html)
• 960 Grid System (http://www.960.gs)
7/2/2013 Prepared & Presented by Milan Adamovsky 37
Elastic Images <img src=somepic.jpg>
img
{
max-width: 100%;
}
• Image element
• Resize proportionally
• Background sprites: no
• Foreground sprites: yes
resize
• Percentage of container
Implementation
• Can be any percentage
• Extremely easy
• Observe pixelation
7/2/2013 Prepared & Presented by Milan Adamovsky 38
Elastic Sprite Example <div id=logo_container>
<div id=logo_content>
</div>
</div>
#logo_container
{
position: relative;
}
#logo_content
{
background-image: url(..);
background-position: 50% 0;
background-repeat: no-
repeat;
background-size: 100% auto;
display: block;
padding-top: 50%;
width: 100%;
}
• Sprite is content
• Always use container
• Positioned container
• Normal sprite
• Width is required
• Padding defines height
Practical Use
• Replaces elastic image
7/2/2013 Prepared & Presented by Milan Adamovsky 39
Internet Explorer Support
<!--[if lt IE 9]>
<script src="http://css3-mediaqueries-js.googlecode.com/
svn/trunk/css3-mediaqueries.js"></script>
<![endif]-->
Notice
• JavaScript based shim
• Doesn’t work with @import
• Works on IE5+ • Buggy
• Use sparingly, if at all
7/2/2013 Prepared & Presented by Milan Adamovsky 40
Bing SEO *
By outputting only one URL for the same content, you will have the following benefits:
1. You have more ranking signals coming to this URL. Example: the vast majority of mobile URLs do not have inbound links from other websites
as people do not link to mobiles URLs like they link to regular web-situated URLs.
2. This is also less search engine crawler traffic coming to your web servers, which is especially useful for large websites. Fewer URLs to crawl
reduces the bandwidth our crawlers consume.
3. Less work (and potentially less cost) building, updating and maintaining a stand-alone mobile-focused website.
Now that you have a single URL for each piece of your content, how do you optimize your website for different platforms?
1. By performing client browser detection (user agent, customer preferences, etc.), you can still optimize the display for the device your
customers are using. This topic is presented in detail in the document Designing Web Sites for Phone Browsers; please note that this
document does touch briefly on the subject of redirection to alternate URLs for mobile content, which is not the approach we recommend for
best SEO results.
Google SEO *
Google supports smartphone-optimized sites in three configurations:
1. Sites that use responsive web design, i.e. sites that serve all devices on the same set of URLs, with each URL serving the same HTML to all
devices and using just CSS to change how the page is rendered on the device. This is Google's recommended configuration.
2. Sites that dynamically serve all devices on the same set of URLs, but each URL serves different HTML (and CSS) depending on whether the
user agent is a desktop or a mobile device.
3. Sites that have separate mobile and desktop URLs.
7/2/2013 Prepared & Presented by Milan Adamovsky 41
Mobile Tester
Mobile Resizer
Useful Testing Tools
• Chrome Browser Add-ons
Web Developer
• FireFox Browser Add-ons
Keynote DeviceAnywhere (http://www.deviceanywhere.com)
• Device Emulators
AppThwack (https://appthwack.com)
MobilePhoneEmulator (http://www.mobilephoneemulator.com)
7/2/2013 Prepared & Presented by Milan Adamovsky 42
1. Extrapolate all media query blocks into their own files
2. File these files into their respective folders
3. Make minor adjustments
Conversion Questions
• How do I convert our scattered responsive implementation ?
1. Dump your old file into a 0/legacy.css
3. Gradually extrapolate sections into respective files
4. Remove legacy.css
• How do I convert our non-responsive implementation ?
2. Include 0/legacy.css as your global base

More Related Content

What's hot

Frontend architecture design for large(r) team final
Frontend architecture design for large(r) team   finalFrontend architecture design for large(r) team   final
Frontend architecture design for large(r) team final
Chadchapol Vittavutkarnvej
 
jQuery Conference 2012 keynote
jQuery Conference 2012 keynotejQuery Conference 2012 keynote
jQuery Conference 2012 keynote
dmethvin
 
Обзор Material Design Light (MDL). Александр Кашеверов.
Обзор Material Design Light (MDL). Александр Кашеверов.Обзор Material Design Light (MDL). Александр Кашеверов.
Обзор Material Design Light (MDL). Александр Кашеверов.
DataArt
 
Flash And Dom
Flash And DomFlash And Dom
Flash And Dom
Mike Wilcox
 
jQuery Conference Boston 2011 CouchApps
jQuery Conference Boston 2011 CouchAppsjQuery Conference Boston 2011 CouchApps
jQuery Conference Boston 2011 CouchApps
Bradley Holt
 
Developing JavaScript Widgets
Developing JavaScript WidgetsDeveloping JavaScript Widgets
Developing JavaScript Widgets
Bob German
 
jQuery Chicago 2014 - Next-generation JavaScript Testing
jQuery Chicago 2014 - Next-generation JavaScript TestingjQuery Chicago 2014 - Next-generation JavaScript Testing
jQuery Chicago 2014 - Next-generation JavaScript Testing
Vlad Filippov
 
Going Node.js at Netflix
Going Node.js at NetflixGoing Node.js at Netflix
Going Node.js at Netflix
micahr
 
Web components, so close!
Web components, so close!Web components, so close!
Web components, so close!
Aleks Zinevych
 
Treeshaking your CSS
Treeshaking your CSSTreeshaking your CSS
Treeshaking your CSS
James Stone
 

What's hot (10)

Frontend architecture design for large(r) team final
Frontend architecture design for large(r) team   finalFrontend architecture design for large(r) team   final
Frontend architecture design for large(r) team final
 
jQuery Conference 2012 keynote
jQuery Conference 2012 keynotejQuery Conference 2012 keynote
jQuery Conference 2012 keynote
 
Обзор Material Design Light (MDL). Александр Кашеверов.
Обзор Material Design Light (MDL). Александр Кашеверов.Обзор Material Design Light (MDL). Александр Кашеверов.
Обзор Material Design Light (MDL). Александр Кашеверов.
 
Flash And Dom
Flash And DomFlash And Dom
Flash And Dom
 
jQuery Conference Boston 2011 CouchApps
jQuery Conference Boston 2011 CouchAppsjQuery Conference Boston 2011 CouchApps
jQuery Conference Boston 2011 CouchApps
 
Developing JavaScript Widgets
Developing JavaScript WidgetsDeveloping JavaScript Widgets
Developing JavaScript Widgets
 
jQuery Chicago 2014 - Next-generation JavaScript Testing
jQuery Chicago 2014 - Next-generation JavaScript TestingjQuery Chicago 2014 - Next-generation JavaScript Testing
jQuery Chicago 2014 - Next-generation JavaScript Testing
 
Going Node.js at Netflix
Going Node.js at NetflixGoing Node.js at Netflix
Going Node.js at Netflix
 
Web components, so close!
Web components, so close!Web components, so close!
Web components, so close!
 
Treeshaking your CSS
Treeshaking your CSSTreeshaking your CSS
Treeshaking your CSS
 

Similar to Responsive & Adaptive Web Design

CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media Queries
Man Math
 
Responsive web design
Responsive web designResponsive web design
Responsive web design
psophy
 
Responsive Web Design On Student's day
Responsive Web Design On Student's day Responsive Web Design On Student's day
Responsive Web Design On Student's day
psophy
 
Levent-Gurses' Introduction to Web Components & Polymer
Levent-Gurses' Introduction to Web Components & PolymerLevent-Gurses' Introduction to Web Components & Polymer
Levent-Gurses' Introduction to Web Components & Polymer
Erik Isaksen
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
Mike Wilcox
 
Digibury: Getting your web presence mobile ready - David Walker
Digibury: Getting your web presence mobile ready - David WalkerDigibury: Getting your web presence mobile ready - David Walker
Digibury: Getting your web presence mobile ready - David Walker
Lizzie Hodgson
 
Performance & Responsive Web Design
Performance & Responsive Web DesignPerformance & Responsive Web Design
Performance & Responsive Web Design
Zach Leatherman
 
Freelancer Weapons of mass productivity
Freelancer Weapons of mass productivityFreelancer Weapons of mass productivity
Freelancer Weapons of mass productivity
Gregg Coppen
 
MW2011 Grid-based Web Design presentation
MW2011 Grid-based Web Design presentationMW2011 Grid-based Web Design presentation
MW2011 Grid-based Web Design presentation
Charlie Moad
 
Chicago Tech Day Jan 2015: RWD
Chicago Tech Day Jan 2015: RWDChicago Tech Day Jan 2015: RWD
Chicago Tech Day Jan 2015: RWD
Akamai Technologies
 
Workshop About Software Engineering Skills 2019
Workshop About Software Engineering Skills 2019Workshop About Software Engineering Skills 2019
Workshop About Software Engineering Skills 2019
PhuocNT (Fresher.VN)
 
02.introduction to android
02.introduction to android02.introduction to android
02.introduction to android
Malik Abualzait
 
Proactive Responsive Design
Proactive Responsive DesignProactive Responsive Design
Proactive Responsive Design
Nathan Smith
 
Responsive content
Responsive contentResponsive content
Responsive content
honzie
 
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
Yiannis Konstantakopoulos
 
implement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflowimplement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflow
WordPress
 
Mobile Best Practices
Mobile Best PracticesMobile Best Practices
Mobile Best Practices
mintersam
 
Bootstrap Introduction
Bootstrap IntroductionBootstrap Introduction
Bootstrap Introduction
Diliara Nasirova
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
Vitaly Friedman
 
presentation-ACrashCourseinHandlingLargeBIMProjects2.pptx
presentation-ACrashCourseinHandlingLargeBIMProjects2.pptxpresentation-ACrashCourseinHandlingLargeBIMProjects2.pptx
presentation-ACrashCourseinHandlingLargeBIMProjects2.pptx
JoelBautista42
 

Similar to Responsive & Adaptive Web Design (20)

CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media Queries
 
Responsive web design
Responsive web designResponsive web design
Responsive web design
 
Responsive Web Design On Student's day
Responsive Web Design On Student's day Responsive Web Design On Student's day
Responsive Web Design On Student's day
 
Levent-Gurses' Introduction to Web Components & Polymer
Levent-Gurses' Introduction to Web Components & PolymerLevent-Gurses' Introduction to Web Components & Polymer
Levent-Gurses' Introduction to Web Components & Polymer
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
 
Digibury: Getting your web presence mobile ready - David Walker
Digibury: Getting your web presence mobile ready - David WalkerDigibury: Getting your web presence mobile ready - David Walker
Digibury: Getting your web presence mobile ready - David Walker
 
Performance & Responsive Web Design
Performance & Responsive Web DesignPerformance & Responsive Web Design
Performance & Responsive Web Design
 
Freelancer Weapons of mass productivity
Freelancer Weapons of mass productivityFreelancer Weapons of mass productivity
Freelancer Weapons of mass productivity
 
MW2011 Grid-based Web Design presentation
MW2011 Grid-based Web Design presentationMW2011 Grid-based Web Design presentation
MW2011 Grid-based Web Design presentation
 
Chicago Tech Day Jan 2015: RWD
Chicago Tech Day Jan 2015: RWDChicago Tech Day Jan 2015: RWD
Chicago Tech Day Jan 2015: RWD
 
Workshop About Software Engineering Skills 2019
Workshop About Software Engineering Skills 2019Workshop About Software Engineering Skills 2019
Workshop About Software Engineering Skills 2019
 
02.introduction to android
02.introduction to android02.introduction to android
02.introduction to android
 
Proactive Responsive Design
Proactive Responsive DesignProactive Responsive Design
Proactive Responsive Design
 
Responsive content
Responsive contentResponsive content
Responsive content
 
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
 
implement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflowimplement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflow
 
Mobile Best Practices
Mobile Best PracticesMobile Best Practices
Mobile Best Practices
 
Bootstrap Introduction
Bootstrap IntroductionBootstrap Introduction
Bootstrap Introduction
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
 
presentation-ACrashCourseinHandlingLargeBIMProjects2.pptx
presentation-ACrashCourseinHandlingLargeBIMProjects2.pptxpresentation-ACrashCourseinHandlingLargeBIMProjects2.pptx
presentation-ACrashCourseinHandlingLargeBIMProjects2.pptx
 

Recently uploaded

Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 

Recently uploaded (20)

Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 

Responsive & Adaptive Web Design

  • 1. Responsive DesignTopic : Milan AdamovskyPresenter : 05 / 30 / 2013Date : http://milan.adamovsky.comBlog : milan.adamovsky@gmail.comEmail :
  • 2. 7/2/2013 Prepared & Presented by Milan Adamovsky 2 • Fixed • Fluid • Elastic • Accessible • Responsive • Adaptive Design Evolution Paradigm Adoption • Static
  • 3. 7/2/2013 Prepared & Presented by Milan Adamovsky 3 • Content pushed inline • Pixels • Nothing resizes • No specifics • Minimum 640px width Fixed Positions Fixed Dimensions • Nothing repositions • Pixels • System agnostic • Simplest implementation Considerations • Browser agnostic
  • 4. 7/2/2013 Prepared & Presented by Milan Adamovsky 4 • Fixed • Fluid • Elastic • Accessible • Responsive • Adaptive Design Evolution Paradigm Adoption • Static 960
  • 5. 7/2/2013 Prepared & Presented by Milan Adamovsky 5 • Fixed • Fluid • Elastic • Accessible • Responsive • Adaptive Design Evolution Paradigm Adoption • Static
  • 6. 7/2/2013 Prepared & Presented by Milan Adamovsky 6 • Floated • No explicit resizing • Predecessor to responsive • Keep information visible • Width agnostic Elements Purpose • Shifts according to container • Mobile friendly • Avoid fixed content • Less predictable Considerations • Mix with elastic design • Supported in all browsers
  • 7. 7/2/2013 Prepared & Presented by Milan Adamovsky 7 • Fixed • Fluid • Elastic • Accessible • Responsive • Adaptive Design Evolution Paradigm Adoption • Static % %
  • 8. 7/2/2013 Prepared & Presented by Milan Adamovsky 8 • Fixed • Fluid • Elastic • Accessibility • Responsive • Adaptive Design Evolution Paradigm Adoption • Static
  • 9. 7/2/2013 Prepared & Presented by Milan Adamovsky 9 • Fixed • Fluid • Elastic • Accessible • Responsive • Adaptive Design Evolution Paradigm Adoption • Static
  • 10. 7/2/2013 Prepared & Presented by Milan Adamovsky 10 • Do not use JavaScript • Only use CSS engine • No hidden cheat markup • Keep page lightweight • No markup regeneration Dos & Don’ts • Reuse same markup • Use @media queries • Speed is key • Not same as adaptive Reminders • @import downloads files • Not supported < IE9 • Use @import at-rule • Mobile first • Use min-width
  • 11. 7/2/2013 Prepared & Presented by Milan Adamovsky 11 • Fixed • Fluid • Elastic • Accessible • Responsive • Adaptive Design Evolution Paradigm Adoption • Static
  • 12. 7/2/2013 Prepared & Presented by Milan Adamovsky 12 • Do not use JavaScript • Only use CSS engine • No hidden cheat markup • Keep page lightweight • No markup regeneration Dos & Don’ts • Different markup per device • Use server-side logic • Keep CSS minimal • Keep JS minimal Reminders • Keep markup minimal • Supported in all browsers • Only target given device • Mobile first
  • 13. 7/2/2013 Prepared & Presented by Milan Adamovsky 13 • Progressively enhance • Use of CSS3 • Use of @media • Fluid grids * • EMs * Responsive Design Basics • Minimum widths • Flexible images • Respond to any device • Respond to any width Idea • Ethan Marcotte * Optional • Flexible videos • Fluid type *
  • 14. 7/2/2013 Prepared & Presented by Milan Adamovsky 14 Graceful Degradation Example @media screen and (max-width: 320px) { body { background-color: #fff; } } @media screen and (max-width: 480px) { body { background-color: #000; } }
  • 15. 7/2/2013 Prepared & Presented by Milan Adamovsky 15 Progressive Enhancement Example @media screen and (min-width: 0px) { body { background-color: #fff; } } @media screen and (min-width: 320px) { body { background-color: #000; } }
  • 16. 7/2/2013 Prepared & Presented by Milan Adamovsky 16 CSS File Override 0 320 480 600 992 1382 Design Benefits • Progressively add styles as they are needed for given min-width • Use the zero min-width as the site’s base style • Prevents heavier device styles from loading in lighter devices • Promote a disciplined style management culture to avoid bloat
  • 17. 7/2/2013 Prepared & Presented by Milan Adamovsky 17 • What do you need ? • What do you want ? Stop & Think • What’s best for you ? • What to leverage ? • What device support ? • Borrows responsive concepts • Borrows elastic concepts • Borrows fluid concepts • Does not rely on grids • Does not rely on EMs Our Solution • Borrows adaptive concepts • Uses assembler • Uses minifier • Uses global include function
  • 18. 7/2/2013 Prepared & Presented by Milan Adamovsky 18 File Hierarchy • Router CSS file * • Two tiers • Section filenames http://www.com/contact/index.html Section: contact First Tier • min-width Second Tier • max-width
  • 19. 7/2/2013 Prepared & Presented by Milan Adamovsky 19 Typical Section CSS File • Proper order • No media queries • Min-width CSS only http://www.com/contact/index.html Section: contact Min-width: 320 selector { property: value; } .some_class { property: value; } • Allow overrides Design Benefits • Cache server support • IE8 and older support • Mobile desktop ready
  • 20. 7/2/2013 Prepared & Presented by Milan Adamovsky 20 Min-width: 0 div { border: 1; } Min-width: 480 div { border: 3; } Min-width: 768 div { border: 5; }
  • 21. 7/2/2013 Prepared & Presented by Milan Adamovsky 21 Router CSS File @import url(global.css); @import url(footer.css); @import url(header.css); @media … min-width: 320px @import url(320/contact.css); @media … min-width: 480px; @import url(480/contact.css); @media … min-width: 600px; @import url(600/contact.css); @import url(600/footer.css); @import url(600/header.css); @media … min-width: 768px; @import url(768/contact.css); @media … min-width: 992px; @import url(992/contact.css); @import url(992/footer.css); @media … min-width: 1382px; @import url(1382/contact.css); • Manages media queries • Contains media cut-offs • One router per section • Adaptive ready • Dependency overview • Clean separation Major Disadvantage • All files download
  • 22. 7/2/2013 Prepared & Presented by Milan Adamovsky 22 Media Query Begin Files • Section agnostic • Only one media query • No closing brace @media only screen and (min-width: 320px) { Media Query End Files • Only a closing brace }
  • 23. 7/2/2013 Prepared & Presented by Milan Adamovsky 23 @media only screen and (min-width: 320px) { } File: /@media/320 File: /320/contact.css File: /@media/end body { background-color: #000; }
  • 24. 7/2/2013 Prepared & Presented by Milan Adamovsky 24 @media only screen and (min-width: 320px) and (max-width: 480px) { } File: /@media/320/480 File: /320/480/contact.css File: /@media/end body { background-color: #fff; }
  • 25. 7/2/2013 Prepared & Presented by Milan Adamovsky 25 Homepage: https://github.com/buunguyen/combres Configuration: XML Integration: ASP.NET Assemblers • Combres Homepage: http://www.gruntjs.com Configuration: JavaScript Integration: Command-line, NodeJS • GruntJS
  • 26. 7/2/2013 Prepared & Presented by Milan Adamovsky 26 Phone Tablet Desktop Full Responsive Adaptive
  • 27. 7/2/2013 Prepared & Presented by Milan Adamovsky 27 File Hierarchy • Optional temp folder • Three tiers http://www.com/contact/index.html Section: contact First Tier • Paradigm Second Tier • Buckets Third Tier • CSS files Buckets: phone, tablet desktop, full
  • 28. 7/2/2013 Prepared & Presented by Milan Adamovsky 28 • Bucket number is arbitrary • Bucket always pre-built Noteworthy • Buckets are arbitrary • Tablet builds on Phone • Phone builds on “base” • Full builds on all • Full has no @media queries • Assembler pre-builds all files Workflow Logic • Desktop builds on Tablet • Device is resolved • Device is passed to function • Function include pre-built file
  • 29. 7/2/2013 Prepared & Presented by Milan Adamovsky 29 Lifecycle Request Cache Server Web Server Web Page User Agent Device Type Phone Tablet Desktop Full CSS Files includeCSS() Pre-build
  • 30. function includeCSS(section) { html csshtml; string x = "adaptive/" + request.device + "/" + section + ".css"; csshtml = "<link href=' + x + ' rel='stylesheet' type='text/css'>"; return csshtml; } 7/2/2013 Prepared & Presented by Milan Adamovsky 30 Include Function • Takes one parameters • Included on every page • Returns link markup • PHP, ASP, JSP, SSI, etc. Achieved Goals • No flicker • Do not rely on JavaScript • No copy & paste • Central maintenance
  • 31. <link href="adaptive/tablet/contact.css" rel="stylesheet" type="text/css"> 7/2/2013 Prepared & Presented by Milan Adamovsky 31 Include Function Example <% includeCSS('contact'); %> Function Output
  • 32. function includeCSS(section) { html csshtml; string device = querystring["device"] || request.device; string x = "adaptive/" + device + "/" + section + ".css"; csshtml = "<link href=' + x + ' rel='stylesheet' type='text/css'>"; return csshtml; } 7/2/2013 Prepared & Presented by Milan Adamovsky 32 Optional Improvement • Ideal for testing • Force device type Usage • Append ?device= to URL
  • 33. 7/2/2013 Prepared & Presented by Milan Adamovsky 33 Mobile Scaling <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> html { -webkit-text-size-adjust: 100%; } • iPhone doesn’t • Android auto-scales • Do not use ; delimiter[1] • Use constants • Play with options HTML: Auto-scale CSS: Text inflation Text Inflation • Not standardized • Never use none • Opt-out not in text-size-adjust -moz-text-size-adjust -ms-text-size-adjust
  • 34. 7/2/2013 Prepared & Presented by Milan Adamovsky 34 Text Inflation
  • 35. 7/2/2013 Prepared & Presented by Milan Adamovsky 35 • Less custom • More uniform • More predictable • Responsive Ready • Percentage based Grid Architecture • Interval spacing • More maintainable • Think in columns • Often 12-column
  • 36. 7/2/2013 Prepared & Presented by Milan Adamovsky 36 • Market traction Grid Systems • Do not reinvent the wheel • Align business to think in grid • Grid System Generator (http://www.gridsystemgenerator.com) Tools • Scaffolding (http://twitter.github.io/bootstrap/scaffolding.html) • 960 Grid System (http://www.960.gs)
  • 37. 7/2/2013 Prepared & Presented by Milan Adamovsky 37 Elastic Images <img src=somepic.jpg> img { max-width: 100%; } • Image element • Resize proportionally • Background sprites: no • Foreground sprites: yes resize • Percentage of container Implementation • Can be any percentage • Extremely easy • Observe pixelation
  • 38. 7/2/2013 Prepared & Presented by Milan Adamovsky 38 Elastic Sprite Example <div id=logo_container> <div id=logo_content> </div> </div> #logo_container { position: relative; } #logo_content { background-image: url(..); background-position: 50% 0; background-repeat: no- repeat; background-size: 100% auto; display: block; padding-top: 50%; width: 100%; } • Sprite is content • Always use container • Positioned container • Normal sprite • Width is required • Padding defines height Practical Use • Replaces elastic image
  • 39. 7/2/2013 Prepared & Presented by Milan Adamovsky 39 Internet Explorer Support <!--[if lt IE 9]> <script src="http://css3-mediaqueries-js.googlecode.com/ svn/trunk/css3-mediaqueries.js"></script> <![endif]--> Notice • JavaScript based shim • Doesn’t work with @import • Works on IE5+ • Buggy • Use sparingly, if at all
  • 40. 7/2/2013 Prepared & Presented by Milan Adamovsky 40 Bing SEO * By outputting only one URL for the same content, you will have the following benefits: 1. You have more ranking signals coming to this URL. Example: the vast majority of mobile URLs do not have inbound links from other websites as people do not link to mobiles URLs like they link to regular web-situated URLs. 2. This is also less search engine crawler traffic coming to your web servers, which is especially useful for large websites. Fewer URLs to crawl reduces the bandwidth our crawlers consume. 3. Less work (and potentially less cost) building, updating and maintaining a stand-alone mobile-focused website. Now that you have a single URL for each piece of your content, how do you optimize your website for different platforms? 1. By performing client browser detection (user agent, customer preferences, etc.), you can still optimize the display for the device your customers are using. This topic is presented in detail in the document Designing Web Sites for Phone Browsers; please note that this document does touch briefly on the subject of redirection to alternate URLs for mobile content, which is not the approach we recommend for best SEO results. Google SEO * Google supports smartphone-optimized sites in three configurations: 1. Sites that use responsive web design, i.e. sites that serve all devices on the same set of URLs, with each URL serving the same HTML to all devices and using just CSS to change how the page is rendered on the device. This is Google's recommended configuration. 2. Sites that dynamically serve all devices on the same set of URLs, but each URL serves different HTML (and CSS) depending on whether the user agent is a desktop or a mobile device. 3. Sites that have separate mobile and desktop URLs.
  • 41. 7/2/2013 Prepared & Presented by Milan Adamovsky 41 Mobile Tester Mobile Resizer Useful Testing Tools • Chrome Browser Add-ons Web Developer • FireFox Browser Add-ons Keynote DeviceAnywhere (http://www.deviceanywhere.com) • Device Emulators AppThwack (https://appthwack.com) MobilePhoneEmulator (http://www.mobilephoneemulator.com)
  • 42. 7/2/2013 Prepared & Presented by Milan Adamovsky 42 1. Extrapolate all media query blocks into their own files 2. File these files into their respective folders 3. Make minor adjustments Conversion Questions • How do I convert our scattered responsive implementation ? 1. Dump your old file into a 0/legacy.css 3. Gradually extrapolate sections into respective files 4. Remove legacy.css • How do I convert our non-responsive implementation ? 2. Include 0/legacy.css as your global base