You are on page 1of 3

Ajax

Is AJAX a programming language?


No
What is AJAX?
In one sense, AJAX is simply an acronym for Asynchronous JavaScript And XML
In another, it is a protocol for sending reuests from a client !"e# page$ to a server,
and ho" the information is % should #e communicated #et"een the client and the
server
How new is AJAX?
&he terminology is ne", #ut the techniues are not'
Why can/should AJAX be used?
AJAX is #est suited for small !hopefully uno#trusive$ updates to the current
"e# page, #ased on information that is not availa#le until it has #een provided
#y the end user'
Describe the formats and protocols used/specified by AJAX
&he client "e# page is responsi#le for creating the Xml(ttp)euest, and therefore the connection from the "e#
page to some application on the server'
*art of this connection identifies ho" the response can % should #e provided to the client code + via the use of a
call#ac, routine'
&he call#ac, routine is invo,ed multiple times "ith a status code, indicating the reason for the invocation'
If the reuest can #e successfully completed #y the server application,
a responce should also #e provided'
Describe the formats and protocols used/specified by AJAX &he client "e# page is responsi#le for creating the
Xml(ttp)euest, and therefore the connection from the "e# page to some application on the server'
*art of this connection identifies ho" the response can % should #e provided to the client code + via the use of a
call#ac, routine'
&he call#ac, routine is invo,ed multiple times "ith a status code, indicating the reason for the invocation'
If the reuest can #e successfully completed #y the server application,
a responce should also #e provided'
Describe some things that cant be done with AJAX
Sending a reuest to a server outside of the domain from "hich
the "e# page originated'
How should AJAX obects be created?
In a #ro"ser general manner, if at all possi#le'
!or what error conditions should programs chec"?
&he connection can not #e esta#lished
&he reuest does not complete in a timely fashion
-ne.pected response
Are !inite #tate $achines %!#$s& appropriate for use with AJAX?
*ossi#ly
&here are circumstances under "hich an /SM might #e appropriate'
It depends upon the comple.ity of the environment, and the num#er
of machines that might need to #e contacted in order to o#tain the
response to the reuest'
Identify and describe the state transitions that can/should occur within a transaction
)eset 0 1hen the Xml(ttp)euest o#2ect is created, no connection yet e.ists #et"een the clent, and the server'
3pen 0 1hen the .ml(ttp'open!$ is issued, the reuest is #eing prepared for transmission to the server
Sent 0 1hen the .ml(ttp'send!$ is issued, the reuest is transmitted to the server application
)cvd 0 1hen the .ml(ttp call#ac, routine is called, the readyState and status fields of the o#2ect define "hy the
routine "as called
What 'alues e(ists for the XmlHttp)e*uest+ready#tate field, and what do they mean?
readyState values0
4 5 uninitiali6ed
7 5 loading
8 5 loaded
9 5 interactive
: 5 complete
When is it appropriate to access, or use the other fields within the XmlHttp)e*uest obect?
&he most important field is the readyState field' 3nce a value of : !i'e', complete$ is received,
then the ne.t most important field is status' &he value of status "ill #e the same as the
(&&* Status ;ode values
When should AJAX -./ be used?
It "ould not #e appropriate to use AJAX "hen the ans"er%result can #e determinded
#y the client' <enerally, the purpose of AJAX is to su#mit a short reuest to the server,
and process the response in such a "ay as to add value to the currently displayed page'
It "ould also not #e appropriate to use AJAX "hen the magnitude of the response is such
that it "ould #e easier, and more clear to redisplay the page'
What obects are used by AJAX programs?
&he most #ovious % correct ans"er "ould #e Xml(ttp)euest'
(o"ever, personally, I "ould seriously consider someone "ho discussed the use
of the call#ac, routine, and most specifically the response as o#2ects'
What does AJAX stand for and who coined the phrase?
Advanced JavaScript And XML, coined #y Jesse James <arret, Adaptive *ath +
http0%%adaptivepath'com%pu#lications%essays%archives%4449=>'php
What Ja'ascript obect is used to dri'e AJAX re*uests, and how does it differ on 'arious browsers
Xml(ttp)euest' It?s an ActiveX o#2ect on I@, #ut is a native o#2ect on the other #ro"sers !/irefo., Mo6illa, 3pera,
Safari, Aonueror$
How do you "now that an AJAX re*uest has completed?
&he X()'readyState is : and the X()'status is 844 !or 6ero if the reuest is to a local file$' &he call#ac, function is
called four times + first "ith status57, then 8,9, and finally :'
How does X$0 processing differ on the different browsers?
It?s an ActiveX o#2ect on I@, #ut is native on the other #ro"sers
Is it possible to achie'e similar results without the XmlHttp)e*uest obect?
A hidden I/rame !actually an I/rame of si6e 4p. B 4p. due to a #ug in I@$ can #e used to retrieve data, and its
contents can then #e processed in a similar manner to the response from an X() call'
S3A
S3A stands for service oriented architecture' /rom 33A to S3A, computing and development
approach of soft"are services are changing rapidly'
S3A are #ased on a mesh of soft"are services' Services comprise unassociated, loosely coupled
units of functionality that have no calls to each other em#edded in them' @ach service
implements one action, such as filling out an online application for an account, vie"ing an online
#an,+statement, or placing an online #oo,ing or airline tic,et order' Instead of services
em#edding calls to each other in their source code they use defined protocols that descri#e ho"
services pass and parse messages, using description meta+data'
&he developer associates individual S3A o#2ects #y using orchestration' In the process of
orchestration the developer associates soft"are functionality !the services$ in a non+hierarchical
arrangement !in contrast to a class hierarchy$ using a soft"are tool that contains a complete list
of all availa#le services, their characteristics, and the means to #uild an application utili6ing
these sources'
-nderlying and ena#ling all of this reuires meta data in sufficient detail to descri#e not only the
characteristics of these services, #ut also the data that drives them' Programmers have made
e.tensive use of XML in S3A to structure data that they "rap in a nearly e.haustive description+
container' Analogously, 1SCL typically descri#e the services themselves, "hile S3A*
descri#es the communications protocols' 1hether these description languages are the #est
possi#le for the 2o#, and "hether they "ill remain the favorites in the future, remains an open
uestion' In the meantime S3A depends on data and services that are descri#ed metadata that
should meet the follo"ing t"o criteria0
the metadata should come in a form that soft"are systems can use to configure
dynamically #y discovery and incorporation of defined services, and also to maintain
coherence and integrity
the metadata should come in a form that system designers can understand and manage
"ith a reasona#le e.penditure of cost and effort

You might also like