473,405 Members | 2,354 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,405 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 3512
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.