AJAX and Web Services

INFO1-CE9731

Professor:Sam Sultan [sam.sultan@nyu.edu]
Class website: [oit2.scps.nyu.edu/~sultans/ajax] (or) [samsultan.com/ajax]

Announcement(s):

+ outline
+ books
+ grades policy
+ final project
+ Demos AJAX / Demos jQuery
+ student listing
+ student feedback
+ student evaluation & comments

Session - 1a   1b   1c   1d   2a   2b   2c   2d (optional/advanced)   3a   3b   3c  

 
HTTP - XML - JSON - HTML DOM - XML DOM - PHP - AJAX - jQuery - SFTP (download) - SQL*Tester ©
Site Helpful?

COURSE DESCRIPTION:

Such widely used applications as Google Maps, Google Suggest, and Gmail are built using AJAX (Asynchronous JavaScript and XML) Web Services. Learn the concepts necessary to build AJAX Web Services applications, and discover how AJAX Web Services can help developers create dynamic web application experiences, eliminating deployment problems and lackluster user experiences. Using AJAX, developers facilitate asynchronous requests to the web server while the client interacts with a webpage, therby delivering a richer user interface and experience.


COURSE LEARNING GOALS:

1. Course Objectives:

The objective of this course is to learn AJAX Web Services and understand how AJAX Web Services can enhance the web experience and interactivity. The course will cover advance topics such as HTTP the Hypertext Protocol Language used on the web to communicate between the browser and the web server. We will learn how to shift from a synchronous transmission paradigm to an asynchronous one. The course will cover advanced topics in XML which is used to deliver data from the web server to the web browser, as well as JSON, an alternative and a simpler data delivery mechanism. The course will cover the core Document Object Model as it relates to both HTML and XML. The course will also cover how to build a web service in PHP to obtain requests from the client, and deliver the content requested using AJAX in both XML and JSON format back to the browser. We will also learn about JSONP which allows you to get around AJAX "same domain policy" restriction. The course will conclude by introducing you to jQuery, and how jQuery uses AJAX.

The focus of the course will be on the following topics:

2. Student Learning Outcomes:


COURSE REQUIREMENTS AND POLICIES:

See [Requirements and Policies]


BOOKS - (Required / Suggested)


GRADES AND GRADING POLICY


Details of Assignment and Evaluation.

How to Submit Homeworks.

- Homework assignments are always due the next session we meet.
- Print out your homework code and output and bring with you to class the next time we meet.
- I will either collect, or will ask students to discuss their solutions in class.
- I will not accept homework via email unless you are not able to attend the class.
- For PHP, proper indentation is a must. If not properly indented I may return it without grading it.
- Multiple pages should be stapled together.

Grades are FINAL.

Please do not negotiate for a better grade. If you are expecting to receive a grade of an "A" at the end of the semester, then I expect you to attend all sessions (unless I am notified ahead of time), to participate in these sessions, to keep up with the class reading material, and to complete your homework assigments. This will ensure that you stay current with the class content, and will ensure that you get a good grade on your test(s), project as well as your final grade.

If you are not interested in a grade, or you do not submit your homeworks/project or take the exams, then you will receive a grade of an "NE" (Non-Evaluative). A grade of NE is final, and cannot be changed. A grade of NE cannot be applied as partial fulfillment for any NYU certificate program.

To receive your final grade at the end of the semester, follow these steps:

  1. click on http://www.scps.nyu.edu/academics/noncredit-offerings/academic-noncredit-policies-and-procedures.html#Obtaining_Grades
  2. Log into Albert using your net id, at: https://admin.portal.nyu.edu/psp/paprod/EMPLOYEE/EMPL/h/?tab
  3. Click on "Student Center"
  4. Within your student center, in the "academics" section click on the dropdown: "other academic"
  5. From the dropdown select "grades"
  6. For complete instructions click here


COURSE OUTLINE:

DATE SESSION TOPIC[s] COVERED
 
[Week 1] 1a
  • HTTP - HyperText Transfer Protocol
  • The client request
  • The server response
  • The GET and POST methods
  • The Request and Response headers
  • HTTP Error Messages
  • Accessing Request and Request headers
  •  
    [Week 1] 1b
  • XML - Extensible Markup Language
  • What is XML? What is SGML?
  • Differences between HTML and XML
  • Purpose and concepts of XML
  • A simple XML example.
  •  
    [Week 1] 1c
  • Anatomy and syntax of an XML document.
  • XML documenent prolog.
  • Adding processing instructions.
  • Attributes vs. child elements
  • Rules for "well-formed" XML.
  • Checking for well-formedness.
  • What is a namespace?
  • Applying a namespace to XML documents.
  • Creating CDATA sections.
  • XML parsers - Tree vs. Event based.
  •  
    [Week 1] 1d
  • JSON - JavaScript Object Notation
  • What is JSON? When do I use it?
  • JSON array and object format
  • Complex/nested JSON objects
  • Using JSON with AJAX
  • Parsing JSON
  • Creating JSON data using PHP
  •  
    [Week 2] 2a
  • Accessing HTML form data
  • The GET method
  • The POST method
  • Connecting to a database
  • Inserting, Updating & Deleting from databases
  • Querying databases
  •  
    [Week 2] 2b
  • AJAX from the Server point of view
  • Program-to-Program communication
  • Synchronous vs. Asynchronous communication
  • Advantages and uses of asynchronous communication
  • What is XML?
  • What is JSON?
  • Using PHP to perform AJAX
  •  
    [Week 2] 2c
  • AJAX from the Client point of view
  • Program-to-Program communication
  • Synchronous vs. Asynchronous communication
  • Advantages and uses of asynchronous communication
  • What is XML?
  • What is JSON?
  • Using JavaScript and the XMLHttpRequest object to perform AJAX
  •  
    [Week 2] 2d
  • DOM - Document Object Model
  • What is the purpose of a DOM?
  • The Core DOM and the HTML DOM
  • The structure of the DOM hierarchy tree
  • The Document node properties and methods
  • The Element node properties and methods
  • The Attribute node properties and methods
  • The Text node properties and methods
  • NodeList and NamedNodeMap lists
  • The parserError node properties (IE only)
  • Navigating through the DOM
  • Updating the document through the DOM
  • DOM versus SAX
  •  
    [Week 3] 3a
  • JSONP - JSON with Padding
  • What is JSONP? When do I need it?
  • What is Padding?
  • Getting around AJAX restrictions
  • Creating Dynamic JSONP requests
  • JSONP from the client side
  • JSONP from the server side
  •  
    [Week 3] 3b
  • What is jQuery?
  • Downloading and using jQuery library
  • Typical tasks you perform with jQuery
  • Selecting elements from the DOM
  • Changing element content
  • Adding/Replacing/Removing elements
  • Adding/Changing/Removing attributes
  • Adding/Removing/Toggling CSS classes
  • Adding/Changing CSS properties
  • jQuery built-in animation
  • Working with element Set
  • Working with an array or an object
  •  
    [Week 3] 3c
  • Ajax Using jQuery
  • The XMLHttpRequest Object
  • The XMLHttpRequest Object Properties and Methods
  • AJAX the jQuery way
  • The load( ) function
  • The .get( ) and .post( ) methods
  • The .ajax( ) function
  • Serializing Form Elements
  • Processing the Returned Data using XML
  • Processing the Returned Data using JSON



  • All contents © Sam Sultan
    For more information, send e-mail to: sam.sultan@nyu.edu