AJAX and Web Services

INFO1-CE9731

Professor:Sam Sultan [sam.sultan@nyu.edu]
Class website: [workshop.sps.nyu.edu/~sultans/ws] (or) [samsultan.com/ws]

Announcement(s):

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

Session - 1   2   3   4   5   6php   6py   7   8 (optional/advanced)   9   10   Exam  

 
HTTP - XML - JSON - HTML DOM - XML DOM - PHP - Python - 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 using either PHP or Python 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 or Python, 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.sps.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] 1
  • 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] 2
  • 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] 3
  • 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] 4
  • 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] 5
  • 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?
  • HTTP - Hypertext Transfer protocol
  • The GET vs. POST methods
  • Using JavaScript and the XMLHttpRequest object to perform AJAX
  •  
    [Week 2] 6php
  • PHP
  • Accessing HTML form data
  • The GET method
  • The POST method
  • Connecting to a database
  • Inserting, Updating & Deleting from databases
  • Querying databases
  •  
    [Week 2] 6py
  • Python
  • Accessing HTML form data
  • The GET method
  • The POST method
  • Connecting to a database
  • Inserting, Updating & Deleting from databases
  • Querying databases
  •  
    [Week 2] 7
  • What is a Web Service?
  • SOAP - Simple Object Access Protocol
  • SOAP Envelope, SOAP payload
  • REST - REpresentational State Transfer
  • Calling a Web Service - step-by-step
  • What is XML?
  • Creating XML in PHP and in Python
  • What is JSON?
  • Creating JSON in PHP and in Python
  • Using PHP to create a Web Service
  • Using Python to create a Web Service
  •  
    [Week 2] 8
  • 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] 9
  • 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] 10
  • 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
  •  
    [Week 3] Exam
  • Final Exam



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