Friday, April 18, 2008

JQuery - Web 2.0 framework

Jquery opens up a new way of thinking in javascript programming. It is something really an abstraction in implementing old javascript ideas. Definitely, it is worth trying if you want to develop components for Web 2.0 based application.

When you try to implement some new rich user functionalities with rudimentary, it is time consuming and error-prone. Imagine that if you want to write a effects such as fading out a html element using ordinary javascript, it will take time and you should be little expert to do that. I mean you require some experience.Initially; you need to understand how dhtml is going to work Not only it is difficult for novice programmers; it is time consuming when we debug it. So this framework comes to rescue any experienced as well as novice javascript programmers to think in JQuery way. Initially it is bit intimidating to understand what this stuff is, but gradually it is really useful to useful in adapting this framwork.OK.Enough with the story

So anybody has thought that the Javascript is really stupid, and then it is right time to change that notion. Let us look into some of its concepts.

Jquery supports objected-oriented programming. And also, it supports Chaining. Chaining means, we can place successive actions or method invocations (for example) in a single call. So you do not have to make nested method calls to arrive the final result. But how do you make such a call. Let us say you need to add fade or hide a &l;div> element in an html document. So you can do it by

$("div").fadeOut() ;

Or

$("#idvalueofdivtag").fadeOut();

where as "div" is an HTML element type or #idvalueofdivtag is name of <div> tag's ID name present in the document. With the above execution contents between that <div> tags will be faded out. Of course, you need to decide what event will be fired to make the above call in order to achieve the result. It is pretty simple, right.

If you get a time, then please have a look at this web site, http://jquery.com/. If you see this web site at least once, it has got once nice demo of this framework on the opening page itself. Feel the experience. It is really superb.

Already there are two books written on this amazing framework. Two chapters are free to download from ‘Jquery in action’, published by Manning Publications. It has provided nice tutorial also on the site which you are required to go through it. It is really worth reading.

This framework never stops you using other frameworks. If you really need another javascript source to be used along with this, then Jquery has provided an alternative.
jQuery.noConflict(). This method call will create an alias to Jquery object itself and can prefix to the normal method routines.That way the conflicts can be eliminated.

Also, you can see numerous plug-INS have already been developed to enhance rich user experience.
Personally I felt this one more better performing than other web2.0 frameworks developed in JavaScript. Google also started using this framework!.

No comments: