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

jQuery (vs JavaScript)

jQuery (vs JavaScript)

A lightning talk from a CTFEDs workshop (http://www.meetup.com/ctfeds/events/223987693/)

Steve Barnett

August 20, 2015
Tweet

More Decks by Steve Barnett

Other Decks in Technology

Transcript

  1. jQuery
    (vs JavaScript)
    ctfeds.org/jquery

    View full-size slide

  2. TL;DR:
    Think about it
    (Carefully)

    View full-size slide

  3. Don't use jQuery
    by default

    View full-size slide

  4. What we'll cover
    jQuery
    Cutting the Mustard

    View full-size slide

  5. Ask yourself:
    Who does this help?
    Me or my users?

    View full-size slide

  6. jQuery !
    Makes complex things
    simple(r)

    View full-size slide

  7. jQuery !
    well maintained
    well tested

    View full-size slide

  8. jQuery !
    avoid bugs
    (even in modern browsers)

    View full-size slide

  9. jQuery !
    CDNs

    View full-size slide

  10. jQuery !
    Parse and execution time
    can be slow

    View full-size slide

  11. jQuery !
    Adds a dependency

    View full-size slide

  12. jQuery !
    Can be overkill

    View full-size slide

  13. jQuery !
    Can be painful to upgrade

    View full-size slide

  14. jQuery !
    Solving their problems,
    not yours

    View full-size slide

  15. jQuery Plugins
    Same as jQ itself
    Sort of

    View full-size slide

  16. Ok, but how?
    youmightnotneedjquery.com
    youmightnotneedjqueryplugins.com
    microjs.com

    View full-size slide

  17. And Now for Something
    Completely Different

    View full-size slide

  18. Cutting the Mustard
    if('querySelector' in document &&
    'localStorage' in window &&
    'addEventListener' in window) {
    // load fancy js stuff
    }

    View full-size slide

  19. Use less JS
    Optimise it

    View full-size slide

  20. Thanks!
    ctfeds.org/jquery

    View full-size slide