Jump to content

Add a new section for Jquery


Recommended Posts

I can't be the only one who has no desire to learn or use jquery.

 

Ha! I think you might be.

 

In all seriousness, we can't really split the boards into a different category for each and every framework. jQuery is Javascript, Ajax on the other hand is a completely different kettle of fish.

Link to comment
Share on other sites

I understand that JQuery is probably the most popular JS framework, but also agree that it doesn't warrant its own section.

 

BTW, why do you not want to learn JQuery, or a framework for that matter?

Link to comment
Share on other sites

I have not found a site that explains jquery. Even it's official site just shows a couple of things that you can do but not how or why. Because of that I have never spent much time with it. Most frameworks load a large amount of overhead and the coder may just use a little bit of it on the site. It's that initial large file that turns me off. Here's an over stated example, but based on truth. " I down loaded a program that was like 1K large that did hundreds of things. Wow, too good to be true. Tried to run it and got - 'you need to have dot net installed on your computer to run this program'. DOT NET, that's 5 billion bytes. It would choke my hard drive, it would cause famine in the corn belt." So it really wasn't so small a program after all. If you could customize jquery so it only loaded the part you needed, like the code for rounded corners, then I'd want to use it, but so far I don't know if that's possible. Is it? Is there a site that teaches what is needed to get started in jquery? If I was given a decent explanation of how to use it and what can be done with it I'd give it a shot.

Link to comment
Share on other sites

jQuery is nothing more than what has already been said... a framework.

 

By definition.. a framework is

# A software framework, in computer programming, is an abstraction in which common code providing generic functionality can be selectively overridden or specialized by user code providing specific functionality. ...

http://en.wikipedia.org/wiki/Framework_(software)

 

# The arrangement of support beams that represent a buildings general shape and size; The larger branches of a tree that determine its shape; A basic conceptual structure

http://en.wiktionary.org/wiki/framework

 

If that's too vague then I'll spell it out.  In the beginning, there was Javascript.  There are literally thousands (probably billions) of different ways to use the language.  The only problem with each new idea as technology progresses is that the javascript scripts get broader and broader... and broader.    So eventually someone is destined to come along and say, I'm going to shorten these 500 lines of code to 50 and make it do the same thing, if not better.  Essentially, jQuery is just a language written from Javascript code.  If you look inside the jquery core file you'll see Javascript and lots of it, but the code is condensed and obfuscated so much that one would probably think it's alien.

 

The moral of the story is, jQuery isn't required to do the things it CAN do, but it sure as hell makes it easier to implement.

 

Just as an example, if you wanted to create a simple AJAX script using plain ole Javascript, you must determine:

- the browser being used and it's version

- and which XML object to create according to the browser.

 

try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
}
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
try {
	xmlhttp = new XMLHttpRequest();
} catch (e) {
	xmlhttp=false;
}
}
if (!xmlhttp && window.createRequest) {
try {
	xmlhttp = window.createRequest();
} catch (e) {
	xmlhttp=false;
}
}

.. and that code only determines which browser is used and starts an "AJAX" object accordingly.. there are no variables sent (AJAX'd) anywhere

 

In jQuery, it's as simple as

$.ajax({
   type: "POST",
   url: "some.php",
   data: "name=John&location=Boston",
   success: function(msg){
     alert( "Data Saved: " + msg );
   }
});

In this code, the Object type has already been determined and the variables are even being sent.

 

Does that clear things up?

 

Also, this should be moved to the Javascript Forum, it's apparent from the OPs last reply that this is a question.

Link to comment
Share on other sites

I too was once a naysayer.  I thoroughly resisted jQuery and other frameworks.  I thought wtf is up with all these lazy bums who can't be bothered to learn real javascript?  So I did it the "traditional" way.  I wrote everything out, just like in Zanus's example.  And it was tiresome, and I thought hey, why don't I just put all that into a little wrapper function to make it easier for me? And so I did.  And with other things, too. 

 

Then one day I was forced to learn jQuery because of a particular problem with a particular project from a particular client.  And that was when I realized that I had done exactly what jQuery had already done (only they did it better).  To this day I proclaim jQuery is the greatest invention since sliced bread, and my only regret is how long I stubbornly refused to jump on the bandwagon.

Link to comment
Share on other sites

To this day I proclaim jQuery is the greatest invention since sliced bread

 

I agree entirely. Not having to mix JavaScript in with your markup alone is of massive benefit, let alone all the extra functionality you can implement in just a few lines of code.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.