• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Extending jQuery: Best Practices for Interfacing with Server Side Technologies

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Author
Posts: 38
jQuery
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Let's get him boys! We'll make him read this tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic