11 Feb, 2009

13 reasons for using jQuery

Posted by: Mahbub In: misc

Well, there have been many articles on the WWW which would suffice “Why jQuery is the choice”. To me, it’s just precise, well structured, high learning curve and easy to use. When I was in the beginning of my Undergrad back in 1999, there was no library to deal with the cross browser issues (Netscape used to make life miserable for javascript programmers). So we had to write longer scripts for a specific purpose and handle the cross browser issues. Thomas Brattli at dhtmlcentral gave some pretty good scripts on menus and some libraries which we used to implement. But above all there was no such good library which could do magics, a library that you can extend easily the way you want, something meets the real programming standard. The journey to making javascript framework began much early. There are quite a number of libraries that started namely mochikit, prototype, mootools, dojo etc. But you should use jQuery for :

    1. Very Lightweight, weighs less than 20k when minimized and gzipped.
    2. High learning curve.
    3. Super chainability. Almost Every jQuery method returns the Jquery object which lets you put methods in tails one after another. like $(“#div_one”).css(“border”,”1px solid #000″).fadeTo(300,0.5).slideUp(300);
    4. Can be used with other libraries such as mootools using noconflict().
    5. Easy to write plugins.
    6. Code becomes short, sweet and easy to understand.
    7. You don’t have to be a Javascript geek top write jQuery codes.
    8. IMPORTANT :  Vast community support and contributions.
    9. Used by major open source applications like Drupal, Wordpress.
    10. Microsoft chose jQuery to use it with their applications. (may be a good point to some MS fans ;) )
    11. Very easy to play with DOM. Lot of built in methods integrated. DOM selectors are very untuitive.
    12. Supports XPATH selectors.
    13. VERY VERY easy built-in AJAX utilities. (leave me an email if anyone needs to know how easy this is).

      Ok.. enough for now. The list could go quite long.

      More to come soon.

      5 Responses to "13 reasons for using jQuery"

      1 | jeevan

      March 11th, 2009 at 9:01 am

      Avatar

      hi would u tell me about the jquery ajax in a simple way ??
      Thanks.

      2 | Mahbub

      March 11th, 2009 at 9:56 am

      Avatar

      Sure : It’s pretty easy. There are different ways to send AJAX request via jQuery. But it’s always better to use the base function.

      it goes like this
      $.ajax({
      url : "your_url",
      type : "post",
      data : "&param1=value1&param2=value2",
      success : function (response){
      alert(response)
      }
      });

      The properties are pretty self explanatory. For a detailed documentation on AJAX request, you can find on jQuery site http://docs.jquery.com/Ajax and in short here http://docs.jquery.com/Ajax/jQuery.ajax#options

      I found it the easiest amongst all the libraries like prototype, mootools, dojo and Ext

      3 | Oscar Godson

      March 19th, 2009 at 1:53 pm

      Avatar

      Do you mean jQuery has a low learning curve? Wouldn’t a bigger curve mean more to learn therefor harder? A hard library to learn isn’t a good one ;)

      4 | Mahbub

      March 20th, 2009 at 7:28 am

      Avatar

      I think I’ve read in operations management that a high or steep learning curve means that “when things are easy to learn it has a high learning curve”. In other words if a task has 80% learning curve rate it means that second unit of the task takes 80% of the first and third takes 80% of the second.
      JQuery is extremely easy to learn and i think i should have written high learning curve rate and it would not confuse people ;)

      Comment Form


      Translator

      Tags