Mobile Applications

Web Architecture [./]
Fall 2011 — INFO 253 (CCN 42598)

Dilan Mahendran, UC Berkeley School of Information
2011-09-20

Creative Commons License [http://creativecommons.org/licenses/by/3.0/]

This work is licensed under a CC
Attribution 3.0 Unported License
[http://creativecommons.org/licenses/by/3.0/]

Contents D. Mahendran: Mobile Applications

Contents

D. Mahendran: Mobile Applications

(2) Abstract

Web-based mobile applications inherit important properties and constraints both because of their dependency on the Web, and because of their focus on mobile scenarios. From a practical perspective, an important question is how expensive it is to design and build native or Web-based applications for mobile devices, and in this lecture we look at the most important component in that picture, the mobile browser. We also take a closer view of the spectrum between native and Web-based mobile apps. Specifically, we look at the gap, how that gap might be closed by the activities referred to as HTML5, and what still remains as open issues even with HTML5.



D. Mahendran: Mobile Applications

(3) Mobile Platform Landscape Overview

mobile-platforms.png

Mobile Browsers and Browsers

Outline (Mobile Browsers and Browsers)

  1. Mobile Browsers and Browsers [7]
  2. Browser Evaluation [5]
  3. Developing Mobile Web Applications [4]
Mobile Browsers and Browsers D. Mahendran: Mobile Applications

(5) Mobile's Share of Web Consumption

mobile-web-share.png

Mobile Browsers and Browsers D. Mahendran: Mobile Applications

(6) Smartphone Sales Q2 2010

smartphone-os-q2-2010.png

Mobile Browsers and Browsers D. Mahendran: Mobile Applications

(7) Web Requests by Smartphone OS

smartphone-os-share.png

Mobile Browsers and Browsers D. Mahendran: Mobile Applications

(8) Browser Wars Revisited



Mobile Browsers and Browsers D. Mahendran: Mobile Applications

(9) Browser War I

browser-war-one.png

Mobile Browsers and Browsers D. Mahendran: Mobile Applications

(10) Browser War II

browser-war-two.png      Firefox      Safari      Opera      Netscape      Mozilla      Chrome      Other


Mobile Browsers and Browsers D. Mahendran: Mobile Applications

(11) Browser War III



Browser Evaluation

Outline (Browser Evaluation)

  1. Mobile Browsers and Browsers [7]
  2. Browser Evaluation [5]
  3. Developing Mobile Web Applications [4]
Browser Evaluation D. Mahendran: Mobile Applications

(13) Mobile Browser Evolution



Browser Evaluation D. Mahendran: Mobile Applications

(14) Acid2

   /* picture setup */
   #top { margin: 100em 3em 0; padding: 2em 0 0 .5em; text-align: left; font: 2em/24px sans-serif; color: navy; white-space: pre; } /* "Hello World!" text */
   .picture { position: relative; border: 1em solid transparent; margin: 0 0 100em 3em; } /* containing block for face */
   .picture { background: red; } /* overriden by preferred stylesheet below */

   /* top line of face (scalp): fixed positioning and min/max height/width */
   .picture p { position: fixed; margin: 0; padding: 0; border: 0; top: 9em; left: 11em; width: 140%; max-width: 4em; height: 8px; min-height: 1em; max-height: 2mm; /* min-height overrides max-height, see 10.7 */ background: black; border-bottom: 0.5em yellow solid; }

   /* bits that shouldn't be part of the top line (and shouldn't be visible at all): HTML parsing, "+" combinator, stacking order */
   .picture p.bad { border-bottom: red solid; /* shouldn't matter, because the "p + table + p" rule below should match it too, thus hiding it */ }
   .picture p + p { background: maroon; z-index: 1; } /* shouldn't match anything */
   .picture p + table + p { margin-top: 3em; /* should end up under the absolutely positioned table below, and thus not be visible */ }

   /* second line of face: attribute selectors, float positioning */
   [class~=one].first.one { position: absolute; top: 0; margin: 36px 0 0 60px; padding: 0; border: black 2em; border-style: none solid; /* shrink wraps around float */ }
   [class~=one][class~=first] [class=second\ two][class="second two"] { float: right; width: 48px; height: 12px; background: yellow; margin: 0; padding: 0; } /* only content of abs pos block */


Browser Evaluation D. Mahendran: Mobile Applications

(15) Acid3



Browser Evaluation D. Mahendran: Mobile Applications

(16) Acid3 Result

Acid3 for Firefox 3.6

Browser Evaluation D. Mahendran: Mobile Applications

(17) W3C Mobile Browser Test



Developing Mobile Web Applications

Outline (Developing Mobile Web Applications)

  1. Mobile Browsers and Browsers [7]
  2. Browser Evaluation [5]
  3. Developing Mobile Web Applications [4]
Developing Mobile Web Applications D. Mahendran: Mobile Applications

(19) Targeting One Platform



Developing Mobile Web Applications D. Mahendran: Mobile Applications

(20) Least Common Denominator



Developing Mobile Web Applications D. Mahendran: Mobile Applications

(21) Class-Based Development

@media all and (orientation:portrait) { … }
@media all and (orientation:landscape) { … }
[http://www.w3.org/TR/css3-mediaqueries/#orientation]
<link rel="stylesheet" media="print and (color)" href="http://…" />
<link rel="stylesheet" media="print and (monochrome)" href="http://…" />
[http://www.w3.org/TR/css3-mediaqueries/#monochrome]

Developing Mobile Web Applications D. Mahendran: Mobile Applications

(22) Translation/Adaptation



D. Mahendran: Mobile Applications

(23) Conclusions



2011-09-20 Web Architecture [./]
Fall 2011 — INFO 253 (CCN 42598)