Upgrade to Pro — share decks privately, control downloads, hide ads and more …

JavaScript Micro Frameworks

JavaScript Micro Frameworks

What they are, how we got here, and where were going.

Daniel Knell

January 24, 2012
Tweet

More Decks by Daniel Knell

Other Decks in Programming

Transcript

  1. var element; if (document.all) { element = document.all[id]; else {

    element = document.getElementById(id); } The Dark Ages Tuesday, 24 January 12
  2. function getElement(id) { if (document.all) { return document.all[id]; } else

    { return document.getElementById(id); } } var element = getElement(id); The Dark Ages Tuesday, 24 January 12
  3. jQuery’s Spare Tire 0 75,000 150,000 225,000 300,000 1.2 1.3

    1.4 1.5 1.6 1.7 jQuery File Size Size (Bytes) Tuesday, 24 January 12
  4. Oh Jeesh! $('#content a.button') .bind('click', function (e) { $(this).data('clicked', true).unbind();

    e.preventDefault(); }) .css({ opacity: 1 , color: 'red' }) .fadeOut(250); $.map([ 'a', 'b', 'c' ], function (letter) { return letter.toUpperCase(); }) $.ajax('/data', function (response) { $('#content').html(response); }); Tuesday, 24 January 12