Difference between javascript, jscript, jquery, ajax, json and xml

I spend the 4 hrs 30 minutes to clear my confusions. One is this article and other is Difference-of-apache-nginx-mongrel-webrick-phusion-passanger-capistrano

I have lot of doubts about Scripting and programming language. I often understand the difference between them using stackoverflow.com Q/A also using wikipedia for the clear cut. Acknowledging that am not holding any credentials for this article. I’ve just sum up the all the answers to know the difference between this languages and framework as it would be very useful to the fellows like me. Thanks to SOF and wiki members.

 

JAVASCRIPT

JavaScript is the common term for a combination of the ECMAScript programming language plus some means for accessing a web browser’s windows and the document object model (DOM).

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

Javascript is a programming language (objects, array, numbers, strings, calculations)

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.

Think of JavaScript like a foriegn language which you are learning, or even  know. But if you goto a country where it is spoken, a guide can still help  you along, making your journey easier. jQuery is one of many frameworks  which provide help in areas that can be frustrating when writing plain  JavaScript.

 

Also, JavaScript has nothing to do with Java, despite the name. 🙂

JQUERY

JQuery is a JavaScript library/framework that handles many commonly used features  and also handles the differences between, e.g., Internet Explorer and  standards-compliant browsers. It’s something you can use to reduce the  amount of work when creating web-based applications.

It is very popular  because it (nearly universally) abstracts away cross-browser compatibility  issues and it emphasises unobtrusive and callback-driven Javascript  programming.

JavaScript is the language itself. While jQuery is a  framework for helping you use that language  who are doing common web tasks.

Difference between Jquery and Ajax

Jquery simplifies some tedious tasks like manipulating the DOM((search and interact with 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.  jQuery implements a high-level  interface to do AJAX requests abstractly thereby giving multi-browser  support in making the request.

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.

So, Ajax is a technology paradigm, whereas jquery is a library so can’t  compare them.

 

AJAX

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).

It 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.

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.

To sum up:

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>”);

————

JScript is Microsoft’s version of JavaScript. The programming language  itself is very similar to ECMAScript, but the DOM access differs in many  respects.

Other frameworks which you might want to look at are things like: Dojo  http://www.dojotoolkit.org/ / Prototype http://www.prototypejs.org/

Advertisements

7 thoughts on “Difference between javascript, jscript, jquery, ajax, json and xml

  1. So basically jquery is more efficient way to implement javascript . or we can say it reduces code lines .

    and Ajax is used to send http request for a particular UI that needs to exchange info or to dynamically change ??

Share your thoughts:)

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s