|
IronXavi
Date:: Mar 06, 2009
Time:: 08:17
|
There are lots of differences, but one of them is the key: ASP is a server-side scripting language, while JavaScript is a browser-side scripting language.
ASP is executed by the server, therefore it is allowed to process HTTP request headers (cookies, web page referer, user agent string and other personal info sent by the browser at the moment of the request, etc.), connect to databases and operate on them, read or write to log files and a lot more, even run some programs on the server. So it can generate Dynamic HTML content and serve it to the user's browser. A login page, for example, requires a server-side script (in ASP, PHP...) to check the validity of login and password (fixed text, info from a database...) and generate the appropiate HTML content.
JavaScript, on the other hand, has a limited access to HTTP headers and cannot do anything that should be done on the server side (since it operates on the visitor's browser). It can, however, respond to user actions over the webpage the server has generated, and interact with it (the server has told the browser which options are available to the user and what should it do in response to the actions from the user). Javascript is much more limited, but it provides the tools to extend the behavior of the web page when the server has finished processing and lost control over it.
AJAX is a way to call for server interaction within JavaScript, so a totally interactive website is achieved by closing the circle.
IronXavi
|