Friday, October 10, 2008

Jquery

It is :
* simple (include a javascript into ur existing page and you start playing with Jquery),
* light weight(core is just 20KB), pluggable/ extensible(thousands of plugins) and
* easy to use (implicit event handling, expression evaluation and function chaining to name a few).

Client-side
Also a jquery-form plugin( http://malsup.com/jquery/form/ ) makes HTTP form post much more easier.
This takes care of marshalling the HTML input fields automatically , make a form post and deal with the HTTP response.

Server-side
There is some work done already on (spring MVC + jquery) http://www.infoq.com/articles/First-Cup-Web-2.0-Joel-Confino
Tried a prototype using this and jquery-form. Actually it works well with Xstream and Jettison mapped driver .
Also converting the existing spring MVC controller to have AJAX capability is just a matter of setting a custom Json View instead of existing Velocity
view.

Data can be transferred from browser to server in either of the format:
JSON(Java script object notation) or XML.
JSON is simple as it gives you a java like object graph and is more popular in open source community.
However it lacks XML flexibility (like having attributes,etc)

Obviously, having an IDE for jQuery would make development easier. Searched around for an IDE with JS code completion and debugging capabilities.
There are few of them to evaluate - Aptana and Spket IDE.

JQuery... Ahh kids play, is it really? find out yourself http://www.youtube.com/watch?v=8mwKq7_JlS8
How it works : http://docs.jquery.com/How_jQuery_Works
Best practises
http://www.smashingmagazine.com/2008/09/16/jquery-examples-and-best-practices/
Examples http://www.noupe.com/jquery/50-amazing-jquery-examples-part1.html

No comments: