CS 371 Web Application Programming

Slides:



Advertisements
Similar presentations
6/3/2015eBiquity1 Tutorial on AJAX Anubhav Kale (akale1 AT cs DOT umbc DOT edu)
Advertisements

AJAX Presented by: Dickson Fu Dimas Ariawan Niels Andreassen Ryan Dial Jordan Nielson CMPUT 410 University of Alberta 2006.
1 Cleaning up the Internet Using AJAX, SOAP and Comet CS526 Mike Gerschefske Justin Gray James Yoo 02 May 2006.
AJAX (Asynchronous JavaScript and XML) Amit Jain CS 590 – Winter 2008.
Does Ajax suck? CS575 Spring 2007 Chanwit Suebsureekul.
1 JavaScript & AJAX CS , Spring JavaScript.
Agenda What is AJAX? What is jQuery? Demonstration/Tutorial Resources Q&A.
Making AJAX Easy with jQuery Chris Renner Health Systems Analyst Programmer & Informatics Manager VUMC Office of Grants & Contracts Management October.
Chris Pinski.  History  What is Ajax  Who uses Ajax  Underlying Technologies  SE Aspect  Common Problems  Conclusion.
Introduction to AJAX AJAX Keywords: JavaScript and XML
Ajax (Asynchronous JavaScript and XML). AJAX  Enable asynchronous communication between a web client and a server.  A client is not blocked when an.
PHP and AJAX ISYS 475. AJAX Asynchronous JavaScript and XML: – JavaScript, Document Object Model, Cascade Style Sheet, XML, server-side script such as.Net,
JavaScript & jQuery the missing manual Chapter 11
Lecture 12 – AJAX SFDV3011 – Advanced Web Development Reference: 1.
JavaScript, Fourth Edition Chapter 12 Updating Web Pages with AJAX.
AJAX and Java ISYS 350. AJAX Asynchronous JavaScript and XML: – Related technologies: JavaScript, Document Object Model, XML, server-side script such.
06/10/2015AJAX 1. 2 Introduction All material from AJAX – what is it? Traditional web pages and operation Examples of AJAX use Creating.
XMLHttpRequest Object When Microsoft Internet Explorer 5.0 introduced a rudimentary level of XML support, an ActiveX library called MSXML was also introduced,
Client side web programming Introduction Jaana Holvikivi, DSc. School of ICT.
Building Rich Web Applications with Ajax Linda Dailey Paulson IEEE – Computer, October 05 (Vol.38, No.10) Presented by Jingming Zhang.
Lecture 9: AJAX, Javascript review..  AJAX  Synchronous vs. asynchronous browsing.  Refreshing only “part of a page” from a URL.  Frameworks: Prototype,
AJAX محمد احمدی نیا 2 Of 27 What is AJAX?  AJAX = Asynchronous JavaScript and XML.  AJAX is not a new programming language, but.
AJAX Compiled from “AJAX Programming” [Sang Shin] (Asynchronous JavaScript and XML)
Asynchronous Javascript And XML AJAX : an introduction UFCEUS-20-2 : Web Programming.
AJAX stands for Asynchronous JavaScript And XML. AJAX is a type of programming made popular in 2005 by Google (with Google Suggest). AJAX is not a new.
Web Technology Introduction AJAXAJAX. AJAX Outline  What is AJAX?  Benefits  Real world examples  How it works  Code review  Samples.
School of Computing and Information Systems CS 371 Web Application Programming AJAX.
CISC 3140 (CIS 20.2) Design & Implementation of Software Application II Instructor : M. Meyer Address: Course Page:
AJAX Asynchronous JavaScript & XML A short introduction.
the acronym for Asynchronous JavaScript and XML.
SYST Web Technologies SYST Web Technologies AJAX.
Ajax for Dynamic Web Development Gregory McChesney.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
 AJAX – Asynchronous JavaScript and XML  Ajax is used to develop fast dynamic web applications  Allows web pages to be updated asynchronously by transferring.
AJAX Asynchronous JavaScript and XML 1. AJAX Outline What is AJAX? Benefits Real world examples How it works 2.
AJAX and REST. Slide 2 What is AJAX? It’s an acronym for Asynchronous JavaScript and XML Although requests need not be asynchronous It’s not really a.
Dave Salinas. What is XML? XML stands for eXtensible Markup Language Markup language, like HTML HTML was designed to display data, whereas XML was designed.
AJAX AJAX Asynchronous JavaScript and XML --- MADHAVI
What is AJAX ? Asynchronous Javascript and XML. Not a stand-alone language or technology. It is a technique that combines a set of known technologies in.
AJAX – Asynchronous JavaScript And XML By Kranthi Kiran Nuthi CIS 764 Kansas State University.
AJAX CS456 Fall Examples Where is AJAX used? Why do we care?
PHP and AJAX. Servers and Clients For many years we tried to move as much as possible to the server. Weak clients, poor bandwidth, browser compatibility..
Javascript AJAX HTML WEB SERVER Asynchronous. Javascript HTML events DOM – document object model browser internal view of html page compute.
JavaScript and Ajax Week 10 Web site:
NCCUCS 軟體工程概論 Lecture 5: Ajax, Mashups April 29, 2014.
Ajax SUBMITTED BY NITIN RAMANI C.S.E 3 rd Y 5 th S R.N CS SUBMITTED TO PRO. PUSHPARAJ PATEL SIR.
Internet The internet is the largest computer network system in the world. It consists of many smaller networks connected together by a global public.
National College of Science & Information Technology.
Introduction to AJAX Pat Morin COMP Outline What is AJAX? – History – Uses – Pros and Cons An XML HTTP Transaction – Creating an XMLHTTPRequest.
What is AJAX ? Asynchronous Javascript and XML.
JavaScript and Ajax (Ajax Tutorial)
Web Concepts Lesson 2 ITBS2203 E-Commerce for IT.
Not a Language but a series of techniques
AJAX AJAX = Asynchronous JavaScript and XML.
AJAX and REST.
XMLHttp Object.
AJAX – Asynchronous JavaScript and XML
AJAX.
PHP / MySQL Introduction
CSE 154 Lecture 22: AJAX.
NMD202 Web Scripting Week9.
COP 3813 Intro to Internet Computing
ISC440: Web Programming 2 AJAX
JavaScript & jQuery AJAX.
AJAX CS-422 Dick Steflik.
DR. JOHN ABRAHAM PROFESSOR UTPA
Web Technology Even Sem 2015
Client-Server Model: Requesting a Web Page
PHP and JSON Topics Review JSON.
AJAX By Prof. B.A.Khivsara
Presentation transcript:

CS 371 Web Application Programming AJAX CS 371 Web Application Programming

Motivation client Internet In traditional web apps, data is requested from server Sent from server to client As more data is processed, it continues and continues helpful sites: http://www.w3.org/Security/faq/wwwsf4.html CS 371 Web Application Programming

Web Applications vs. Desktop traditional desktop – data is local, retrieval fast, screen elements can be updated easily and quickly web apps traditionally refresh content with new pages – every form requires a complete page refresh javaScript allows elements to be changed but no access to data CS 371 Web Application Programming

Web Applications vs. Desktop traditional desktop – data is local, retrieval fast, screen elements can be updated easily and quickly web apps traditionally refresh content with new pages – every form requires a complete page refresh javaScript allows elements to be changed but no access to data CS 371 Web Application Programming

Advantages to web apps data is stored centrally – always there from any computer software is easily and painlessly upgraded distribution is easier CS 371 Web Application Programming

Disadvantages slow – depends on bandwidth connection to internet is necessary – is it 100% reliable? privacy concerns – data is stored on someone else’s machine CS 371 Web Application Programming

Basics have the client script communicate with server script without needing a page reload server scripts (php, asp, etc) can be written as always but instead of writing out an entire web page, send the data CS 371 Web Application Programming

Client scripts use xmlHttpRequest to communicate asynchronously open the URL for the server script associate a function for call back check the ready state and take action when transmission is complete client script can modify html elements dump html or xml data into containers xslt, css can continue to play intended role CS 371 Web Application Programming

Is an asynchronous call more like a phone call or an email? Asynchronicity Is an asynchronous call more like a phone call or an email? why not just make a synchronous connection? what would it do for scaling? how does it fit in with REST? what does this mean for data requests? multiple data requests? CS 371 Web Application Programming

Obtaining an xmlHttpRequest object xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); xmlHttp=new XMLHttpRequest(); use try, catch to get the call for the current browser CS 371 Web Application Programming

Making the connection open, set readychange function, send example: xmlHttp.open("GET","someScript.php"); xmlHttp.onreadystatechange=functa(); xmlHttp.send(null); can use POST or GET can also send data using send() CS 371 Web Application Programming

Making the connection (cont.) often convenient to use anonymous functions put data in url after name of script using ?var=val&… watch out for scope of xmlHttp var CS 371 Web Application Programming

PHP server script can access data using $_GET or $_POST arrays returns values using echo CS 371 Web Application Programming

Callback function is called every time the state changes – so must check for readystate==4 retrieves data using: data=xmlHttp.responseText data=xmlHttp.responseXML updates html using document and DOM methods CS 371 Web Application Programming