1 Fall 2006 Florida Atlantic University Department of Computer Science & Engineering COT 6930 Advanced Internet Programming Dr. Roy Levow Day 1.

Slides:



Advertisements
Similar presentations
Project 1 Introduction to HTML.
Advertisements

6/3/2015eBiquity1 Tutorial on AJAX Anubhav Kale (akale1 AT cs DOT umbc DOT edu)
AJAX Presented by: Dickson Fu Dimas Ariawan Niels Andreassen Ryan Dial Jordan Nielson CMPUT 410 University of Alberta 2006.
World Wide Web1 Applications World Wide Web. 2 Introduction What is hypertext model? Use of hypertext in World Wide Web (WWW) – HTML. WWW client-server.
1 Distributed Mathematics Assessment System (DMAS) & WME Progress and Demo Saleh Al-shomrani Department of Computer Science Kent State University 06/13/2007.
1 JavaScript & AJAX CS , Spring JavaScript.
Client, Server, HTTP, IP Address, Domain Name. Client-Server Model Client Bob Yahoo Server yahoo.com/finance.html A text file named finance.html.
Chapter 14 Introduction to HTML
HTML 1 Introduction to HTML. 2 Objectives Describe the Internet and its associated key terms Describe the World Wide Web and its associated key terms.
Chapter 1 Introduction to HTML, XHTML, and CSS
Web technologies and programming cse hypermedia and multimedia technology Fanis Tsandilas April 3, 2007.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Introduction to Web Programming Fall 2014/2015 Some slides are based upon Web Technologies course slides, HUJI, 2009 Extended System Programming Laboratory.
Introduction to AJAX AJAX Keywords: JavaScript and XML
JavaScript & jQuery the missing manual Chapter 11
May 16 – 18, 2007 Copyright 2007, Data Access Worldwide May 16 – 18, 2007 Copyright 2007, Data Access Worldwide Build Great Web Application 'Fast and Easy'
Ruth Betcher Ruth Christie
Lecture 12 – AJAX SFDV3011 – Advanced Web Development Reference: 1.
ASP.NET + Ajax Jesper Tørresø ITNET2 F08. Ajax Ajax (Asynchronous JavaScript and XML) A group of interrelated web development techniques used for creating.
1 Fall 2006 Florida Atlantic University Department of Computer Science & Engineering COT 6930 Advanced Internet Programming Dr. Roy Levow Day 2.
AJAX Without the “J” George Lawniczak. What is Ajax?
JavaScript, Fourth Edition Chapter 12 Updating Web Pages with AJAX.
06/10/2015AJAX 1. 2 Introduction All material from AJAX – what is it? Traditional web pages and operation Examples of AJAX use Creating.
HTML, XHTML, and CSS Sixth Edition Chapter 1 Introduction to HTML, XHTML, and CSS.
Instructor, Dr. Khalili Bahram Jeevan Kumar Gogineni.
Ajax. –Asynchronous JavaScript and XML –Umbrella term for technologies that often: Use client-side scripting for layout and formatting Use less than full.
Weekend MS CS Program Internet and Web Technologies COT 5930 Web Project Development - Ajax Dr. Roy Levow, Associate Chair & Professor
J.Holvikivi 1 Ajax & scripts Jaana Holvikivi Metropolia.
WEB BASED DATA TRANSFORMATION USING XML, JAVA Group members: Darius Balarashti & Matt Smith.
Random Logic l Forum.NET l AJAX Behind the buzz word Forum.NET ● January 23, 2006.
Web Design (1) Terminology. Coding ‘languages’ (1) HTML - Hypertext Markup Language - describes the content of a web page CSS - Cascading Style Sheets.
Lecture 9: AJAX, Javascript review..  AJAX  Synchronous vs. asynchronous browsing.  Refreshing only “part of a page” from a URL.  Frameworks: Prototype,
Session: 1. © Aptech Ltd. 2Introduction to the Web / Session 1  Explain the evolution of HTML  Explain the page structure used by HTML  List the drawbacks.
AJAX Compiled from “AJAX Programming” [Sang Shin] (Asynchronous JavaScript and XML)
Fall 2006 Florida Atlantic University Department of Computer Science & Engineering COP 4814 – Web Services Dr. Roy Levow Part 2 – Ajax Fundamentals.
Ajax. –Asynchronous JavaScript and XML –Umbrella term for technologies that often: Use client-side scripting for layout and formatting Use less than full.
COP 3813 Intro to Internet Computing Prof. Roy Levow Lecture 1.
Asynchronous Javascript And XML AJAX : an introduction UFCEUS-20-2 : Web Programming.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
Chapter 16: Ajax-Enabled Rich Internet Applications with XML and JSON TP2543 Web Programming Mohammad Faidzul Nasrudin.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
AJAX Asynchronous JavaScript and XML 1. AJAX Outline What is AJAX? Benefits Real world examples How it works 2.
Introduction to HTML. _______________________________________________________________________________________________________________ 2 Outline Key issues.
Summer 2007 Florida Atlantic University Department of Computer Science & Engineering COP 4814 – Web Services Dr. Roy Levow Part 1 – Introducing Ajax.
RESTful Web Services What is RESTful?
HTML Concepts and Techniques Fifth Edition Chapter 1 Introduction to HTML.
Overview of Servlets and JSP
Chapter 1 Introduction to HTML, XHTML, and CSS HTML5 & CSS 7 th Edition.
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.
AJAX AJAX Asynchronous JavaScript and XML --- MADHAVI
Introduction to the World Wide Web & Internet CIS 101.
AJAX – Asynchronous JavaScript And XML By Kranthi Kiran Nuthi CIS 764 Kansas State University.
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
 AJAX technology  Rich User Experience  Characteristics  Real live examples  JavaScript and AJAX  Web application workflow model – synchronous vs.
The OWASP Foundation OWASP Education Computer based training The Basics Nishi Kumar IT Architect Specialist, FIS Chair, Software Security.
AJAX CS456 Fall Examples Where is AJAX used? Why do we care?
Introduction to AJAX MIS 3502, Spring 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 2/4/2016.
CITA 330 Section 10 Web Remoting Techniques. Web Remoting Web Remoting is a term used to categorize the technique of using JavaScript to directly make.
Open Solutions for a Changing World™ Eddy Kleinjan Copyright 2005, Data Access WordwideNew Techniques for Building Web Applications June 6-9, 2005 Key.
National College of Science & Information Technology.
JavaScript and Ajax (Ajax Tutorial)
How does it work ?.
AJAX.
Asynchronous Java script And XML Technology
AJAX.
Prepared for Md. Zakir Hossain Lecturer, CSE, DUET Prepared by Miton Chandra Datta
Introduction to Internet Programming
Ajax and JSON Jeremy Shafer Department of MIS Fox School of Business
Presentation transcript:

1 Fall 2006 Florida Atlantic University Department of Computer Science & Engineering COT 6930 Advanced Internet Programming Dr. Roy Levow Day 1

Advanced Internet Programming – Fall Day 1 Syllabus Course Introduction Introduction to AJAX Review of base technologies HTML & CSS JavaScript Document Object Model (DOM) AJAX Basics AJAX Patterns (introduction)

Advanced Internet Programming – Fall Course Goals Reinforce concepts from Web Programming HTML, CSS, JavaScript, DOM Develop understanding of AJAX programming model Asynchronous JavaScript + XML XPath, XSLT, JSON Provide skills for Ajax web project

Advanced Internet Programming – Fall oJesse James Garrett of Adaptive Path Conceives alternative to Macromedia Flash using free technologies (February 2006) Asynchronous HTTP Request JavaScript And XML Publishes ideas online Ajax: A New Approach to Web Applications See also article form June 2006 Wiredarticle Intro to Ajax film clipfilm clip Ajax is Born Web Development Project – Fall 2006

Advanced Internet Programming – Fall AJAX Asynchronous JavaScript And XML Provides a framework for the development of web pages that are Interactive Highly dynamic Small transfers that update current page provide faster, smoother response

Advanced Internet Programming – Fall Ajax Site Examples Google Suggest (Beta) Google Maps Gmail Google Page Creator (Beta)

Advanced Internet Programming – Fall AJAX vs Classic Page Loads

Advanced Internet Programming – Fall

9

10 Pros and Cons of Ajax: Pros Interactivity Achieved by direct manipulation of DOM Quick updates using incremental data loads Portability Open standards JavaScript is supported by most current browsers

Advanced Internet Programming – Fall Pros and Cons of Ajax: Cons Inefficiency Interpreted code Overhead of XML transfer (larger files) Portability Requires JavaScript Also requires ActiveX on IE Inconsistent rendering Issues with response to Back button Accessibility issues

Advanced Internet Programming – Fall Alternative Technologies Macromedia Flash Highly interactive Prepackaged “movies” Requires plugin Java Web Start Java application interacts between client and server Microsoft.NET

Advanced Internet Programming – Fall Ajax Component Technologies XHTML CSS JavaScript Document Object Model (DOM) XML, XPath, XSLT XMLHttpRequest Server-side technologies

Advanced Internet Programming – Fall Ajax Design Principles Highly interactive Smooth responses Separation of Data Presentation Program logic

Advanced Internet Programming – Fall Fundamental Technologies XHTML Provides basis for presentation of web pages Cascading Style Sheets (CSS) Provide for separation of format from content Document Object Model (DOM) Dynamic access to elements of web page in browser Extensible Markup Language (XML) Basic structure for representation of data and other structured documents

Advanced Internet Programming – Fall DOM Review DOM creates tree representation of web page Tree can be mainpulated with JavaScript Changes in tree structure or values change rendered page

Advanced Internet Programming – Fall DOM Example Shop Buy it Don’t forget Beans Milk html head metatitle body h1pul li

Advanced Internet Programming – Fall DOM Tree Components Nodes Element nodes Correspond to tags Text nodes Contain text of elements Attribute nodes Contain attributes attr=“value”

Advanced Internet Programming – Fall Major DOM Methods getElementById Returns element with specified id or null doucment.getElementById(“item1”) getElemensByTagName Returns array of elements with the specified tag name document.getElementsByTagName(“li”)

Advanced Internet Programming – Fall Major DOM Methods getAttribute Gets specified attribute or null from an object obj.getAttribute(“style”) setAttribute Sets value of specified attribute for an object obj.setAttribute(“title”, “help me”)

Advanced Internet Programming – Fall Introduced in HTML 4.0 Allow page to be loaded into portion of browser window Use discouraged in XHTML because of poor interaction with back button Hidden frame technique Use 1-pixel frame to contain form (thus hidden) Fill in form from JavaScript and submit Receive response asynchronously to update page Iframes Independent of frameset Go anywhere on page and can be hidden Frames (Prelude to AJAX) Web Development Project – Fall 2006

Advanced Internet Programming – Fall On Browser Ajax Engine (JavaScript code) Generates display using HTML and CSS Receive JS calls from user interface Sends HTTPRequest to Server Receives Data from Server Server Receives HTTPRequest from Browser Interacts with local database Sends Data to Browser The Real Ajax Web Development Project – Fall 2006

Advanced Internet Programming – Fall Hypertext Transfer Protocol Accepts requests from browser Transfers responses to browser Fetch web pages but has many other uses HTTPRequest format [ ] HTTP Web Development Project – Fall 2006

Advanced Internet Programming – Fall Many request types GET and POST are of interest in Ajax Example GET GET / HTTP/1.1 Host: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/ Firefox/1.0.1 Connection: Keep-Alive Get request for root node with HTTP version Originating client and information on client Request to maintain connection for more transfers HTTP Request

Advanced Internet Programming – Fall Item following GET is path to page to load GET /index.html HTTP/1.1 Parameters can be appended to the url as in URL ? name1=value1&name2=value2&… HTTP Request Web Development Project – Fall 2006

Advanced Internet Programming – Fall POST Example POST / HTTP/1.1 Host: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/ Firefox/1.0.1 Content-Type: application/x-www-form-urlencoded Content-Length: 40 Connection: Keep-Alive name=Professional%20Ajax&publisher=Wiley Adds Content-Type, Content-Length, and data POST Web Development Project – Fall 2006

Advanced Internet Programming – Fall Response format ] Example HTTP/ OK Date: Sat, 31 Dec :59:59 GMT Content-Type: text/html; charset=ISO Content-Length: 122 HTTP Responses Web Development Project – Fall 2006

Advanced Internet Programming – Fall (OK) 304 (NOT MODIFIED) 401 (UNAUTHORIZED) 403 (FORBIDDEN) 404 (NOT FOUND) Response Codes Web Development Project – Fall 2006

Advanced Internet Programming – Fall Pattern Visible frame for user interaction User action triggers call to load hidden frame Server responds, loading hidden frame JavaScript transfers data from hidden frame to visible frame Examples: Hidden Frame ExamplesHidden Frame Examples Hidden Frame Technique Web Development Project – Fall 2006

Advanced Internet Programming – Fall Hidden iFrame approach is similar but cleaner No frameset required iFrame can be created dynamically Examples: Hidden iFrame ExamplesHidden iFrame Examples Note: Back/Forward behavior depends on browser Okay in IE Works in Foxfire only if frame is in orignian html Not in Safari Hidden iFrames Web Development Project – Fall 2006

Advanced Internet Programming – Fall XMLHttp Request The Real Thing No frames required Unfortunately, implement differs among browsers Use browser identifying code to put generic wrapper on request code Examples: XMLHttp Requests ExamplesXMLHttp Requests Examples

Advanced Internet Programming – Fall XMLHttp Request Processing Create XMLHttpRequest Object Sense browser to use required mechanism Open connection to web server Specify get/post, url, asynchronous Set handler for readystate change 0 = Uninitialized 1 = Loading 2 = Loaded 3 = Interactive (partial response) 4 = Complete

Advanced Internet Programming – Fall XMLHttp Request Processing (cont.) Check status (response code) 200 is OK Verify the content type GET request example POST request example

Advanced Internet Programming – Fall XMLHttp Request Issues No Back/Forward Requires ActiveX in IE Load must be from the same server that delivered the page Can be handled by server program to act as proxy

Advanced Internet Programming – Fall AJAX Patterns Communication Control Predictive Fetch Preload anticipated next item Example: Predictive FetchPredictive Fetch Example: Multi-stage DownlaodMulti-stage Downlaod Submission Throttling Send data to server progressively Incremental form validation is an example Example: Submission ThrottlingSubmission Throttling

Advanced Internet Programming – Fall AJAX Patterns (cont.) Periodic Refresh Keep view up-to-date with changing data ESPN scoreboard Gmail Example: Periodic RefreshPeriodic Refresh Fallback Patterns Cancel Pending Try Again