Responsive Web Design - Kennesaw State University

1y ago
34 Views
2 Downloads
4.89 MB
31 Pages
Last View : 11d ago
Last Download : 3m ago
Upload by : Jewel Payne
Transcription

Responsive Web DesignIT 4213 Mobile Web DevelopmentIT 4403 Advanced Web and Mobile ApplicationsJack G. ZhengSpring nsive-web-design

OverviewThis lecture notes summarize basic approaches todevelop and deliver mobile websites, with a particularfocus on responsive design. Two (or four including subcategories) basicapproaches– Separate mobile site– One web Responsive web design Adaptive (dynamic serving) Hybrid: RESS (Responsive Server Side Components) Responsive web design principles and key practices– Fluid-grid– Fluid image/media– Media query2

Mobile Website Delivery Strategies Separate mobile version site– Separate mobile site has its own domain andaddress, and is independent from the main site. One Web– One Web means making, as far as isreasonable, the same information and servicesavailable to users irrespective of the device theyare using, but with different presentations (UI)

Separate Mobile Site Separate mobile site has its own domain and address,and is independent from the main site. A separate mobile site can best meet mobile userexperience. Build a separate mobile-optimizeddesign (or mobile site) if you can afford it.– ll-site/ Some examples:– Wikipedia: https://en.m.wikipedia.org– Goodwill: https://mgwdonate.ging.org (used a third partyservice, more like an app) Some companies has moved away from separatemobile site, such as–––––––Costco (m.costco.com)Walmart (mobile.walmart.com)Ebay (m.ebay.com)Newegg: (m.newegg.com)Ikea: m.ikea.com/us (jQuery Mobile)Nike: m.nike.comStaples: m.staples.comExtended reading: Why Separate Mobile & Desktop Web Pages?http://www.lukew.com/ff/entry.asp?13904

One WebQuotes from https://www.w3.org/TR/mobile-bp/#OneWeb One Web means making, as far as is reasonable, the same information and servicesavailable to users irrespective of the device they are using, but with differentpresentations (UI)It does not mean that the content is available in exactly the same representation acrossall devices.The context of mobile use, device capability variations, bandwidth issues and mobilenetwork capabilities all affect the representation. One Web approaches– Responsive web design (response to screen size)– Adaptive (dynamic serving based on device detectionand adaptation)– Hybrid: RESS (Responsive Design Server SideComponents) http://www.lukew.com/ff/entry.asp?1392Key readings: Design for multi-screen experiences websitesmulti-screen-consumer.html -one-web-approach-responsive-vs-adaptive/

Responsive Web DesignResponsive Web Design (RWD) is a Web design approach aimed atcrafting sites to provide an optimal viewing experience, easy readingand navigation with a minimum of resizing, panning, and scrolling,across a wide range of screen sizes and devices. Ethan Marcotte coined the term responsive web design anddefined it to mean fluid grid/ flexible images/ media queries in aMay 2010 article in A List Apart– n Basic principles and practices1.2.3.Fluid grid - no horizontal scrollingAdaptive/flexible imageMedia querySome interesting infographics about icslearn-responsive-web-design/

Examples Responsive examples–––– shable.comhttp://mediaqueri.es (more examples here)Adjust the browser width and see thechanges or use a tool like responsinator.comor browser developer tools.See the webpage layout and contentchanges as the page width changes. Theexample is from https://mediaqueri.esNon-responsive examples– https://www.weather.gov (not mobile friendly)– http://yahoo.com (adaptive but not responsive)– See more: le-friendliness-testing.html

Fluid Layout Fluid layout, is the practice ofbuilding the layout of a websitecapable of dynamicallyresizing to any width.– using relative length units,most commonly percentagesor em units.– Set the width using %– Set margin and padding using % Formula– result (%) target / context (parent size) This may not look optimal in some cases especially for marginsand paddings. Use it together with media queries. Other practices– Set max-width and min-widthExtended reading: https://alistapart.com/article/fluidgrids and the luidgrids/examples/grid/final.html8

Adaptive Image Apply similar fluid practices to images using percentages– Code lename tryresponsive image2 The image can be scaled up to be larger than its original size, whichmakes the image blurry. A better solution, in many cases, will be to usethe max-width property.– See this lename tryresponsive image(and compare to the prior example)img{display: block;max-width: 100%;}Don’t forget the max-widthproperty, which limit the imagesize to its original size. Reference: https://www.w3schools.com/css/css rwd images.asp Take it to another level with media queries http://responsiveimages.org9

Media Query Media query is a CSS3 module allowing contentrendering to adapt to conditions such as screenresolution. A W3C recommended standard (June 2012)– https://www.w3.org/TR/css3-mediaqueries/ A cornerstone technology of responsive web design All major browsers support it– http://caniuse.com/#feat css-mediaqueries

Media Query Basics Media queries are based on rules (contexts) when a set of CSS shouldbe applied Code example– Setting a context in CSS ( style ) blockMediatype@media screen and (max-width: 300px){div {background-color: lightblue;}}Media features– Setting a context in a linked CSS file link rel "stylesheet" type "text/css" href "."media "screen and (max-width: 300px)" / Three parts in any context1.2.3.11Media type: type of presentation media, like “screen”Media features: specify the characteristics of media type, like “width”Logical operator: combine multiple rules

Media Types and Media Features Media Queries Level 4 defines four media typesMedia TypeDescriptionallUsed for all media type devicesprintUsed for printersscreenUsed for computer screensspeechUsed for devices that “read out” a pageMajor media features–––– width (max-width, min-width)aspect-ratioorientationresolutionFor a full list of types and features, refer to:– dia Queries/Using media queries– http://www.w3schools.com/cssref/css3 pr mediaquery.asp12

Logic in Media Queries And@media (min-width: 600px) and (max-width: 800px) Or@media (max-width: 600px), (min-width: 800px) Not@media not screen and (color) See more here– http://css-tricks.com/logic-in-media-queries/– CSS/Media queries13

Media Query Practical Examples When the width is between 400px and 600px on screen@media screen and (max-width: 600px) and (min-width: 400px) When the screen is in portrait orientation and width is less than640px@media screen and (max-width: 640px) and (orientation:portrait) When the screen is narrower than 16:9 aspect ratio and thewidth is between 480px and 960px@media screen and (max-width: 960px) and (min-width:480px)and (max-aspect-ratio:16/9)Use the following web app for quick ?filename trycss3 media214

Identifying Media Query Breakpoints Properly set the breakpoints of media queries to allow bestviewing and interaction experience based on viewport width. Some recommend a common set of breakpoints, such as 576,768, 992, 1200 (Bootstrap). Some -effectivemedia-queries/) do not recommend to write media querybreakpoints around common viewport sizes as determined bydifferent device resolutions. New devices and resolutions arebeing released all of the time. Trying to keep up with thesechanges could be an endless process. Recommendations:– Create breakpoints based on content, never on specific devices,products, or brands.– Breakpoints should only be introduced when a website starts tobreak, look weird, or the experience is being hampered.– Pick minor breakpoints when necessary in additional to major layoutchanges.15

Arrange a Set of Media Queries Media queries are commonly used to setcontexts for different sizes of screens, basedon the width property How to arrange media query contexts?There are mainly two approaches:– Graceful degradation– Mobile first or progressive enhancementExtended reading: Generic ric-css-mobile-first/16

Graceful Degradation Define the default styles for large screen first. Then use a set of rules with max-width (indescending order) for smaller screens by order.NormalCSS stylesapplied17/* Default styles first for the largestscreen; then media queries for smallerscreens -width:1400px) {.}1000px) {.}600px) {.}400px) {.}Later rules override prior rules so you don’t need to redefineevery CSS style. Only override those needed to be changed.

Mobile First (Progressive Enhancement) Starts from default styles for the smallest screen.– “The absence for @media queries is in fact the first @media query." Then use a set of rules with min-width (in ascending order) forlarger screens.Use ascendingmin-width– ss/ property to “grow”the width An example:Default CSSstyles firstfor thesmallestscreen; thenmediaqueries/* Default styles first for the smallestscreen; then media queries for largerscreens*/.@media screen and (min-width: 400px) {.}@media screen and (min-width: 600px) {.}@media screen and (min-width: 1000px) {.}@media screen and (min-width: 1400px) {.}Later rules override prior rules18

Mobile First Mobile First is a philosophy created by Luke Wroblewski that highlightsthe need to prioritize the mobile context when creating userexperiences.– Design for the smallest mobile device first; then progressively enhance theexperience as more screen real estate becomes available.– Allows websites to reach more people– Forces designers to focus on core content and functionality (What do youdo when you lose 80% of your screen real estate?)– Let designers innovate and take advantage of new technologies(geolocation, touch events and more)– http://www.lukew.com/presos/preso.asp?26 Extended readings– mobile-first responsive web t-responsive-web-design/– A Hands-On Guide to Mobile-First Responsive -guide-to-mobile-first-design/19

