javascript - What are some empirical technical reasons not to use jQuery? -


context: astounded number of front end developers hack @ html, javascript , css day long , ignore tools jquery ( or other equivalent helper frameworks ) , refuse use them. not talking javascript gurus, talking in trenches every day joe production developers. lot of arguments more excuses or personal opinions don't think have technical merit, want make sure not missing something.

question: empirical technical reasons not use jquery?

i not looking religious or dogmatic arguments or subjective opinions "like other framework better", consider jquery straw man comparable frameworks in question.

update 2015:

in answer 2011 i'm talking libraries jquery, yui or prototype. today in 2015 reasoning still applicable frameworks angular, react or ember. in 4 years technology progressed tremendously , though see considerably less prejudice against react or angular saw against jquery or yui, same kind of thinking - though lesser extent - still present today.

update 2016:

i highly recommend article published few days ago:

  • why jquery? michael s. mikowski, author of single page web applications book

that article detailed answer question. had been available when writing answer below - have quoted it.

original answer:

i'll answer jquery same arguments i've heard against using yui, prototype, dojo, ext , few others. main arguments i've heard:

  1. file size, in fact 84.6 kb in case of jquery 3.2.1 - smaller logo on average website , can served google's cdn in cache of of visitors. using jquery means smaller file size of own javascript files, can mean smaller download, if not in browser cache.

  2. speed - writing pure javascript may faster, writing portable javascript seems impossible of people. website faster doesn't work on every popular browser useless in real world. besides jquery uses pretty heavy optimizations pretty damn fast , keeps getting faster every release, it's not easy write faster code hand other trivial examples.(*)

  3. "intellectual property" - company scared using else's code - while in fact jquery open source , free software used everywhere grandma's blog amazon, twitter bank of america, google microsoft - if can use company can use it.

  4. i can't remember hearing other argument being used seriously.

(*) here's trivial example: getelementbyid('someid') vs. jquery('#someid')

is using getelementbyid faster? yes. , of course checks parentnode catch when blackberry 4.6 returns nodes no longer in document, right? jquery does. , handles case ie , opera return items name instead of id, right? jquery does. if don't code not portable , introduce subtle bugs can difficult find. , getelementbyid trivial example 1 possibly find - don't me started on events , ajax , dom...

update:

there fourth result of asking why doesn't want use jquery. forgot put on list because not answer rather lack of answer. comment got yesterday reminded me it. hardly "technical reason" added list may interesting nonetheless , may the common reaction.

what suspect main underlying reason of reactions, though, believe biggest obstacle progress in computer science: "i don't want use because never did, therefore must not important."

it once reaction optimizing assemblers, compilers, structured programming, higher level languages, garbage collection, object oriented programming, closures or pretty take granted — , today it's ajax libraries. maybe day no 1 remember once used manually interact raw dom api on application level no 1 remembers once used write programs using raw, unadorned, inscrutable hexadecimal numbers.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -