

The Argument for jQuery - geuis

So myself and my other frontend developer I work with have been sold on jQuery for a long time. We have been talking it up for months but typically, we have to sell this to "the people in charge". (See another of my submissions for my feelings about where I work.)<p>I am writing up the reasons we are building with jQuery and why we want to use it site-wide. So I'm posting my argument below, because I would like to get some other folks' opinions about this and turn this into a mini-document that other developers in our situation can use in your own companies.<p>(unfortunately HN comments eat tabs and spacing for breakfast.)<p>---------<p>The javascript written to enabled dynamic interactions within our site is written with the jQuery javascript library. The intent is that jQuery will become the standard way we implement javascript across all of our site.<p>The benefits provided by jQuery<p>a. Ease of development.<p>i. Code written with jQuery is more compact, easier to read, and more maintainable than javascript written traditionally to do the same thing.<p>ii. It is possible to quickly achieve required results using jQuery that might take 10x as long to achieve with standard javascript code.<p>iii. Using jQuery does not prevent us from using regular javascript where necessary. jQuery is written in javascript simply makes it easier to do most things.<p>b. Automatic cross-browser functionality<p>i. jQuery is designed to get rid of cross-browser differences between javascript implementations.<p>ii. Adding/removing events and DOM manipulation are things that are easy with jQuery that require excess code and development time to have them function the same in all browsers traditionally.<p>c. Advanced UI features<p>i. jQuery comes with many built-in visual effects.<p>ii. See http://docs.jquery.com/Effects and http://docs.jquery.com/UI for examples.<p>d. Excellent overall performance speed<p>i. Thousands of users of jQuery have helped to contribute code and fix bugs in the library that have made it very fast compared to other libraries and traditionally written javascript.
======
mschwar99
Don't know what kind of management you are pitching this to, but when I have
had to convince "semi-technical" manager types I have found pointing to other
places that use the same tech helps. It at least gives them a feeling of cover
- that their techies aren't using some wacky or risky techs.

IBM, Google, etc etc (<http://docs.jquery.com/Sites_Using_jQuery>)

Even traditionally conservative (and accessibility obsessed) government web
sites are moving to jquery:

<http://www.whitehouse.gov/>

<http://www.epa.gov/region09/>

------
arockwell
If you just start using jquery would anyone know besides yourself and the
other frontend developer?

At my current job I've found the old adage that its better to ask for
forgiveness than permissions works wonders.

------
quadhome
Are they the sorts to be swayed by a "supported by Microsoft" argument?

[http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-
and...](http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-
microsoft.aspx)

------
ichverstehe
So, let me get this right, you're using no-framework, pure JavaScript at the
moment?

~~~
geuis
We have a core.js file that is approaching 4 years old. As we're relaunching
the site channel by channel and on the frontend, we want to use jquery for
everything

~~~
jamesbritt
Taking what arockwell said, can you not just drop jquery.js into core.js? I.e.
rename jquery.js.

~~~
geuis
Not that simple unfortunately.

------
GrandMasterBirt
I have an easier argument. Come up with a half-interesting problem and ask
them to solve it with and without jq. they will immediately love JQ. We snuck
it in because we wanted the .load functionality. And I assure you everyone
immediately fell in love. After that it was not long until cool animations
started to appear. People started saying "hey whats that really cool thing you
did with the UI in that app, how do we do something so cool too?"

The niceness of just DOM manipulation + some ajax simplifiers + animations =
awesomeness!

