Mozilla 2009 Scale

Embed Size (px)

Citation preview

  • 8/14/2019 Mozilla 2009 Scale

    1/34

    SCALE 2009

    Mozilla @

    Christopher BlizzardFebruary 21st, 2009

  • 8/14/2019 Mozilla 2009 Scale

    2/34

    O HAI

  • 8/14/2019 Mozilla 2009 Scale

    3/34

    I was here last year.

  • 8/14/2019 Mozilla 2009 Scale

    4/34

    What's changed since then?

  • 8/14/2019 Mozilla 2009 Scale

    5/34

    Shipped Firefox 3.

  • 8/14/2019 Mozilla 2009 Scale

    6/34

    More competition anddevelopment.

  • 8/14/2019 Mozilla 2009 Scale

    7/34

    Went from 2,000 extensionsto 6,000.

  • 8/14/2019 Mozilla 2009 Scale

    8/34

    Went from 300,000,000 extensiondownloads to 1,000,000,000.

  • 8/14/2019 Mozilla 2009 Scale

    9/34

    Went from less than

    30% market share inEurope to more than 40%.

  • 8/14/2019 Mozilla 2009 Scale

    10/34

    Added another 60M users.

  • 8/14/2019 Mozilla 2009 Scale

    11/34

    Now the majority browserin several countries.*

    * Indonesia, Macedonia, Slovenia and Poland

  • 8/14/2019 Mozilla 2009 Scale

    12/34

    Getting ready to shipFirefox 3.1.

  • 8/14/2019 Mozilla 2009 Scale

    13/34

    Firefox 3.1

    Big on web development features

    Private browsing

    Awesomebar privacy TraceMonkey

  • 8/14/2019 Mozilla 2009 Scale

    14/34

  • 8/14/2019 Mozilla 2009 Scale

    15/34

    Let's look at some of thenew stuff that's in it.

  • 8/14/2019 Mozilla 2009 Scale

    16/34

    Native JSON

    Tested speedups on real-world pages of about 3x

    var j sonString = ' {"name" : "Ryan", " address" : "Mountain View, CA"} ' ;var person = JSON.parse( j sonString);// ' person' is now a J avaScript obj ect with// 2 pr operties; name and address

    var personString = JSON. stringify(person);// ' personString' now holds t he st ring// ' {"name": "Ryan" , "address" : "Mountain View, CA"} '

  • 8/14/2019 Mozilla 2009 Scale

    17/34

    @font-face support

    @font- face { font- family: " Bitstream Vera Serif Bold" ; s rc: url( "http: //yourserver . com/VeraSeBd. ttf" ) ;

    }

    body { font - family: " Bit st ream Vera Serif Bold" , serif }

  • 8/14/2019 Mozilla 2009 Scale

    18/34

    DNS pre-fetching.

  • 8/14/2019 Mozilla 2009 Scale

    19/34

    Geolocation Backend

  • 8/14/2019 Mozilla 2009 Scale

    20/34

  • 8/14/2019 Mozilla 2009 Scale

    21/34

    and

    Support for OGG Theora and OGG Vorbis

    Support for .wav

    Vorbis higher quality than MP3 Post-1.0 encoder on par with mpeg4

    For lower-quality videos

    HD-quality will require Dirac or post-Theora

  • 8/14/2019 Mozilla 2009 Scale

    22/34

    [ Demo ]

  • 8/14/2019 Mozilla 2009 Scale

    23/34

    Worker Threads

    Spawn OS-threads to run JavaScript

    Avoids window freezing

    Simple communication methods with main thread postMessage(), onmessage and onerror

    Has XMLHttpRequest Access, timeouts

  • 8/14/2019 Mozilla 2009 Scale

    24/34

    var worker = new Worker("fibonacci. j s") ;

    worker. onmessage = function(event) { document. getElementById("result"). textContent = event. data; dump( "Got: " + event. data + "\n" );};

    worker. onerror = function(event) { dump( "Worker error: " + event. d ata + " \n" ); throw event . dat a;};

    worker. postMessage(" 5") ;

    Creating a Worker

  • 8/14/2019 Mozilla 2009 Scale

    25/34

    var results = [ ] ;

    function resultReceiver(event) { results. push(parseInt(event. data)) ; if ( results. length == 2) { post Message( results[ 0] + results[ 1] ) ;

    }}

    function errorReceiver(event) { throw event. dat a;}

    onmessage = function(event) { var n = parseInt( event. data) ;

    if ( n == 0 | | n == 1) { postMessage( n) ; return;

    }

    for ( var i = 1; i

  • 8/14/2019 Mozilla 2009 Scale

    26/34

    SVG Filters on Plain HTML

    textarea { filter: url(effects. xml#drop-shadow); widt h: 200px;

    height : 200px; font - size: 20px; border: 5px dashed blue; background: transparent;}

    Hello Kitty

  • 8/14/2019 Mozilla 2009 Scale

    27/34

    (What the SVG Looks Like)

  • 8/14/2019 Mozilla 2009 Scale

    28/34

    [ Demo ]

  • 8/14/2019 Mozilla 2009 Scale

    29/34

    XHR Cross-site Access Control

    Allowing some simple cross-site XHR

    Complex requests use pre-flighting with OPTIONS

    Allows for sites to pick what you can access

    Design to protect data, users and sites

  • 8/14/2019 Mozilla 2009 Scale

    30/34

    XHR Progress Notification

    Was there in Firefox 3 but wasn't well advertised

    New calls use DOM Progress Events

    var req = n ew XMLHttpRequest( ) ;

    req. addEventListener(" progress", updateProgress, false);req. addEventListener(" load", transferComplete, false);req. addEventListener(" error", transferFailed, false);req. addEventListener(" abort", transferCanceled, false) ;

    req. open() ;

  • 8/14/2019 Mozilla 2009 Scale

    31/34

    Offline Caching for Web Apps

    Uses a manifest file for what you should cache

    Will load items from the cache instead of network

    Nice for offline use

    Simple to add to your html:

    Entry

  • 8/14/2019 Mozilla 2009 Scale

    32/34

    Upgrading the web.

  • 8/14/2019 Mozilla 2009 Scale

    33/34

    Resources

    Web Tech - https://developer.mozilla.org/web-tech/

    Newsletter - https://wiki.mozilla.org/About:mozilla

    Air Mozilla - http://air.mozilla.com

    Firefox 3.1 for Developers -http://developer.mozilla.org/en/Firefox_3.1_for_developers

    #devrel on irc.mozilla.org

    mozilla.evangelism mailing list

    https://developer.mozilla.org/web-tech/https://wiki.mozilla.org/About:mozillahttp://air.mozilla.com/http://developer.mozilla.org/en/Firefox_3.1_for_developershttp://developer.mozilla.org/en/Firefox_3.1_for_developershttp://air.mozilla.com/https://wiki.mozilla.org/About:mozillahttps://developer.mozilla.org/web-tech/
  • 8/14/2019 Mozilla 2009 Scale

    34/34

    Bonus Demos!