1 / 4

AJAX A synchronous J avaScript A nd X ML

AJAX A synchronous J avaScript A nd X ML. BTM 395: Internet Programming. Limitation of client-side programming. Client-side programming (i.e. JavaScript) cannot access the server directly No access to databases No reading or writing files on the server

dana
Download Presentation

AJAX A synchronous J avaScript A nd X ML

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. AJAXAsynchronous JavaScript And XML BTM 395: Internet Programming

  2. Limitation of client-side programming • Client-side programming (i.e. JavaScript) cannot access the server directly • No access to databases • No reading or writing files on the server • Only exception is content available to HTML, like images and CSS • Advantages are for security • Protects web servers from malicious JavaScript code

  3. Limitation of server-side programming • Server-side programming (e.g. PHP, ASP, JSP) cannot access the client’s browser directly • Once the web page is served, it cannot be changed further • No interactive responses to user actions • Any interaction requires reloading the page and responding to GET, POST, cookies or sessions • HTTP is a stateless protocol • Once the server sends a page to the client, there is no active connection maintained • Thus the server cannot know what the client does until a new page request is made

  4. Ajax: marrying client- and server-side web programming • Ajax permits web clients to interact with the web server without having to reload the entire page • Basic procedure • JavaScript creates an XMLHttpRequest (Ajax) object • This Ajax object makes a call to a server-side script • Normally, must be the same server that provided the HTML page, but there are secure ways to get around this • The Ajax object receives data in response • The received data can be manipulated through JavaScript • Raw Ajax coding is possible, but programmers normally use frameworks like jQuery to make it simpler

More Related