28
AJAX: A Primer for Business Educators 2007 Atlantic Coast Business, Marketing, and Information Technology Education Conference Raleigh Hilton February 15-17, 2007 Randy Parker Piedmont Community College Roxboro, NC [email protected] www2.piedmontcc.edu/faculty/parkerr/ajax

AJAX: A Primer for Business Educators

Embed Size (px)

Citation preview

Page 1: AJAX: A Primer for Business Educators

AJAX: A Primer for Business Educators

2007 Atlantic Coast Business, Marketing, and Information Technology Education Conference

Raleigh HiltonFebruary 15-17, 2007

Randy ParkerPiedmont Community College

Roxboro, [email protected]

www2.piedmontcc.edu/faculty/parkerr/ajax

Page 2: AJAX: A Primer for Business Educators

A J A X

Asynchronous JavaScript And XML

Based on the XML HTTP Request (XHR) object created by Microsoft Corp. in 1997

AJAX – term coined by James Garrett in February 2005

Page 3: AJAX: A Primer for Business Educators

A J A XAsynchronous JavaScript And XML

What is AJAX? AJAX is NOT one single new technology A grouping of technologies used to produce Web

Applications with a similar “look and feel” as desktop applications.

Required: HTML/XHTML JavaScript File or program on server to fulfill request

Not Required but often used: XML Server side applications (ASP, PHP, etc…) Databases

Page 4: AJAX: A Primer for Business Educators

A J A X

Asynchronous JavaScript And XML Why use AJAX?

To provide a desktop-like user interface for Web Applications

Increased user satisfaction: Improved response time No plug-ins or other special installations on

the Browser Reduces redundant content on the Web

Page 5: AJAX: A Primer for Business Educators

A J A X

Asynchronous JavaScript And XML How is AJAX used?

To Enhance Traditional Applications: Yahoo Mail (Beta) Google Suggest Google Maps (maps.google.com)

To Develop new Web 2.0 (2nd Generation) Applications: Blogger.com

Page 6: AJAX: A Primer for Business Educators

Traditional Yahoo Email

Page 7: AJAX: A Primer for Business Educators

Traditional Yahoo Email

Page 8: AJAX: A Primer for Business Educators

Yahoo Email (Beta) using AJAX

Page 9: AJAX: A Primer for Business Educators

Yahoo Email (Beta) using AJAX

Page 10: AJAX: A Primer for Business Educators

Google Suggest (Traditional)

Page 11: AJAX: A Primer for Business Educators

Google Suggest (AJAX)

Page 12: AJAX: A Primer for Business Educators

A J A X

Asynchronous JavaScript And XML How is AJAX used?

To Enhance Traditional Applications: Yahoo Mail (Beta) Google Suggest Google Maps (maps.google.com)

To Develop new Web 2.0 (2nd Generation) Applications: Blogger.com

Page 13: AJAX: A Primer for Business Educators

Blogger.com and AJAX

Page 14: AJAX: A Primer for Business Educators

Blogger.com and AJAX

Page 15: AJAX: A Primer for Business Educators

A J A X

A – Asynchronous

J – JavaScript

A – And

X – XML

Page 16: AJAX: A Primer for Business Educators

Asynchronous Traditional Web

Application Synchronous

1. Client sends request2. Client waits for

response3. Server process request4. Client displays results

AJAX-enabled Web Application Asynchronous

1. Client may send multiple requests

2. Responses may be returned in any order

Page 17: AJAX: A Primer for Business Educators

A J A X

A – Asynchronous

J – JavaScript

A – And

X – XML

Page 18: AJAX: A Primer for Business Educators

JavaScript A programming language that runs in a Browser Embedded in a Web page or included as a separate file Activated when the page loads or when a button or link

is clicked AJAX uses JavaScript to send an HTTP request (XHR) to a

server The server sends the results back to the same JavaScript

Page 19: AJAX: A Primer for Business Educators

AJAX Client/Server Interaction

Page 20: AJAX: A Primer for Business Educators

AJAX Client/Server Interaction

Page 21: AJAX: A Primer for Business Educators

A J A X

A – Asynchronous

J – JavaScript

A – And

X – XML

Page 22: AJAX: A Primer for Business Educators

XML

eXtensible Markup Language A data description language An open standard providing the

means to share data and information between computers and computer programs

XML is NOT required for AJAX

Page 23: AJAX: A Primer for Business Educators

A J A X

Asynchronous JavaScript And XML Disadvantages:

Cross-browser JavaScript inconsistencies An inability to:

use the Back button to return to a previous state

copy a URL and later use it to navigate to the same page in the same state

Page 24: AJAX: A Primer for Business Educators

A J A XAsynchronous JavaScript And XML

How to do it? Use traditional Web development tools:

Dreamweaver, FrontPage for the UI Text editor for the JavaScript and server side

programs Use tools designed specifically for AJAX development:

Microsoft ASP.NET AJAX (Atlas) - http://ajax.asp.net/ Eclipse (Java-based open source)

http://www.eclipse.org/ Adobe Flex/Flash-AJAX Bridge

http://www.adobe.com/products/flex/

Page 25: AJAX: A Primer for Business Educators

A J A X

AJAX in the Curriculum

A typical AJAX-enabled application includes:

1. User interface (Web page – HTML/XHTML)2. JavaScript (XHR requests and server

responses)3. Server-side program4. Database

Page 26: AJAX: A Primer for Business Educators

A J A X

Asynchronous JavaScript And XMLAJAX in the Curriculum

1. Introductory Level Introduction to AJAX (general overview) HTML/XHTML – Forms

2. Intermediate Level JavaScript – Variables, Functions XHR (XML Http Request)

3. Advanced Level Server-side programming SQL

Page 27: AJAX: A Primer for Business Educators

A J A X

Asynchronous JavaScript And XML AJAX in the Curriculum

1. Introductory Level Introduction to AJAX (general overview) HTML/XHTML – Forms

How to do it? Use traditional Web development tools:

Dreamweaver, FrontPage, or text editor for the User Interface (Form)

Students link to pre-written JavaScripts and server-side programs

Page 28: AJAX: A Primer for Business Educators

A J A XRESOURCES FOR FURTHER RESEARCH

Presenter’s Page (Randy Parker) – www2.piedmontcc.edu/faculty/parkerr/ajax/

AJAXian - ajaxian.com/ eWeek - www.eweek.com/article2/0,1895,1976726,00.asp Swords Sharpened for Ajax Projects - 

www.eweek.com/article2/0,1759,1909570,00.asp AJAX: Getting Started -

developer.mozilla.org/en/docs/AJAX:Getting_Started OpenAjax Alliance - openajax.org/about.html Using the virtual buffer in JAWS to enable Ajax -

ajaxian.com/by/topic/accessibility/ Accessible Rich Internet Applications (WAI-ARIA Roadmap)

addresses the accessibility of dynamic Web content for people with disabilities - www.w3.org/TR/aria-roadmap/