Bear Bibeault wrote:There really isn't any interaction between jQuery and the server side except through Ajax. Remember that all that server-side markup that's in a JSP results in an HTML page that is sent to the browser, and it's that HTML page that jQuery will interact with.?
Or are you asking about jQuery integration into framework code?
Interaction / Integration with frameworks was the direction I was curious about. Thats the area where I feel it is easy to get confused and was looking for best practices, hopefully addressed as part of jQuery Extensions.
As an example scenarios say we have JSP page with javascript and jQuery code, which populates/filters a select widget via a Spring form:select element, populated with Spring reference Data or a dynamic data attribute binded from a hidden field to the command bean attribute associated with the page, which then you may want jquery to adjust a selected item or filter the list in some way based on other client side selections.
Do you have a variable containing XML, JSON, arraylist, Collections, object, etc which then gets handled in some way specific way on the server side which has to be handled slightly different on the client side (i.e. have to parse XML or JSON, etc) or how best to handle in the client side in general (i.e. data treated as a javascript object, an [], or something else).
Then you have other frameworks (i.e. spring,
JSF, Ice Faces, etc) that may provide "Integration with other frameworks" which adds to the confusion.
I suppose in the end a good approach is to try to minimize the dependency on server side data whenever possible and make sure the interface handles the cases when it is necessary and stays consistant over time.