Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Lecture 10 Answers

354 views

Published on

  • Be the first to comment

  • Be the first to like this

Lecture 10 Answers

  1. 1. IS4 030 - Website Design for e-Commerce By SMIEEE, SMACM, MACS E-mail: [email_address] Room: P7919 Consultation Hours: 3:30 - 5:30pm Monday Lecture Ten AJAX
  2. 2. Where AJAX is applied ?
  3. 3. AJAX Applications
  4. 4. Typical AJAX Applications <ul><li>Real-Time Form Data Validation </li></ul><ul><ul><li>Form data that require server-side validation can be validated in a form “before” the user submits it. </li></ul></ul><ul><li>Auto completion </li></ul><ul><ul><li>A specific portion of form data can be auto-completed as the user types. </li></ul></ul><ul><li>Master Details Operations </li></ul><ul><ul><li>Based on a client event, an HTML page can fetch more details from the Server without refreshing the page. </li></ul></ul><ul><li>Sophisticated UI Controls </li></ul><ul><ul><li>Controls such as tree controls, menus, and progress bars without page refreshes . </li></ul></ul>
  5. 5. A Completed Example <ul><li>form name=&quot;myForm&quot;> </li></ul><ul><li>Name: <input type=&quot;text&quot; </li></ul><ul><li>onkeyup=&quot;ajaxFunction();&quot; name=&quot;username&quot; /> </li></ul><ul><li>Time: <input type=&quot;text&quot; name=&quot;time&quot; /> </li></ul><ul><li></form> </li></ul><ul><li></body> </li></ul><ul><li></html> </li></ul><ul><li>What does this AJAX program/HTML do? </li></ul>
  6. 6. AJAX Problems <ul><li>Breaking the “back” button </li></ul><ul><ul><li>Browsers record static page visits </li></ul></ul><ul><ul><li>The AJAX page is dynamic and it’s difficult to determine which one is the previous state </li></ul></ul><ul><li>Changing parts of the page unexpectedly </li></ul><ul><ul><li>A page is unintentionally altered because of some AJAX codes are incidentally executed. </li></ul></ul><ul><li>Bookmarking a particular “State” becomes difficult </li></ul><ul><ul><li>AJAX engine generates the page NOT server </li></ul></ul>
  7. 7. AJAX Problems <ul><li>Difficult to Debug </li></ul><ul><ul><li>Processing logic both in client and server </li></ul></ul><ul><li>Viewable Source </li></ul><ul><ul><li>Open to hackers or plagiarism for the processing logic </li></ul></ul><ul><li>Increased Server Load </li></ul><ul><ul><li>Asynchronous request is a “heavy” operation </li></ul></ul>
  8. 8. AJAX Resources <ul><li>Frameworks </li></ul><ul><ul><li>Client-side </li></ul></ul><ul><ul><ul><li>DOGO </li></ul></ul></ul><ul><ul><ul><li>BackBase </li></ul></ul></ul><ul><ul><ul><li>AJForm </li></ul></ul></ul><ul><ul><li>Server-side </li></ul></ul><ul><ul><ul><li>JSON (Javascript Object Notation) </li></ul></ul></ul><ul><ul><ul><li>Struts – Layout </li></ul></ul></ul><ul><ul><ul><li>ComfortASP.NET </li></ul></ul></ul><ul><ul><li>Many more at </li></ul></ul><ul><ul><ul><li>http://www.ajaxpatterns.org/AJAXFramework </li></ul></ul></ul>

×