Sei sulla pagina 1di 3

log in | careers | chat | meta | about | faq

search

Questions

Tags

Users

Badges

Unanswered

Ask Question

What is the difference between Javascript,Jquery and Ajax programming?


Hello World!
This is a collaboratively edited question and answer site for professional and enthusiast programmers. It's 100% free, no registration required. about
asked Jun 27 '10 at 16:14 Jay 76 1 4 75% accept rate

7
2

Hey I am new to javascript, Ajax and Jquery.. What are the difference in these programming. It seems Ajax and Jquery are using javascript. so what is the basic difference between these programming languages?
javascript jquery ajax

faq

link | improve this question

tagged
javascript jquery ajax

210499

181436

37879

This question seems appropriate, so many do not relate JavaScript with jQuery. ChaosPandion Jun 27 '10 at 16:49

feedback

asked 1 year ago viewed 1,008 times active 1 year ago

5 Answers

active

oldest

votes
Get the weekly newsletter!
Top questions and answers Important announcements Unanswered questions Sign up for the newsletter see an example newsletter

Javascript, for the purposes of this question, is a client-side (in the browser) scripting language.

jQuery is a library/framework built with Javascript. It is very popular because it (nearly universally) abstracts away cross-browser compatibility issues and it emphasises unobtrusive and callbackdriven Javascript programming. AJAX (Asynchronous Javascript XML) is a method to dynamically update parts of the UI without having to reload the page - to make the experience more similar to a desktop application. EDIT: It sounds like you're new to this. I would seriously recommend you check out http://www.w3schools.com/js/default.asp to get started. It's what I used to learn javascript and it's done incredibly well.
link | improve this answer answered Jun 27 '10 at 16:20 Tyler 1,014 1 6 26

Linked
JavaScript: Public methods and prototypes Difference between ajax and javascript

Related
jQuery ajax calling javascript function what is the difference between ajax and jquery and which one is better? jQuery Ajax JavaScript Execution What is the difference between jQuery and JavaScript? Javascript JQUERY AJAX: When Are These Implemented

hi i have go through the stuff you gave for jquery. i found the basic's it was easy. but is there any other website for learning jquery from basic level to next level Jay Jul 13 '10 at 14:19 Well at this point I would recommend you pick a project you want to work on and do it. The best way to learn 'advanced' jQuery is to use it in practice. That's the way I learned. Also, if you like my answer the best, you can click the check box to accept it :) Tyler Jul 13 '10 at 23:28

feedback

18

Of the three only javascript is a programming language. jQuery is a framework that is based on javascript and that simplifies some tedious tasks like manipulating the DOM, adding some effects and animations and most importantly doing it in a cross browser fashion. One of the tasks that is simplified by jQuery is AJAX which is a concept allowing a browser to send an asynchronous request to a web server allowing for richer web applications.
link | improve this answer answered Jun 27 '10 at 16:16 Darin Dimitrov 315k 21 385 591

JavaScript: What is AJAX? What is jQuery? jquery - loading inline javascript via AJAX Help me choose between Javascript, jQuery, or AJAX jQuery's AJAX call to a javascript class method difference between json and ajax? when should what be used?

feedback

feedback

Loading Javascript through an AJAX load through jQuery? Javascript difference between eval() and appending script tags What's the difference between jQuery and JavaScript? Javascript/JQuery ajax help needed difference between Javascript and Jquery difference between ajax and jquery? jQuery ajax request and inline javascript Javascript array to php with jQuery ajax Difference between ajax and javascript jQuery + Javascript: Consolidate duplicate functions between document.ready and ajax load What is the difference between JSON and AJAX with jQuery? jQuery - Difference between replaceWith making ajax call or vice versa Difference between reverse ajax and normal ajax What's wrong with this jQuery AJAX request? What is the difference between form data and request payload?

Actually only one of them is a programming language.

Javascript is a programming language which is used mainly in webpages for making websites interactive. When a webpage is parsed by the browser, it creates an in-memory representation of the page. It is a tree structure, which contains all elements on the page. So there is a root element, which contains the head and the body elements, which contain other elements, which contain other elements. So it looks like a tree basically. Now with javascript you can manipulate elements in the page using this tree. You can pick elements by their id (getElementsById), or their tag name (getElementsByTagName), or by simply going through the tree (parentNode, firstChild, lastChild, nextSibling, previousSibling, etc.). Once you have element(s) to work with you can modify them by changing their look, content or position on the page. This interface is also known as the DOM (Document Object Model). So you can do everything with Javascript that another programming language can do, and by using it embedded into wepages you also get an in-memory Object of the current webpage by which you can make changes to the page interactively. AJAX is a technique of communication between the browser and the server within a page. Chat is a good example. You write a message, send a message and recive other messages without leaving the page. You can manage this interaction with Javascript on the client side, using an XMLHTTP Object provided by the browser. jQuery is a library which aims to simplify client side web development in general (the two other above ). It creates a layer of abstracion so you can reuse common languages like CSS and HTML in Javascript. It also includes functions which can be used to communicate with servers very easily (AJAX). It is written in Javascript, and will not do everything for you, only makes common tasks easier. It also hides some of the misconceptions and bugs of browsers. To sum up: Javascript is a programming language (objects, array, numbers, strings, calculations) AJAX and jQuery uses Javascript jQuery is for simplifing common tasks with AJAX and page manipulation (style, animation, etc.) Finally, an example just to see some syntax: // page manipulation in javascript var el = document.getElementById("box"); el.style.backgroundColor = "#000"; var new_el = document.createElement("div"); el.innerHTML = "<p>some content</p>"; el.appendChild(new_el); // and how you would do it in jQuery $("#box") .css({ "background-color": "#000" }) .append("<div><p>some content</p></div>");
link | improve this answer edited Jul 4 '10 at 22:46 answered Jun 28 '10 at 15:03 galambalazs 16.5k 1 22 38

feedback

AJAX is a way to talk to the server in the background. JavaScript is a language that the browser understands. jQuery is a JavaScript framework that makes life easier for people who want to program for the browser.
link | improve this answer answered Jun 27 '10 at 16:44 Void 306 2 8

feedback

AJAX is a method to do an XMLHttpRequest from a web page to the server and send/retrieve data to be used on the web page. It stands for Asynchronous Javascript And XML. It uses javascript to construct an XMLHttpRequest(varies between browsers). jQuery is a javascript framework that can be used to manipulate the DOM (search and interact with the DOM). jQuery implements a high-level interface to do AJAX requests abstractly thereby giving multi-browser support in making the request.

So, Ajax is a technology paradigm, whereas jquery is a library so can't compare them.
link | improve this answer answered Jun 27 '10 at 16:46 CodeToGlory 8,065 3 14 52

feedback

Your Answer

Name Email
or

log in

Home Page

Post Your Answer

Not the answer you're looking for? Browse other questions tagged
javascript jquery ajax or ask your own question.

question feed

about | faq | blog | chat | data | podcast | shop | legal | advertising info | mobile | contact us | feedback

stackoverflow.com api/apps careers serverfault.com superuser.com meta area 51 webapps gaming ubuntu webmasters cooking game development math photography stats tex english theoretical cs programmers unix apple wordpress physics home improvement gis electronics android security bicycles dba drupal sharepoint scifi & fantasy user experience skeptics rpg judaism
site design / logo 2012 stack exchange inc; user contributions licensed under cc-wiki with attribution required

rev 2012.5.14.2564

Potrebbero piacerti anche