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 Slide

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

    View Slide

  3. Don't use jQuery
    by default

    View Slide

  4. What we'll cover
    jQuery
    Cutting the Mustard

    View Slide

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

    View Slide

  6. jQuery !

    View Slide

  7. jQuery !
    Makes complex things
    simple(r)

    View Slide

  8. jQuery !
    well maintained
    well tested

    View Slide

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

    View Slide

  10. jQuery !
    CDNs

    View Slide

  11. jQuery !

    View Slide

  12. jQuery !
    Parse and execution time
    can be slow

    View Slide

  13. jQuery !
    Adds a dependency

    View Slide

  14. jQuery !
    Can be overkill

    View Slide

  15. jQuery !
    Can be painful to upgrade

    View Slide

  16. jQuery !
    Solving their problems,
    not yours

    View Slide

  17. jQuery Plugins
    Same as jQ itself
    Sort of

    View Slide

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

    View Slide

  19. And Now for Something
    Completely Different

    View Slide

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

    View Slide

  21. Use less JS
    Optimise it

    View Slide

  22. Thanks!
    ctfeds.org/jquery

    View Slide