473,220 Members | 2,260 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,220 software developers and data experts.

jQuery - Should I spend my time on it?

TheServant
1,168 Expert 1GB
Hi guys,
I do most of my code in PHP, and when required I will use javascript (although I generally tweak already made code rather than making my own), but I am by no means an expert. I have been trying to find out how to make page content moveable and after exploring the web for a while I have come across several suggestions to use some jQuery functions.

This is purely for looks and is not required, but my questions are:
What are any disadvantages using jQuery over straight javascript? I gather the function library is required and will take more time to download per page? Is it much of a difference?
Do you recommend I learn and use it rather than writing (or finding) javascript functions from scratch?

Thanks for your time.
Apr 28 '09 #1
6 3505
Ciary
247 Expert 100+
i expect by moveable, you mean draggable?

if thats the case, try checking extjs.com. i dont know if you know it but its the best solution to make things draggable/resizable. also, most things that jquery provides can also be done using ext (sliders, buttons, ...)

if u do want to use jquery, it might take a few seconds to load the page indeed. you can also copy its libraries to your page making it faster. but still, its difficult to tweak jquery. ext on the other hand provides an override object in which you can change it's functions.

learning javascript from scratch is fine but some things are just to difficult. there, i advice you to use other libraries.

one more thing, i recommence using it the other way. try using javascript as much as possible and only use php when really neccesary. a few months ago, i swore by php, but now i know, you can do more using js. if you dont see another way then the use of php, try using an ajax request and put the php on that page. it's how i do it.

to use a database: use php to create a XML page and then use an ajax request to get the data.

hope that helped
Apr 28 '09 #2
Dormilich
8,658 Expert Mod 8TB
@TheServant
depending on the cache-control set on JQuery's server. usually the file is cached for subsequent use*, so the library is loaded only the first time it is called.

@TheServant
it's depending on the amount of functionality you use. libraries are good if you have many and complex tasks to do (like menus, eye-candy). I guess it's overkill for simple stuff like form validation.


* - it wouldn't make sense to force a reload every time, although it is possible
Apr 28 '09 #3
Markus
6,050 Expert 4TB
<marketing>
You're always going to, if not now, then in the future, need javascript when developing for the web; and having an awesome framework like jQuery as part of your repertoire will increase user-experience, and, as I just found out yesterday, is something employers will ask for.
</marketing>

In all honesty, it won't take you 5 minutes to get the framework basics, and from there, it's only a case of joining the mailing group on google / reading the _good_ documentation and you're a master.

Now, time to go drink a coffee and watch some scrubs.

Peace out, home dizzles.
Apr 28 '09 #4
acoder
16,027 Expert Mod 8TB
@Ciary
jQuery also provides drag-drop functionality.

if u do want to use jquery, it might take a few seconds to load the page indeed. you can also copy its libraries to your page making it faster. but still, its difficult to tweak jquery. ext on the other hand provides an override object in which you can change it's functions.
That's simply an opinion. There are other libraries too, each with their own fan-boys ;)

one more thing, i recommence using it the other way. try using javascript as much as possible and only use php when really neccesary.
That would be if you want to avoid unnecessary page loads/reloads, otherwise never depend entirely on JavaScript.
Apr 28 '09 #5
gits
5,390 Expert Mod 4TB
now here are my 2 cents too :) ... using a framework like jQuery (or ExtJs, or Dojo, or MooTools, or whatever) first depends on what you typically need. in case you just use basic functionality that you always need to have customized i would suggest to create your own 'custom' lib that generalizes your own JavaScript handling ... so that you could just reuse your code without the need of duplicating it, that would even give you the idea on how such frameworks work and what you would expect from such a framework ... but! and as you could see, that would lead to a kind of custom 'framework' and you could even consider one of the above mentioned frameworks to use as your base-framework. with such an approach you would have a base-lib that you would get to know better every time you would use it and typically you would start to use more and more of its methods, possibilities etc. ... using a lib that you create by your own would give you optimized code for your needs ... on the other hand: using a generalized lib gives you the lever to leverage your apps to another level ... and the power of the lever depends on your choice of the framework you would like to use. jQuery is quite powerful ... so are Dojo and ExtJs ... but all of them are a bit more 'heavy' compared to just prototype or MooTools ... but all of them have their area of use ... and typically the load-time doesn't suffer much from including any of such a lib.

kind regards
Apr 28 '09 #6
TheServant
1,168 Expert 1GB
Thanks everyone for your replies. I think I will download the jQuery library onto my server (so it's local) and then start reading. And for the record, I meant draggable, yes, but more generally as Dormilich said, "eye-candy".

I am sure i will be around the Javascript forums quite a bit for now while I try get deeper into the experience that is: Client Side!
Apr 28 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: DuaneMoraes | last post by:
A new book on jQuery, the powerful JavaScript library, has been announced by Packt In Learning jQuery, Karl Swedberg and Jonathan Chaffer, creators of the popular jQuery learning resource...
3
by: poe | last post by:
Hello, I've used the jQuery PNG fix on a website I'm working on, but the PNG images seem to be distorted "only sometimes" in IE6 and IE7. It seems to happen most often when the page is loaded for...
1
by: mikeh3275 | last post by:
I'm new to developing in jQuery, so I'm probably doing this wrong. I'm loading a form into a modal dialog box and I'm trying to assign a click event to the button in the form, but I can't seem to...
83
by: liketofindoutwhy | last post by:
I am learning more and more Prototype and Script.aculo.us and got the Bungee book... and wonder if I should get some books on jQuery (jQuery in Action, and Learning jQuery) and start learning about...
20
by: Aaron Gray | last post by:
There does not seem too be anyway to test if two jQuery references are the same element. Given :- ... <div id="1"></div .... Then :- alert( $("#1") == $("#1"))
26
by: RobG | last post by:
Do some of the regulars here need to re-think their (sometimes strident) opposition to libraries? Both Microsoft and Nokia have announced support for jQuery. It seems to have gained quite a bit...
53
by: souporpower | last post by:
Hello All I am trying to activate a link using Jquery. Here is my code; <html> <head> <script type="text/javascript" src="../../resources/js/ jquery-1.2.6.js"</script> <script...
5
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.