Media Query on Mobile Devices To make media query correctly recognize thewidth condition on mobile browsers, viewportneeds to be correctly set using the viewportmeta tag. Otherwise the viewport will be setat 980px by default and media query rulesfor smaller screens may not be triggered. https://www.w3schools.com/css/css rwd viewport.asp20

Media Query – A Complete Example A complete example of using media query is describedby Ethan in his original article– n Check out the design results (from the example above) insome basic steps. Each is becoming more responsive.1.2.3.4.5.21Fluid design at the s/responsive-webdesign/ex/ex-site-flexible.htmlAdd a breakpoint: e-web-design/ex/ex-site-linearize.htmlSet for smaller screens: e-web-design/ex/ex-site-mini.htmlSet for larger screens: e-web-design/ex/ex-site-larger.htmlFinal design: e-web-design/ex/ex-site-FINAL.html

Media Query Uses and Applications Set different display styles– Change page layout– Change appearance/style of elements like text,tables, and forms. Set different content– Show/hide different part of the page– Use (or hide) different image background– Use different image with different quality22

RWD/Mobile General Principles Two key differences of mobile web use is the smallscreen and touch oriented operations. Design for Small Screens: the grand general principle ofsmall screens is to keep the page short– Most mobile websites are viewed in portrait mode with narrowwidth. Stretching a normal multi column webpage will makethe page extra long. have-to-be-so-tall-on-mobile/– Long stretching pages are more likely to get user lost anddifficult to navigate Design for touch friendly UI– Touch UI poses some challenges but also offers opportunitiesto design better interaction methods and enable additionalfunctionalities than traditional UI.These two principles and some best practices will be cover in module 4.23

RWD Patterns and Best Practices RWD can be applied to many UI elements and content types, like:––––––– Page layoutNavigation (menu)Content: text, table, listForm and controlsSpecific content type like data, catalog, article, dashboard, etc.Media like image, video, gallery, etc.Decorative elements like icon, background, etc.General patterns and best practices collection– erns.html– https://responsivedesign.is/patterns/– http://ui-patterns.com/patterns Dedicated sites for examples–––––24More specific patternsand best practices forselected content typeswill be covered in latermodules 5 to sponsive-web-design.html

RWD Tools Responsive design test–––– me– http://mydevice.io– http://detectmobilebrowsers.com– Screen /www.whatismyscreenresolution.comEmulator– tools/devicemode/– onsive Design Mode– http://www.mobilexweb.com/emulators– reen size detection Viewport tools (device or visualviewport)– https://viewportsizer.com andhttps://viewportsizer.com/devices/– http://whatismyviewport.com– https://www.mydevice.io– http://lab.maltewassermann.com/viewport-resizer/ Feature check– http://mobilehtml5.org– http://caniuse.com

RWD UI Frameworks Despite the debate of using frameworks, RWD UIframeworks has been growing in popularity– ou/ Major frameworks––––Bootstrap: http://getbootstrap.comZurb Foundation: http://foundation.zurb.comSkeleton: http://getskeleton.comSencha Touch: http://www.sencha.com/products/touch/ More comparison– http://responsive.vermilion.com/compare.php– ameworks-compared– http://mobile-frameworks-comparison-chart.comThis subject will be covered in details in module 1026

Adaptive (Dynamic Serving) Adaptive design aims to deliver website UI (content, style, function, etc.) and user experiencethat adapts to the capabilities of the device/browser.–– Of the Alexa 100 sites, 80% use adaptive web design in their delivery.– reResponsive design can somewhat be considered as a kind of adaptive design. It adapts UIbased on screen size (width mainly). But adaptive design considers more features than justscreen e examples (notice the webpage does not respond to real-time size change well):––––– Also called dynamic serving as in consumer/Adaptation can be done either at the server side or at the client side esign/

Feature/Device Detection Adaptive design heavily uses feature detection and other soundprogressive enhancement techniques. These features may include–––––Screen size and capabilities (orientation, touch, etc.)Device/OS typeBrowser type/versionHardware ive-design-future/ In the separate mobile site approach, device detection is alsooften used to redirect users to mobile or desktop version site. Feature detection techniques– Parsing User-Agent strings: -it-works-and-how-it-can-be-used– Using JavaScript testing: Modernizr https://modernizr.com More resources: https://deviceatlas.com/knowledge-base28

RESS RESS: Responsive Design Server Side Components The two approaches are not mutually exclusive. Manysites combine techniques to achieve the best results. Some techniques– A single set of page templates define an entire Web site for alldevices (responsive) but key components within that site havedevice-class specific implementations that are renderedserver side (server side – Conditional loading / Comparison of the three:– http://www.lukew.com/ff/entry.asp?150929

Key Readings and Learning Approaches summary: consumer/ Responsive web design– n: the original articlefocused on concepts.– Good introduction with more technical hh653584.aspx– Media queries: dia Queries/Using media queries Adaptive web design– -one-web-approachresponsive-vs-adaptive/– e-web-design-debunked RESS: the original article raising the ideahttps://www.lukew.com/ff/entry.asp?1392 Comparison: https://www.lukew.com/ff/entry.asp?150930

Good Resources Influencers– https://ethanmarcotte.com– http://www.lukew.com– http://bradfrost.com Media resources–––– Tutorials CSS/Media rials/https://developer.mozilla.org/en-US/docs/Web Development/Responsive Web designhttp://www.youtube.com/playlist?list PLtNErhYMkHnGh691QvRtMp9jMVzpMenL5

Responsive Web Design Ethan Marcottecoined the term responsive web design and . Responsive Web Design (RWD) is a Web design approach 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 screen sizes and devices.

Related Documents:

Kennesaw State University . Faculty Handbook . 2018-2019 . Effective July 1, 2018 . Kennesaw Campus Marietta Campus 1000 Chastain Road 1100 South Marietta Pkwy Kennesaw, GA 30144 Marietta, GA 30060 Phone: 470.578.6000 Phone: 678.915.7778 . www.kennesaw.edu. 2018-2019 KENNESAW STATE UNIVERSITY FACULTY

Kennesaw State University WellStar School of Nursing 520 Prillaman Hall, MD 4102 Kennesaw, Georgia 30144 mhedenstr@kennesaw.edu. 470-578-7969 . 560 Parliament Garden Way NW Room 491, MD 0401 Kennesaw, GA 30144 ssneha@kennesaw.edu office: 470-578-2436; mobile:770- 853-0661 . Affiliation: Kennesaw State University. About the Authors:

alization, visualization authoring, and responsive web design. Responsive Web Design While responsive visualization is still a nascent area, respon-sive web design has received more attention. Patterns and principles of responsive web design have been studied [15, 16]. HTML5 and CSS3 are popular standards to implement responsive designs [9].

alization, visualization authoring, and responsive web design. Responsive Web Design While responsive visualization is still a nascent area, respon-sive web design has received more attention. Patterns and principles of responsive web design have been studied [15, 16]. HTML5 and CSS3 are popular standards to implement responsive designs [9].

that’s what responsive web design is: a possible solution, a way to more fully design for the web’s inherent flexibility. If we’re willing to research the needs of our users, and apply those ingredients carefully, then responsive web design is a powerful approach indeed. Ethan Marcotte, “Responsive Web Design”

CURRICULUM VITAE CHARITY KERSEY BUTCHER Professor of Political Science September 19, 2020 Office: Department of Political Science & International Affairs Kennesaw State University 1000 Chastain Road #2205 Kennesaw, GA 30144 678-797-2929 cbutche2@kennesaw.edu EDUCATION May 2009 Ph.D., Indiana University, Bloomington, IN, Political Science .

Kennesaw, GA Advertising Manager Josh Eastwood admanager@ksusm.com 470-578-6470 KSUSM Ad Manager 395 Cobb Ave. NW STA 162B, MD 0507 Kennesaw, GA 30144 Kennsaw State University Student Media Business Coordinator Shereida A. Austin business@ksumedia.com 470-578-6265 KSUSM Business Cor. 395 Cobb Ave. NW STA 162C, MD 0507 Kennesaw, GA 30144

ALBERT WOODFOX CIVIL ACTION VERSUS NO. 06-789-JJB BURL CAIN, WARDEN, LOUISIANA STATE PENITENTIARY, ET AL RULING This matter is before the Court on Petitioner Albert Woodfox’s (“Woodfox”) petition for habeas relief on the claim that Woodfox’s March 1993 indictment by a West Feliciana Parish grand jury was tainted by grand jury foreperson discrimination. An evidentiary hearing was held .