Now, client side document manipulation,
dynamic content with effects has become the vital part in all Web application
development. This client side manipulation is done with help of JavaScript and
CSS. JQuery is simply a library of JavaScript-functions. It contains well
written and tested common functions. We can also add our methods/functions to
it. jQuery functions(Browser Sniffer) guarantee to work in any browser because
they are written in that fashion (ECMAScript is a standard and JavaScript is one
of its dialects. Since jQuery is a JavaScript library, any browser supporting
JavaScript will automatically support jQuery. Though, jQuery is not standardized
by ECMAScript.)
Starting with jQuery is very easy. You need to know the only basics of
JavaScript or even you can start without knowing JavaScript. But, usage of
JavaScript shouldn't be avoided in developing rich responsive web applications.
One should use JavaScript also whenever, wherever it is required. You can mix
the jQuery with native JavaScript also. Generally, we write many line of code in
JavaScript to accomplish a task, but jQuery makes it easy for us and same can be
accomplished in 1 or few lines of jQuery.
Is there only jQuery which contains a good collection of common JavaScript
functions?
No, there are many other JavaScript library collections with their own pros and
cons. They also provide us the same thing i.e. manipulating or access to DOM
model and AJAX functionality. So selection choice for these JavaScript libraries
depends upon the requirements. There may be chances that other JavaScript
Library may be more suitable to some kind of web development rather compare to
jQuery.
Here are few popular JavaScript libraries
- JQuery (Created by John Resig and released in January 2006 as free and open source under MIT license. Now it has a very big team for its development with few other jQuery Core related projects like jQuery Mobile, Sizzle, jQuery UI, QUnit. It is very popular and has easy syntax patterns with documentations and examples.)
- MooTools (Created by Valerio Proietti and released in September 2006. It has gained much popularity due to its plugins. Bing and Joomla are using this library framework. Its Plugins are widely being used on Wordpress blogging platform. It is little bit harder to use as compare to jQuery)
- Prototype (Created by Sam Stephenson in February 2005 for Ajax support in "Ruby on Rails" . It supports XMLHttpRequest protocol that reduce entire webpage reload at browser for dynamic web pages. Ex. used in Ruby on Rails)
- Dojo Toolkit (Created by Alex Russell, Dylan Schiemann, David Schontzler, and others in 2004. This library is providing much more than other libraries in terms of Classes, Constructors, and inheritance in JavaScript. It is also gaining more popularity since it's released from 2004/05 year. It comes with 3 components: Dojo core, Dijit and DojoX. It is little bit harder to use as compare to jQuery)
- Ext (Created by Jack Slocum in 2008 as an add-on library extension of YUI. Now don't have any dependency on other library. This is known for its compatibility with jQuery and Prototype though its syntax is differing. It has predefined UI objects and easily can be called into web pages. This gives rich controls handling like radio buttons, toolbars etc.)
- Script.aculo.us (Created by by Thomas Fuchs in June 2005. It is built on the "Prototype JavaScript Framework" and has very rich set of effects functionality. Used on Ruby on Rails platform.)
There are many others but I have pointed few
popular of them. I personally prefer jQuery usage for its simplicity and power.
So why to go for jQuery?
JQuery has several benefits over using other JavaScript libraries. It has great
AJAX supports with easy DOM-model access. It is more easy to use compare to
other libraries. Large numbers of plug-ins are available for it. JQuery also has
a good level of tutorials and examples. JQuery is simple in use and easy to
extend. And also it is most popular library collection among others.:)
Since, I work on Microsoft technologies and Microsoft itself is adopted jQuery,
so how can I avoid it over other JavaScript libraries. Microsoft has adopted it
for use within ASP.NET AJAX framework and ASP.NET MVC Framework. Also a big
brand "Nokia" in cell-phone arena has integrated jQuery into its Web Run-Time
widget development platform.)
JQuery is rocking and widening day by day.
Power of jQuery (What we can do with help of jQuery)
There are two basic requirements in developing web applications - 1) access to
DOM model and 2) AJAX for making dynamic web. And jQuery provide these
functionalities. In brief we can perform following things with jQuery
- Event handling of HTML element
- Usage of Common Utilities written in jQuery
- Easy AJAX calls with flexible options (raw Ajax with many customized APIs)
- CSS handling
- Applying effects and animations
- DOM/Html elements manipulations
- DOM traversal and modifications
- DOM filtering APIs
- Use of Chaining and Call-back functionality
- Access to third parties well written/developed plug-ins for more beautification.
- Multi browser support
How to start using jQuery?
As I mentioned above, it is a collection of well written functions, so we need
to have it before utilizing it. This functions collection (library) is stored in
a scripting file (js file) and we have to refer this. It can be downloaded from
http://jQuery.com/ . This is a small
library file and its size is in Kb. It comes in two modes
- Developers mode file (around 252 kb in size) and
- Minified or Production mode file (around 32 kb in size)
Minified is smaller in size because it is
compressed and so used in production. Developer mode file is heavier because it
has readable/formatted code and so used in developing for debugging or
customizing.
So in order to use jQuery, we need to refer any of above mentioned mode file in
our application. We refer it in <head> tag before using it as Browsers parse
<head> part first and ideally css then scripts. Browser starts executing the
scripts in their order. Then <body> contents are parsed and drawn. So, when we
refer this collection file, it gets downloaded at each web user end and cached
by Browser. There are two ways to get reference of this library file
- Store this library file locally or own web-server (after downloading it from http://jQuery.com/) along with application resources (pages, images, CSS etc,) and refer it on page.
- Directly refer from shared CDN (Content Delivery Network) provided by many web-servers like Google and Microsoft.

Anil KumarPosted Dec 3, 2012, 7:31 AM
tnx anuj sir :)
Anuj SinghalPosted Dec 3, 2012, 7:24 AM
Very Nice Article. I appreciate.....