• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Extending jQuery: Best Practices for Interfacing with Server Side Technologies

 
Eric Bresie
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been using JSP with jQuery embedded within the pages, with assorted data for use in jQuery such as JSON or XML data via a Spring or JSP bound variable/bean.

Does Extending jQuery touch on any best practices or scenarios for dealling with interaction between jQuery and server side technologies (i.e. JSP, Spring, etc)?

Eric
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Keith Wood
Author
Ranch Hand
Posts: 38
jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is one chapter on enhancing the Ajax processing of jQuery by adding custom transports and converters. Otherwise the book concentrates on the client side of operations.
 
Eric Bresie
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic