I have recently been thinking alot about where to draw the line, and I wanted to get some answers from you experienced developers out there. When is it acceptable to reference jQuery in a web app?
Some supporting arguments for Always Using jQuery:
- You can reference jQuery from Google's repository, where it might already be cached on the client, eliminating the extra hefty request
- You don't have to deal with common cross-browser issues, as they are already taken care of
- You enjoy writing the code because it is developer-friendly
Some supporting arguments for Never Using jQuery:
- Unsettling dependency of a third-party library, which could contain costly bugs, and could lead to unjustifiably poor performance
- You have to learn a new syntax (just when you thought you had regular Javascript figured out...)
- Even the simplest of tasks can perform poorly, because of the inherent complexity of the framework
I listed arguments as part of the question because I do not wish to have answers weighing the arguments of both sides. I am hoping for always/never answers, preferrably with test case scenarios (vague or detailed).
For example: "If I ever need to do any AJAX requests in my web app, I always use jQuery".