Jump to content

Responsive web design: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Reverted 2 edits by 122.132.211.166 (talk): Rv - refspam. Seems to exist purely to sell a book and fluid layouts are NOT the same thing as responsive. (TW)
→‎History: exp Marcotte
Line 27: Line 27:


==History==
==History==
The technique of adapting a site's layout to a device's display was first written about by Cameron Adams in 2004.<ref>{{cite web|last1=Adams|first1=Cameron|title=Resolution dependent layout|url=http://www.themaninblue.com/writing/perspective/2004/09/21/|website=The Man in Blue|date=September 21, 2004}}</ref> Ethan Marcotte coined the term responsive web design (RWD) in a May 2010 article in ''[[A List Apart]]''.<ref name=fluid_grid /><!--ref name=EM /--> He described the theory and practice of responsive web design in his brief 2011 book titled ''Responsive Web Design''. Responsive design was listed as #2 in Top Web Design Trends for 2012 by [[.net (magazine)|.net magazine]]<ref>{{cite web|title=15 top web design and development trends for 2012|publisher = .net magazine |date=January 9, 2012|url=http://www.creativebloq.com/industry-trends/15-top-web-design-and-development-trends-2012-1123018}}</ref> after [[progressive enhancement]] at #1.
The technique of adapting a site's layout to a device's display was first written about by Cameron Adams in 2004.<ref>{{cite web
|last1=Adams|first1=Cameron|title=Resolution dependent layout|url=http://www.themaninblue.com/writing/perspective/2004/09/21/|website=The Man in Blue|date=September 21, 2004}}</ref> By 2008, a number of related terms such as "flexible", "elastic", "fluid", and "liquid" were being used to describe layouts. Ethan Marcotte coined the term responsive web design (RWD) in a May 2010 article in ''[[A List Apart]]''.<ref name=fluid_grid /><!--ref name=EM /--> He described the theory and practice of responsive web design in his brief 2011 book titled ''Responsive Web Design''. Responsive design was listed as #2 in Top Web Design Trends for 2012 by [[.net (magazine)|.net magazine]]<ref >{{cite web|title=15 top web design and development trends for 2012|publisher = .net magazine |date=January 9, 2012|url=http://www.creativebloq.com/industry-trends/15-top-web-design-and-development-trends-2012-1123018}}</ref> after [[progressive enhancement]] at #1.

Marcotte's techniques went beyond the previously-existing fluid layouts. They recognised that merely re-arranging the same content items, typically images of fixed pixel sizes, was no longer adequate for serving web content to mobile devices. Marcotte advocated a step beyond this, using the new CSS3 feature of media queries<ref >{{Cite web
|url=http://www.w3.org/TR/css3-mediaqueries/
|title=Media Queries
|publisher=[[W3C]]
|date=19 June 2012
}}</ref> to make greater changes to content, still performed entirely client-side. These now allowed [[declarative programming|declarative]] styling to be used to control image sizes, or the relative positioning of list elements under the direct control of the designer, rather than the previous fluid approach of hoping that the automatic behaviour of the layout engine would be suitable.<ref >Marcotte (2010)</ref>


[[Mashable]] called 2013 the Year of Responsive Web Design.<ref name="mashable_2013">{{cite web|last=Cashmore|first=Pete|title=Why 2013 Is the Year of Responsive Web Design|date=Dec 11, 2012|url=http://mashable.com/2012/12/11/responsive-web-design/}}</ref> Many other sources have recommended responsive design as a cost-effective alternative to mobile applications.
[[Mashable]] called 2013 the Year of Responsive Web Design.<ref name="mashable_2013">{{cite web|last=Cashmore|first=Pete|title=Why 2013 Is the Year of Responsive Web Design|date=Dec 11, 2012|url=http://mashable.com/2012/12/11/responsive-web-design/}}</ref> Many other sources have recommended responsive design as a cost-effective alternative to mobile applications.

Revision as of 11:48, 6 December 2014

Responsive web design (RWD) is an approach to web design aimed at crafting sites to provide an optimal viewing experience—easy reading and navigation with a minimum of resizing, panning, and scrolling—across a wide range of devices (from desktop computer monitors to mobile phones).[1][2][3]

A site designed with RWD[1][4] adapts the layout to the viewing environment by using fluid, proportion-based grids,[5][6] flexible images,[7][8][9] and CSS3 media queries,[3][10][11] an extension of the @media rule, in the following ways:[12]

  • The fluid grid concept calls for page element sizing to be in relative units like percentages, rather than absolute units like pixels or points.[6]
  • Flexible images are also sized in relative units, so as to prevent them from displaying outside their containing element.[7]
  • Media queries allow the page to use different CSS style rules based on characteristics of the device the site is being displayed on, most commonly the width of the browser.

Mobile first, unobtrusive JavaScript, and progressive enhancement

"Mobile first", unobtrusive JavaScript, and progressive enhancement are related concepts that predate RWD. Browsers of basic mobile phones do not understand JavaScript or media queries, so a recommended practice is to create a basic web site and enhance it for smart phones and PCs, rather than rely on graceful degradation to make a complex, image-heavy site work on mobile phones.[13][14][15][16]

Progressive enhancement based on browser-, device-, or feature-detection

Where a web site must support basic mobile devices that lack JavaScript, browser ("user agent") detection (also called "browser sniffing"), and mobile device detection[14][17] are two ways of deducing if certain HTML and CSS features are supported (as a basis for progressive enhancement)—however, these methods are not completely reliable unless used in conjunction with a device capabilities database.

For more capable mobile phones and PCs, JavaScript frameworks like Modernizr, jQuery, and jQuery Mobile that can directly test browser support for HTML/CSS features (or identify the device or user agent) are popular. Polyfills can be used to add support for features—e.g. to support media queries (required for RWD), and enhance HTML5 support, on Internet Explorer. Feature detection also might not be completely reliable: some may report that a feature is available, when it is either missing or so poorly implemented that it is effectively nonfunctional.[18][19]

Challenges, and other approaches

Luke Wroblewski has summarized some of the RWD and mobile design challenges, and created a catalog of multi-device layout patterns.[20][21][22] He suggests that, compared with a simple RWD approach, device experience or RESS (responsive web design with server-side components) approaches can provide a user experience that is better optimized for mobile devices.[23][24][25] Server-side "dynamic CSS" implementation of stylesheet languages like Sass or Incentivated's MML can be part of such an approach by accessing a server based API which handles the device (typically mobile handset) differences in conjunction with a device capabilities database in order to improve usability.[26] RESS is more expensive to develop, requiring more than just client-side logic, and so tends to be reserved for organizations with larger budgets. Google recommends responsive design for smartphone websites over other approaches.[27]

Although many publishers are starting to implement responsive designs, one ongoing challenge for RWD is that some banner advertisements and videos are not fluid.[28] However, search advertising and (banner) display advertising support specific device platform targeting and different advertisement size formats for desktop, smartphone, and basic mobile devices. Different landing page URLs can be used for different platforms,[29] or Ajax can be used to display different advertisement variants on a page.[17][21][30] CSS tables permit hybrid fixed+fluid layouts.[31]

There are now many ways of validating and testing RWD designs,[32] ranging from mobile site validators and mobile emulators[33] to simultaneous testing tools like Adobe Edge Inspect.[34] The Firefox browser and the Chrome console offer responsive design viewport resizing tools, as do third parties.[35][36]

History

The technique of adapting a site's layout to a device's display was first written about by Cameron Adams in 2004.[37] By 2008, a number of related terms such as "flexible", "elastic", "fluid", and "liquid" were being used to describe layouts. Ethan Marcotte coined the term responsive web design (RWD) in a May 2010 article in A List Apart.[1] He described the theory and practice of responsive web design in his brief 2011 book titled Responsive Web Design. Responsive design was listed as #2 in Top Web Design Trends for 2012 by .net magazine[38] after progressive enhancement at #1.

Marcotte's techniques went beyond the previously-existing fluid layouts. They recognised that merely re-arranging the same content items, typically images of fixed pixel sizes, was no longer adequate for serving web content to mobile devices. Marcotte advocated a step beyond this, using the new CSS3 feature of media queries[39] to make greater changes to content, still performed entirely client-side. These now allowed declarative styling to be used to control image sizes, or the relative positioning of list elements under the direct control of the designer, rather than the previous fluid approach of hoping that the automatic behaviour of the layout engine would be suitable.[40]

Mashable called 2013 the Year of Responsive Web Design.[41] Many other sources have recommended responsive design as a cost-effective alternative to mobile applications.

Forbes featured a piece, 'Why You Need To Prioritize Responsive Design Now' [42] where the importance was made clear that having a mobile version of your website isn’t enough anymore. Jody Resnick, President of Trighton Interactive stated in his interview with Forbes, “Responsive websites simplify internet marketing and SEO. Instead of having to develop and manage content for multiple websites, businesses with responsive sites can take a unified approach to content management because they have only the one responsive site to manage.

Resnick predicts, “As the internet transforms further into a platform of services and user interfaces that tie those services together, leveraging this technology in the future will allow companies to integrate a plethora of back-end services, such as Facebook, Twitter, Salesforce.com, and Amazon Web Services, and then present the integrated data back out the front-end iad layer on a responsive design so the application looks great on all devices without custom coding needed for each device or screen size."

Some believe that responsive design will be more prevalent than native apps simply because of the browser compatibility and the cost associated with programming the apps.

See also

References

  1. ^ a b c Marcotte, Ethan (May 25, 2010). "Responsive Web design". A List Apart.
  2. ^ "Ethan Marcotte's 20 favourite responsive sites". .net magazine. October 11, 2011.
  3. ^ a b Gillenwater, Zoe Mickley (Dec 15, 2010). "Examples of flexible layouts with CSS3 media queries". Stunning CSS3. p. 320. ISBN 978-0-321-722133.
  4. ^ Pettit, Nick (Aug 8, 2012). "Beginner's Guide to Responsive Web Design". TeamTreehouse.com blog.
  5. ^ "Core concepts of Responsive Web design". Sep 8, 2014.
  6. ^ a b Marcotte, Ethan (March 3, 2009). "Fluid Grids". A List Apart.
  7. ^ a b Marcotte, Ethan (June 7, 2011). "Fluid images". A List Apart.
  8. ^ Hannemann, Anselm (Sep 7, 2012). "The road to responsive images". net Magazine.
  9. ^ Jacobs, Denise (April 24, 2012). "50 fantastic tools for responsive web design". .net Magazine.
  10. ^ Gillenwater, Zoe Mickley (Oct 21, 2011). "Crafting quality media queries".
  11. ^ "Responsive design—harnessing the power of media queries". Google Webmaster Central. Apr 30, 2012.
  12. ^ W3C @media rule
  13. ^ Wroblewski, Luke (November 3, 2009). "Mobile First".
  14. ^ a b Firtman, Maximiliano (July 30, 2010). Programming the Mobile Web. p. 512. ISBN 978-0-596-80778-8.
  15. ^ "Graceful degradation versus progressive enhancement". February 3, 2009.
  16. ^ Designing with Progressive Enhancement. March 1, 2010. p. 456. ISBN 978-0-321-65888-3.
  17. ^ a b "Server-Side Device Detection: History, Benefits And How-To". Smashing magazine. September 24, 2012.
  18. ^ "BlackBerry Torch: The HTML5 Developer Scorecard | Blog". Sencha. 2010-08-18. Retrieved 2012-09-11.
  19. ^ "Motorola Xoom: The HTML5 Developer Scorecard | Blog". Sencha. 2011-02-24. Retrieved 2012-09-11.
  20. ^ Wroblewski, Luke (May 17, 2011). "Mobilism: jQuery Mobile".
  21. ^ a b Wroblewski, Luke (February 6, 2012). "Rolling Up Our Responsive Sleeves".
  22. ^ Wroblewski, Luke (March 14, 2012). "Multi-Device Layout Patterns".
  23. ^ Wroblewski, Luke (February 29, 2012). "Responsive Design ... or RESS".
  24. ^ Wroblewski, Luke (September 12, 2011). "RESS: Responsive Design + Server Side Components".
  25. ^ Andersen, Anders (May 9, 2012). "Getting Started with RESS".
  26. ^ "Responsive but not completely mobile optimised | Blog". Incentivated.
  27. ^ "Building Smartphone-Optimized Websites". Google.
  28. ^ Snyder, Matthew; Koren, Etai (Apr 30, 2012). "The state of responsive advertising: the publishers' perspective". .net Magazine.
  29. ^ Google AdWords Targeting (Device Platform Targeting)
  30. ^ JavaScript and Responsive Web Design Google Developers
  31. ^ Table Layouts in RWD
  32. ^ Young, James (Aug 13, 2012). "Top responsive web design problems... testing". .net Magazine.
  33. ^ "Best mobile emulators and RWD testing tools". The Mobile Web Design Blog. Nov 26, 2011.
  34. ^ Rinaldi, Brian (September 26, 2012). "Browser testing... with Adobe Edge Inspect".
  35. ^ Responsive Design View in Firefox
  36. ^ Viewport resizer
  37. ^ Adams, Cameron (September 21, 2004). "Resolution dependent layout". The Man in Blue.
  38. ^ "15 top web design and development trends for 2012". .net magazine. January 9, 2012.
  39. ^ "Media Queries". W3C. 19 June 2012.
  40. ^ Marcotte (2010)
  41. ^ Cashmore, Pete (Dec 11, 2012). "Why 2013 Is the Year of Responsive Web Design".
  42. ^ Gunelius, Susan (March 13, 2013). "Why You Need To Prioritize Responsive Design Now".