Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jQuery issues

 
Aaron Diffenderfer
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are some of the main areas that people struggle with when learning jQuery?
 
Michael A Hoffman
Ranch Hand
Posts: 37
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A few things I struggled with:

1) I was leveraging Spring MVC and jQuery together and my html element IDs leveraged dot notation. For example, I would have <input id="myObj.firstName" />. jQuery, of course, needs special characters escaped as part of the selector. I can't tell you how many times I forgot to escape a dot and had an issue arise.

2) I pulled my JavaScript code out of my JSPs and put them into jQuery widgets as much as possible. This allowed me to get better integration with the IDE; however, Eclipse still does not do the justice necessary for validating jQuery expressions. Often I would fat finger jQuery expressions and have failing code. FireBug is a life saver.

3) Performance became an issue several times when I emptying and rebuilding a container. We had several HTML tables that were rebuilt through JavaScript when an add, edit or delete was performed. Initially, I attempted to build and append each table column and table row; however, I got remarkable improvements by building a string buffer and then appending the entire buffer at the end of concatenation.
 
Keith Wood
Author
Ranch Hand
Posts: 38
jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I find that many people struggle with the asynchronous nature of JavaScript events and Ajax and the use of callback functions to be called at the appropriate time in the future.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic