4 ms·
The Argument for jQuery
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.)
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.
(unfortunately HN comments eat tabs and spacing for breakfast.)
---------
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.
The benefits provided by jQuery
a. Ease of development.
i. Code written with jQuery is more compact, easier to read, and more maintainable than javascript written traditionally to do the same thing.
ii. It is possible to quickly achieve required results using jQuery that might take 10x as long to achieve with standard javascript code.
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.
b. Automatic cross-browser functionality
i. jQuery is designed to get rid of cross-browser differences between javascript implementations.
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.
c. Advanced UI features
i. jQuery comes with many built-in visual effects.
ii. See http://docs.jquery.com/Effects and http://docs.jquery.com/UI for examples.
d. Excellent overall performance speed
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.
- ichverstehe 18y agoSo, let me get this right, you're using no-framework, pure JavaScript at the moment?
- geuis 18y agoWe 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 18y agoTaking what arockwell said, can you not just drop jquery.js into core.js? I.e. rename jquery.js.
- geuis 18y agoNot that simple unfortunately.
- arockwell 18y agoIf 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.
- GrandMasterBirt 18y agoI 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!
- mschwar99 18y agoDon'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 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.whitehouse.gov/ http://www.epa.gov/region09/ http://www.epa.gov/region09/
- quadhome 18y agoAre they the sorts to be swayed by a "supported by Microsoft" argument? http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and...