SlideShare a Scribd company logo
Introduction to RIA and AJAX Created by - Schubert [email_address]
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Agenda – cont’d
RIA – Rich Internet Applications
Introduction -  i ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Introduction –  ii Thick Client – Thin Client Server Client Data Data Data Data Business Logic Presentation Logic Presentation Logic Business Logic Business Logic Presentation Logic UI Engine Business Logic Presentation Logic HTML
Introduction -  iii The need for smart clients
Introduction -  iv RIA Richness Communication Application Bringing the Desktop to the Web ! Connected / Alive Interactive Responsive Traditional web  Pervasiveness Online / Offline mode Event’s, notification Security Accessibility A RIA
Web 2.0 -  i ,[object Object],[object Object],mp3.com Britannica Online personal websites page views publishing content management systems stickiness WEB 1.0 Napster Wikipedia blogging cost per click participation wikis syndication WEB 2.0
Web 2.0 -  ii By products
RIA Frameworks and toolkits ,[object Object],[object Object],[object Object],[object Object],[object Object]
Web Orientation
HTML – DOM HTML - Are HTML document structures validated ? -  <!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;> - What is XHTML ? - HTML 5 and XHTML 5 DOM  
CSS CSS Color – Visibility – Positioning - Backgrounds
HTTP -  i OSI (Open Systems Interconnection) – Reference model Application Presentation Session Transport Network Datalink Physical HTTP Headers Methods Status codes
HTTP -  ii HTTP headers Request Headers Response Headers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
HTTP -  iii HTTP methods Get - Conditional GET (if headers such as  if-modified-since , etc are present.) - Partial GET (if headers include  ranges , avoids data transmission already held by the client) POST - Provide a block of data for processing HEAD - Identical to GET except that the server MUST NOT return a message-body in the response.  (used for testing hypertext links for validity, accessibility, and recent modification.) PUT / DELETE / TRACE / CONNECT / OPTIONS
HTTP -  iv HTTP status codes Informational Success Re - Direction Client Error Server Error 1xx 2xx 3xx 4xx 5xx 100 Continue 200 OK 202 Accepted 301 Moved Permanently 304 Not Modified 400 Bad Request 403 Forbidden 404 Not Found 500 Internal Server Error 502 Bad Gateway 503 Service Unavailable
XML / JSON -  i ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
XML / JSON -  ii {&quot;menu&quot;: { &quot;id&quot;: &quot;file&quot;, &quot;value&quot;: &quot;File&quot;, &quot;popup&quot;: { &quot;menuitem&quot;: [ {&quot;value&quot;: &quot;New&quot;, &quot;onclick&quot;: &quot;CreateNewDoc()&quot;}, {&quot;value&quot;: &quot;Open&quot;, &quot;onclick&quot;: &quot;OpenDoc()&quot;}, {&quot;value&quot;: &quot;Close&quot;, &quot;onclick&quot;: &quot;CloseDoc()&quot;} ] } }} <menu id=&quot;file&quot; value=&quot;File&quot;> <popup> <menuitem value=&quot;New&quot; onclick=&quot;CreateNewDoc()&quot; /> <menuitem value=&quot;Open&quot; onclick=&quot;OpenDoc()&quot; /> <menuitem value=&quot;Close&quot; onclick=&quot;CloseDoc()&quot; /> </popup> </menu> JSON v/s XML
AJAX
Introduction AJAX (Asynchronous JavaScript and XML) Ajax can be defined as a group of interrelated web development techniques used to create interactive web applications or rich Internet applications. AJAX CSS / XHTML DOM XML / XSLT XHR Presentation semantics Dynamic display and data interaction Interchange and manipulation Object for communication
Introduction -  i AJAX interactions – classical web model
Introduction -  i AJAX interactions – the ajax model
The XMLHTTPRequest object -  i The XMLHttpRequest Object  specification  defines an API that provides scripted client functionality for transferring data between a client and a server. The XMLHttpRequest object implements an interface exposed by a scripting engine that allows scripts to perform HTTP client functionality, such as submitting form data or loading data from a server. Supports any text based format, including XML It can be used to make requests over both HTTP and HTTPS Supports all activity involved with HTTP requests or responses for the defined HTTP methods .
The XMLHTTPRequest object -  ii Dependencies ,[object Object],[object Object],[object Object]
The XMLHTTPRequest object -  iii XHR Object state, events and exceptions XHR Object State UNSENT  (Constant value – 0) OPEN  (Constant value – 1) SENT  (Constant value – 2) LOADING  (Constant value – 3) DONE  (Constant value – 4) XHR Object Exceptions    XMLHttpRequestException NETWORK_ERR ABORT_ERR XHR Event    readystatechange
The XMLHTTPRequest object -  iv XHR Object state -  elaborated Unsent When constructed, the XMLHttpRequest object must be in the UNSENT state. This state is represented by the UNSENT constant, whose value is 0. Open The OPEN state is the state of the object when the open() method has been successfully invoked. During this state request headers can be set using setRequestHeader() and the request can be made using send(). Sent The SENT state is the state of the object when the user agent successfully acknowledged the request. Loading The LOADING state is the state of the object when all HTTP headers have been received. The object typically remains in this state until the complete message body (if any) has been received. Done The DONE state is the state of the object when either the data transfer has been completed or something went wrong during the transfer.
The XMLHTTPRequest object -  v XHR methods open(<method>, <url>) This prepares the XHR object for a call to the server. If you are passing parameters with via GET, you can append them to the URL here. send(<body>) This method actually sends the request to the server.  The body parameter can be used to pass any POST parameters that you would like.  You can format your POST parameters just like a GET query-string setRequestHeader(<header>, <value>) This method allows you to set the specified header with the given value. (e.g. content-type) getAllResponseHeaders() Returns all the response headers as a key / value pair. getResponseHeader(<header>) Returns the specific header requested. abort() Aborts the operation
The XMLHTTPRequest object -  vi XHR properties onreadystatechange This property sets the method to be called on every state change.  This is usually your event handler for the asynchronous callback readyState This property defines the state of the XHR.  Possible values include: 0      Uninitated  (open() has not been called) 1      Loading  (send() has not been called)  2      Loaded  (send() has been called, and headers and status are available.)   3      Interactive  (Downloading; responseText holds partial data) 4      Complete  (Operation is complete) When sending the XHR, you will check to see if the readyState is 0 or 4, and in your asynchronous callback handler, you will check to see if the readyState is 4. responseText This returns the response from the server as a string. (Typically text, JSON)
The XMLHTTPRequest object -  vii XHR properties responseXML This returns the response from the server as an XML document.  This is the way to go if you need to return multiple values from your AJAX request.  status This returns the HTTP status code from the server such as 200 for OK or 404 for not found. status This returns a string representation of the HTTP status code such as OK for 200 and Not Found for 404
The XMLHTTPRequest object -  viii XMLHttpRequest Level 2 ,[object Object],[object Object],[object Object],[object Object]
AJAX code – decoded -  i var xmlHttp = GetXmlHttpObject(); if (xmlHttp==null) { alert (&quot;Your browser does not support AJAX!&quot;); return; } var url = “validate.jsp&quot;; url = url + &quot;?id=“ + str; xmlHttp.onreadystatechange = stateChanged; xmlHttp.open(&quot;GET&quot;,url); xmlHttp.send(null);  Function to get the XHR object event handler for the asynchronous callback prepare the XHR object for a call to the server Send the request to the server
AJAX code – decoded -  ii function stateChanged() {  if (xmlHttp.readyState == 4) {  if (req.status == 200) { document.getElementById(“validHint&quot;).innerHTML = xmlHttp.responseText; } } } Event handler code
AJAX code – decoded -  iii function GetXmlHttpObject() { var xmlHttp=null; try { // Firefox, Opera, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject(&quot;Msxml2.XMLHTTP&quot;); } catch (e) { xmlHttp=new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;); } } return xmlHttp; } Getting the XHR object Pre 5.5 versions of IE
AJAX code – decoded -  iv Code overview
AJAX code – decoded -  v UML overview
DOM manipulation concepts var tr = document.createElement('TR'); var td = document.createElement('TD'); tr.appendChild(td); tr.style.backgroundColor = <some color> tr.childNodes tr.firstChild tr.lastChild var parent = td.parentNode; tr.removeChild(td); var img = document.createElement('IMG'); img.setAttribute('src', 'delete.gif'); img.onclick = function() {   // function code } Creating elements Adding child elements Setting element properties Referencing child nodes Accessing the parent node Removing parent nodes Assigning behavior to dynamically created elements
Basic high-level ajax architecture
Design Patterns
Design Patterns ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Frameworks and Toolkits
Frameworks and Toolkits -  i Google Web Toolkit
Frameworks and Toolkits -  ii YUI – Yahoo User Interface
Frameworks and Toolkits -  iii jMaki
Frameworks and Toolkits -  iv DEMO Google Web Toolkit (GWT) Yahoo User Interface (YUI) extJS
Ajax – Security and Performance related aspects
Security issues -  i JavaScript Hijacking JavaScript Hijacking allows an unauthorized attacker to read confidential data from a vulnerable application using a technique similar to the one commonly used to create mash-ups. Traditional Web applications are not vulnerable to JavaScript Hijacking because they do not use JavaScript as a  data transport mechanism. ,[object Object],[object Object],[object Object],[object Object]
Security issues -  ii Precautions against JavaScript Hijacking ,[object Object],[object Object],The best way to defend against JavaScript Hijacking is to do adopt both defensive tactics.
Security issues -  iii Declining Malicious requests ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Security issues -  iv Preventing direct execution of the Response In order to make it impossible for a malicious site to execute a response that includes JavaScript, the legitimate client application can take advantage of the fact that it is allowed to modify the data it receives before executing it, while a malicious application can only execute it using a <script> tag. When the server serializes an object, it should include a prefix (and potentially a suffix) that makes it impossible to execute the JavaScript using a <script> tag. The legitimate client application can remove this extraneous data before running the JavaScript. Example 1: Prefixing text like  while(1) req.open(&quot;GET&quot;, &quot;/object.json&quot;); req.onreadystatechange = function () { if (req.readyState == 4) { var txt = req.responseText; if (txt.substr(0,9) == &quot;while(1);&quot;) { txt = txt.substring(10); } object = eval(&quot;(&quot; + txt + &quot;)&quot;); req = null; } }; Unless the client removes this prefix, evaluating the message will send the JavaScript interpreter into an infinite loop.
Security issues -  v Preventing direct execution of the Response Example 2: T he server can include comment characters around the JavaScript that have to be removed before the JavaScript is sent to eval() /* [{&quot;fname&quot;:“Larry&quot;, &quot;lname&quot;:“Ellison&quot;, &quot;phone&quot;:&quot;6502135600&quot;, &quot;purchases&quot;:60000.00, &quot;email&quot;:“larry@oracle.com&quot; } ] */ Unless the client removes these comment characters, the JS code will not be able to be evaluated.
Performance issues -  i ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Performance issues -  ii What would we like to monitor ? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Ajax – Advantages & Disadvantages
Advantages ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Disadvantages ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Code Samples
Requirements ,[object Object],[object Object],[object Object],[object Object]
Code sample for a Login request <jsp> login.jsp Accept user credentials Login-ajax.js <jsp> validatelogin.jsp JDBC Database 1 2 3 4 5 6 Success / Failure 7 Behind the Scenes – using fire bug
Disclaimer ,[object Object],[object Object],[object Object]

More Related Content

What's hot

ExpenseTracker(ppt).pptx
ExpenseTracker(ppt).pptxExpenseTracker(ppt).pptx
ExpenseTracker(ppt).pptx
AshutoshTiwari618270
 
Training report on web developing
Training report on web developingTraining report on web developing
Training report on web developing
Jawhar Ali
 
Node.js Express
Node.js  ExpressNode.js  Express
Node.js Express
Eyal Vardi
 
Express js
Express jsExpress js
Express js
Manav Prasad
 
Online final report
Online final reportOnline final report
Online final report
darshan patel
 
Jdbc ppt
Jdbc pptJdbc ppt
Jdbc ppt
sandeep54552
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivity
Tanmoy Barman
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
Halil Burak Cetinkaya
 
Node.js Express Framework
Node.js Express FrameworkNode.js Express Framework
Node.js Express Framework
TheCreativedev Blog
 
Students report card for C++ project..
Students report card for C++ project..Students report card for C++ project..
Students report card for C++ project..
Syed Muhammad Zeejah Hashmi
 
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
Arno Lordkronos
 
An Introduction To REST API
An Introduction To REST APIAn Introduction To REST API
An Introduction To REST API
Aniruddh Bhilvare
 
student management system.pdf
student management system.pdfstudent management system.pdf
student management system.pdf
SATYADEVDUSHADH1
 
jQuery Ajax
jQuery AjaxjQuery Ajax
jQuery Ajax
Anand Kumar Rajana
 
Introduction To REST
Introduction To RESTIntroduction To REST
Introduction To REST
Bhavya Siddappa
 
Courier Management System By Mukesh
Courier Management System By MukeshCourier Management System By Mukesh
Courier Management System By Mukesh
Mukesh Kumar
 
Learn REST in 18 Slides
Learn REST in 18 SlidesLearn REST in 18 Slides
Learn REST in 18 Slides
Suraj Gupta
 
Be project ppt asp.net
Be project ppt asp.netBe project ppt asp.net
Be project ppt asp.net
Sanket Jagare
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Vikash Singh
 
MOBILE APPLICATIONS DEVELOPMENT -ANDROID BY SIVASANKARI
MOBILE APPLICATIONS DEVELOPMENT -ANDROID BY SIVASANKARIMOBILE APPLICATIONS DEVELOPMENT -ANDROID BY SIVASANKARI
MOBILE APPLICATIONS DEVELOPMENT -ANDROID BY SIVASANKARI
SivaSankari36
 

What's hot (20)

ExpenseTracker(ppt).pptx
ExpenseTracker(ppt).pptxExpenseTracker(ppt).pptx
ExpenseTracker(ppt).pptx
 
Training report on web developing
Training report on web developingTraining report on web developing
Training report on web developing
 
Node.js Express
Node.js  ExpressNode.js  Express
Node.js Express
 
Express js
Express jsExpress js
Express js
 
Online final report
Online final reportOnline final report
Online final report
 
Jdbc ppt
Jdbc pptJdbc ppt
Jdbc ppt
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivity
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
 
Node.js Express Framework
Node.js Express FrameworkNode.js Express Framework
Node.js Express Framework
 
Students report card for C++ project..
Students report card for C++ project..Students report card for C++ project..
Students report card for C++ project..
 
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
 
An Introduction To REST API
An Introduction To REST APIAn Introduction To REST API
An Introduction To REST API
 
student management system.pdf
student management system.pdfstudent management system.pdf
student management system.pdf
 
jQuery Ajax
jQuery AjaxjQuery Ajax
jQuery Ajax
 
Introduction To REST
Introduction To RESTIntroduction To REST
Introduction To REST
 
Courier Management System By Mukesh
Courier Management System By MukeshCourier Management System By Mukesh
Courier Management System By Mukesh
 
Learn REST in 18 Slides
Learn REST in 18 SlidesLearn REST in 18 Slides
Learn REST in 18 Slides
 
Be project ppt asp.net
Be project ppt asp.netBe project ppt asp.net
Be project ppt asp.net
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
MOBILE APPLICATIONS DEVELOPMENT -ANDROID BY SIVASANKARI
MOBILE APPLICATIONS DEVELOPMENT -ANDROID BY SIVASANKARIMOBILE APPLICATIONS DEVELOPMENT -ANDROID BY SIVASANKARI
MOBILE APPLICATIONS DEVELOPMENT -ANDROID BY SIVASANKARI
 

Viewers also liked

Rich Internet Applications (RIA)
Rich Internet Applications (RIA)Rich Internet Applications (RIA)
Rich Internet Applications (RIA)guest3214e8
 
Basics of Rich Internet Applications
Basics of Rich Internet ApplicationsBasics of Rich Internet Applications
Basics of Rich Internet Applications
Subramanyan Murali
 
Xay Dung Thuong Hieu
Xay Dung Thuong HieuXay Dung Thuong Hieu
Xay Dung Thuong Hieuhaanh147
 
Donkr.COM Social community presentation
Donkr.COM Social community presentationDonkr.COM Social community presentation
Donkr.COM Social community presentation
Ivo Capins
 
Social mediamarketing industry report 2012
Social mediamarketing industry report 2012Social mediamarketing industry report 2012
Social mediamarketing industry report 2012
Vasco Marques
 
Creative Commons. Jak produkować i dystrybuować treści w czasach mediów społ...
Creative Commons.  Jak produkować i dystrybuować treści w czasach mediów społ...Creative Commons.  Jak produkować i dystrybuować treści w czasach mediów społ...
Creative Commons. Jak produkować i dystrybuować treści w czasach mediów społ...
Alek Tarkowski
 
In Focus May June 2008 Final
In Focus May June 2008 FinalIn Focus May June 2008 Final
In Focus May June 2008 FinalMarshall Oseas
 
Sun Software
Sun SoftwareSun Software
Sun Software
mnalls
 
香港六合彩
香港六合彩香港六合彩
How Learning Management Solutions Meet Compliance & Regulatory Requirements
How Learning Management Solutions Meet Compliance & Regulatory RequirementsHow Learning Management Solutions Meet Compliance & Regulatory Requirements
How Learning Management Solutions Meet Compliance & Regulatory Requirements
marcblumenthal
 
Bucaille
BucailleBucaille
BucailleNau Al
 
Flex Data Access
Flex Data AccessFlex Data Access
Flex Data Access
sergiy
 
Scratch
ScratchScratch
Scratchjepcke
 
SQALE Software Quality Assessment based on Lifecycle Expectations
SQALE Software Quality Assessment based on Lifecycle ExpectationsSQALE Software Quality Assessment based on Lifecycle Expectations
SQALE Software Quality Assessment based on Lifecycle ExpectationsGlaucio Scheibel
 
Work of the Year
Work of the YearWork of the Year
Work of the Yearguestfdb62f
 
Marketing pessoal e neworking
Marketing pessoal e neworkingMarketing pessoal e neworking
Marketing pessoal e neworking
Vasco Marques
 

Viewers also liked (20)

Rich Internet Applications (RIA)
Rich Internet Applications (RIA)Rich Internet Applications (RIA)
Rich Internet Applications (RIA)
 
Basics of Rich Internet Applications
Basics of Rich Internet ApplicationsBasics of Rich Internet Applications
Basics of Rich Internet Applications
 
Mashup ppt
Mashup pptMashup ppt
Mashup ppt
 
Xay Dung Thuong Hieu
Xay Dung Thuong HieuXay Dung Thuong Hieu
Xay Dung Thuong Hieu
 
Reboot 2020
Reboot 2020Reboot 2020
Reboot 2020
 
Donkr.COM Social community presentation
Donkr.COM Social community presentationDonkr.COM Social community presentation
Donkr.COM Social community presentation
 
Social mediamarketing industry report 2012
Social mediamarketing industry report 2012Social mediamarketing industry report 2012
Social mediamarketing industry report 2012
 
Creative Commons. Jak produkować i dystrybuować treści w czasach mediów społ...
Creative Commons.  Jak produkować i dystrybuować treści w czasach mediów społ...Creative Commons.  Jak produkować i dystrybuować treści w czasach mediów społ...
Creative Commons. Jak produkować i dystrybuować treści w czasach mediów społ...
 
In Focus May June 2008 Final
In Focus May June 2008 FinalIn Focus May June 2008 Final
In Focus May June 2008 Final
 
Sun Software
Sun SoftwareSun Software
Sun Software
 
How I Lern English
How I Lern EnglishHow I Lern English
How I Lern English
 
香港六合彩
香港六合彩香港六合彩
香港六合彩
 
How Learning Management Solutions Meet Compliance & Regulatory Requirements
How Learning Management Solutions Meet Compliance & Regulatory RequirementsHow Learning Management Solutions Meet Compliance & Regulatory Requirements
How Learning Management Solutions Meet Compliance & Regulatory Requirements
 
Presentation2
Presentation2Presentation2
Presentation2
 
Bucaille
BucailleBucaille
Bucaille
 
Flex Data Access
Flex Data AccessFlex Data Access
Flex Data Access
 
Scratch
ScratchScratch
Scratch
 
SQALE Software Quality Assessment based on Lifecycle Expectations
SQALE Software Quality Assessment based on Lifecycle ExpectationsSQALE Software Quality Assessment based on Lifecycle Expectations
SQALE Software Quality Assessment based on Lifecycle Expectations
 
Work of the Year
Work of the YearWork of the Year
Work of the Year
 
Marketing pessoal e neworking
Marketing pessoal e neworkingMarketing pessoal e neworking
Marketing pessoal e neworking
 

Similar to RIA and Ajax

01. http basics v27
01. http basics v2701. http basics v27
01. http basics v27
Eoin Keary
 
Unit-5.pptx
Unit-5.pptxUnit-5.pptx
Unit-5.pptx
itzkuu01
 
AJAX Workshop Notes
AJAX Workshop NotesAJAX Workshop Notes
AJAX Workshop Notes
Pamela Fox
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web ArchitectureChamnap Chhorn
 
AJAX Transport Layer
AJAX Transport LayerAJAX Transport Layer
AJAX Transport Layer
Siarhei Barysiuk
 
jkljklj
jkljkljjkljklj
jkljklj
hoefo
 
jQuery : Talk to server with Ajax
jQuery : Talk to server with AjaxjQuery : Talk to server with Ajax
jQuery : Talk to server with AjaxWildan Maulana
 
Ajax
AjaxAjax
Ajax
Yoga Raja
 
AJAX
AJAXAJAX
AJAX
AJAXAJAX
Scalable network applications, event-driven - Node JS
Scalable network applications, event-driven - Node JSScalable network applications, event-driven - Node JS
Scalable network applications, event-driven - Node JSCosmin Mereuta
 
REST & RESTful Web Service
REST & RESTful Web ServiceREST & RESTful Web Service
REST & RESTful Web Service
Hoan Vu Tran
 
AJAX
AJAXAJAX
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
Tiago Knoch
 
RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座Li Yi
 
Introduction to Ajax programming
Introduction to Ajax programmingIntroduction to Ajax programming
Introduction to Ajax programming
Fulvio Corno
 
Restful web services with java
Restful web services with javaRestful web services with java
Restful web services with java
Vinay Gopinath
 
Rest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.jsRest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.jsCarol McDonald
 

Similar to RIA and Ajax (20)

01. http basics v27
01. http basics v2701. http basics v27
01. http basics v27
 
Unit-5.pptx
Unit-5.pptxUnit-5.pptx
Unit-5.pptx
 
AJAX Workshop Notes
AJAX Workshop NotesAJAX Workshop Notes
AJAX Workshop Notes
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
 
AJAX Transport Layer
AJAX Transport LayerAJAX Transport Layer
AJAX Transport Layer
 
jkljklj
jkljkljjkljklj
jkljklj
 
jQuery : Talk to server with Ajax
jQuery : Talk to server with AjaxjQuery : Talk to server with Ajax
jQuery : Talk to server with Ajax
 
Ajax
AjaxAjax
Ajax
 
AJAX
AJAXAJAX
AJAX
 
AJAX
AJAXAJAX
AJAX
 
Scalable network applications, event-driven - Node JS
Scalable network applications, event-driven - Node JSScalable network applications, event-driven - Node JS
Scalable network applications, event-driven - Node JS
 
REST & RESTful Web Service
REST & RESTful Web ServiceREST & RESTful Web Service
REST & RESTful Web Service
 
AJAX
AJAXAJAX
AJAX
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
 
RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座RESTful SOA - 中科院暑期讲座
RESTful SOA - 中科院暑期讲座
 
Ajax
AjaxAjax
Ajax
 
Introduction to Ajax programming
Introduction to Ajax programmingIntroduction to Ajax programming
Introduction to Ajax programming
 
Restful web services with java
Restful web services with javaRestful web services with java
Restful web services with java
 
Rest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.jsRest with Java EE 6 , Security , Backbone.js
Rest with Java EE 6 , Security , Backbone.js
 
Rest
RestRest
Rest
 

Recently uploaded

Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 

Recently uploaded (20)

Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 

RIA and Ajax

  • 1. Introduction to RIA and AJAX Created by - Schubert [email_address]
  • 2.
  • 3.
  • 4. RIA – Rich Internet Applications
  • 5.
  • 6. Introduction – ii Thick Client – Thin Client Server Client Data Data Data Data Business Logic Presentation Logic Presentation Logic Business Logic Business Logic Presentation Logic UI Engine Business Logic Presentation Logic HTML
  • 7. Introduction - iii The need for smart clients
  • 8. Introduction - iv RIA Richness Communication Application Bringing the Desktop to the Web ! Connected / Alive Interactive Responsive Traditional web Pervasiveness Online / Offline mode Event’s, notification Security Accessibility A RIA
  • 9.
  • 10. Web 2.0 - ii By products
  • 11.
  • 13. HTML – DOM HTML - Are HTML document structures validated ? - <!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;> - What is XHTML ? - HTML 5 and XHTML 5 DOM 
  • 14. CSS CSS Color – Visibility – Positioning - Backgrounds
  • 15. HTTP - i OSI (Open Systems Interconnection) – Reference model Application Presentation Session Transport Network Datalink Physical HTTP Headers Methods Status codes
  • 16.
  • 17. HTTP - iii HTTP methods Get - Conditional GET (if headers such as if-modified-since , etc are present.) - Partial GET (if headers include ranges , avoids data transmission already held by the client) POST - Provide a block of data for processing HEAD - Identical to GET except that the server MUST NOT return a message-body in the response. (used for testing hypertext links for validity, accessibility, and recent modification.) PUT / DELETE / TRACE / CONNECT / OPTIONS
  • 18. HTTP - iv HTTP status codes Informational Success Re - Direction Client Error Server Error 1xx 2xx 3xx 4xx 5xx 100 Continue 200 OK 202 Accepted 301 Moved Permanently 304 Not Modified 400 Bad Request 403 Forbidden 404 Not Found 500 Internal Server Error 502 Bad Gateway 503 Service Unavailable
  • 19.
  • 20. XML / JSON - ii {&quot;menu&quot;: { &quot;id&quot;: &quot;file&quot;, &quot;value&quot;: &quot;File&quot;, &quot;popup&quot;: { &quot;menuitem&quot;: [ {&quot;value&quot;: &quot;New&quot;, &quot;onclick&quot;: &quot;CreateNewDoc()&quot;}, {&quot;value&quot;: &quot;Open&quot;, &quot;onclick&quot;: &quot;OpenDoc()&quot;}, {&quot;value&quot;: &quot;Close&quot;, &quot;onclick&quot;: &quot;CloseDoc()&quot;} ] } }} <menu id=&quot;file&quot; value=&quot;File&quot;> <popup> <menuitem value=&quot;New&quot; onclick=&quot;CreateNewDoc()&quot; /> <menuitem value=&quot;Open&quot; onclick=&quot;OpenDoc()&quot; /> <menuitem value=&quot;Close&quot; onclick=&quot;CloseDoc()&quot; /> </popup> </menu> JSON v/s XML
  • 21. AJAX
  • 22. Introduction AJAX (Asynchronous JavaScript and XML) Ajax can be defined as a group of interrelated web development techniques used to create interactive web applications or rich Internet applications. AJAX CSS / XHTML DOM XML / XSLT XHR Presentation semantics Dynamic display and data interaction Interchange and manipulation Object for communication
  • 23. Introduction - i AJAX interactions – classical web model
  • 24. Introduction - i AJAX interactions – the ajax model
  • 25. The XMLHTTPRequest object - i The XMLHttpRequest Object specification defines an API that provides scripted client functionality for transferring data between a client and a server. The XMLHttpRequest object implements an interface exposed by a scripting engine that allows scripts to perform HTTP client functionality, such as submitting form data or loading data from a server. Supports any text based format, including XML It can be used to make requests over both HTTP and HTTPS Supports all activity involved with HTTP requests or responses for the defined HTTP methods .
  • 26.
  • 27. The XMLHTTPRequest object - iii XHR Object state, events and exceptions XHR Object State UNSENT (Constant value – 0) OPEN (Constant value – 1) SENT (Constant value – 2) LOADING (Constant value – 3) DONE (Constant value – 4) XHR Object Exceptions  XMLHttpRequestException NETWORK_ERR ABORT_ERR XHR Event  readystatechange
  • 28. The XMLHTTPRequest object - iv XHR Object state - elaborated Unsent When constructed, the XMLHttpRequest object must be in the UNSENT state. This state is represented by the UNSENT constant, whose value is 0. Open The OPEN state is the state of the object when the open() method has been successfully invoked. During this state request headers can be set using setRequestHeader() and the request can be made using send(). Sent The SENT state is the state of the object when the user agent successfully acknowledged the request. Loading The LOADING state is the state of the object when all HTTP headers have been received. The object typically remains in this state until the complete message body (if any) has been received. Done The DONE state is the state of the object when either the data transfer has been completed or something went wrong during the transfer.
  • 29. The XMLHTTPRequest object - v XHR methods open(<method>, <url>) This prepares the XHR object for a call to the server. If you are passing parameters with via GET, you can append them to the URL here. send(<body>) This method actually sends the request to the server.  The body parameter can be used to pass any POST parameters that you would like.  You can format your POST parameters just like a GET query-string setRequestHeader(<header>, <value>) This method allows you to set the specified header with the given value. (e.g. content-type) getAllResponseHeaders() Returns all the response headers as a key / value pair. getResponseHeader(<header>) Returns the specific header requested. abort() Aborts the operation
  • 30. The XMLHTTPRequest object - vi XHR properties onreadystatechange This property sets the method to be called on every state change.  This is usually your event handler for the asynchronous callback readyState This property defines the state of the XHR.  Possible values include: 0      Uninitated (open() has not been called) 1      Loading (send() has not been called) 2      Loaded (send() has been called, and headers and status are available.) 3      Interactive (Downloading; responseText holds partial data) 4      Complete (Operation is complete) When sending the XHR, you will check to see if the readyState is 0 or 4, and in your asynchronous callback handler, you will check to see if the readyState is 4. responseText This returns the response from the server as a string. (Typically text, JSON)
  • 31. The XMLHTTPRequest object - vii XHR properties responseXML This returns the response from the server as an XML document.  This is the way to go if you need to return multiple values from your AJAX request. status This returns the HTTP status code from the server such as 200 for OK or 404 for not found. status This returns a string representation of the HTTP status code such as OK for 200 and Not Found for 404
  • 32.
  • 33. AJAX code – decoded - i var xmlHttp = GetXmlHttpObject(); if (xmlHttp==null) { alert (&quot;Your browser does not support AJAX!&quot;); return; } var url = “validate.jsp&quot;; url = url + &quot;?id=“ + str; xmlHttp.onreadystatechange = stateChanged; xmlHttp.open(&quot;GET&quot;,url); xmlHttp.send(null); Function to get the XHR object event handler for the asynchronous callback prepare the XHR object for a call to the server Send the request to the server
  • 34. AJAX code – decoded - ii function stateChanged() { if (xmlHttp.readyState == 4) { if (req.status == 200) { document.getElementById(“validHint&quot;).innerHTML = xmlHttp.responseText; } } } Event handler code
  • 35. AJAX code – decoded - iii function GetXmlHttpObject() { var xmlHttp=null; try { // Firefox, Opera, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject(&quot;Msxml2.XMLHTTP&quot;); } catch (e) { xmlHttp=new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;); } } return xmlHttp; } Getting the XHR object Pre 5.5 versions of IE
  • 36. AJAX code – decoded - iv Code overview
  • 37. AJAX code – decoded - v UML overview
  • 38. DOM manipulation concepts var tr = document.createElement('TR'); var td = document.createElement('TD'); tr.appendChild(td); tr.style.backgroundColor = <some color> tr.childNodes tr.firstChild tr.lastChild var parent = td.parentNode; tr.removeChild(td); var img = document.createElement('IMG'); img.setAttribute('src', 'delete.gif'); img.onclick = function() { // function code } Creating elements Adding child elements Setting element properties Referencing child nodes Accessing the parent node Removing parent nodes Assigning behavior to dynamically created elements
  • 39. Basic high-level ajax architecture
  • 41.
  • 43. Frameworks and Toolkits - i Google Web Toolkit
  • 44. Frameworks and Toolkits - ii YUI – Yahoo User Interface
  • 45. Frameworks and Toolkits - iii jMaki
  • 46. Frameworks and Toolkits - iv DEMO Google Web Toolkit (GWT) Yahoo User Interface (YUI) extJS
  • 47. Ajax – Security and Performance related aspects
  • 48.
  • 49.
  • 50.
  • 51. Security issues - iv Preventing direct execution of the Response In order to make it impossible for a malicious site to execute a response that includes JavaScript, the legitimate client application can take advantage of the fact that it is allowed to modify the data it receives before executing it, while a malicious application can only execute it using a <script> tag. When the server serializes an object, it should include a prefix (and potentially a suffix) that makes it impossible to execute the JavaScript using a <script> tag. The legitimate client application can remove this extraneous data before running the JavaScript. Example 1: Prefixing text like while(1) req.open(&quot;GET&quot;, &quot;/object.json&quot;); req.onreadystatechange = function () { if (req.readyState == 4) { var txt = req.responseText; if (txt.substr(0,9) == &quot;while(1);&quot;) { txt = txt.substring(10); } object = eval(&quot;(&quot; + txt + &quot;)&quot;); req = null; } }; Unless the client removes this prefix, evaluating the message will send the JavaScript interpreter into an infinite loop.
  • 52. Security issues - v Preventing direct execution of the Response Example 2: T he server can include comment characters around the JavaScript that have to be removed before the JavaScript is sent to eval() /* [{&quot;fname&quot;:“Larry&quot;, &quot;lname&quot;:“Ellison&quot;, &quot;phone&quot;:&quot;6502135600&quot;, &quot;purchases&quot;:60000.00, &quot;email&quot;:“larry@oracle.com&quot; } ] */ Unless the client removes these comment characters, the JS code will not be able to be evaluated.
  • 53.
  • 54.
  • 55. Ajax – Advantages & Disadvantages
  • 56.
  • 57.
  • 59.
  • 60. Code sample for a Login request <jsp> login.jsp Accept user credentials Login-ajax.js <jsp> validatelogin.jsp JDBC Database 1 2 3 4 5 6 Success / Failure 7 Behind the Scenes – using fire bug
  • 61.