6 Comments »

The purpose of this post is to try to explain AJAX the way I understand it. To me,
AJAX is not some complicated technology that you need to go out and buy books to
learn. Rather, it is simply two or more web pages, and a couple of simple Javascript
functions.I have come to hate the term AJAX. It seems every time I mention AJAX, either
developers get nervous, or account managers get excited. Neither situation benefits me.
Actually, I’ve pretty much stopped using the term at all. Depending on my audience, I’ll
make up different terms. Like when I’m talking to Java developers, I’ll say “we need to do
a back end call” and that doesn’t freak them out, but telling them we need to do an AJAX
call makes them sweat.

Hopefully, if enough people read posts like this, the mystery and glamor will be removed
from the term AJAX. So, lets get to the de-mystification.

First, lets dissect the name itself. A.J.A.X.


A = Asynchronous


J = Javascript


A = And


X = XML

Most developers reading this will feel pretty comfortable with the Javascript part.
It’s the asynchronous and the XML parts that make most people nervous. They really
shouldn’t. I’ll briefly describe each, then we’ll put it all together.

Asynchronous simply means “lets open another URL without changing or reloading the page.”
Picture it like this… You are reading a blog post, and you come across a link to another page.
You don’t want to stop reading, so you right click the link and open it in a new window or another
tab right? Now you continue reading the page you were on. Asynchronous simply means we are doing
something else without disturbing the page we are viewing.

Javascript, we all know what that is I hope. If you don’t, then you should probably be reading
some other sites first (intro to Javascript).
Now, the purpose of this post is to make AJAX easy to write, and easy to understand, so we are
going to use Javascript tools that make our job a lot easier. Whenever I write AJAX code, I always use
the Prototype Javascript framework.
Go ahead and download it, we’ll talk more about it later, just know that it has most of the Javascript
we will need built in.

Before I get into XML, and what it is, I would like to note that AJAX doesn’t even need XML to work.
For those who can’t or won’t use XML, don’t worry, you can still write useful AJAX code without it, but
please continue reading and maybe you will decide that you can use XML after all. It does make AJAX a
lot easier, but like I said, it’s not necessary.

XML shouldn’t be scary, but many people just don’t know what it is. If you’ve got this far and you
aren’t totally confused, then you probably know how to write HTML. HTML and XML should not necessarily
be compared, but they are similar in how they are written. XML is written using ‘tags’ similar to HTML.
And XML tags need to be “balanced” just like HTML should be. Following is some simple HTML:

<html>
  <head>
    <title>sample</title>
  </head>
  <body>
    <div>something</div>
  </body>
</html>

Most people will recognize this as the most basic of HTML code, but what you may not know is that
this could also be valid XML code as well. I mentioned the word “balanced” earlier. In the sample
above, you will notice that each tag has a corresponding ending tag like <html></html>.
That is what balanced means. That is probably the most important concept in XML. Unlike HTML, we don’t
necessarily use XML for presentation, XML is normally used more like a database. For example, if the
code above were an XML file, and we wanted to think of it as data, we could say that the <html>
section could be the database itself, the <head> section could represent a table in that database,
the <title> section could represent a column in that table and the word “sample” would be the value
of that column. If it were a database, we could query it something like this…

select title
from html.head

We could spend a great deal of time explaining XML, but lets just says that its basic function is to
store data and to define what that data means. So, in the example above, the word “sample” means, and
we know this because of the XML tags we use to surround it, it is the ‘title’ of the ‘head’ of the ‘html’ file.

I’ll write one more sample XML just for clarification because I think I’ve spent too much time on
this subject already, but I think one more sample will be helpful in describing just how easy XML is.
Lets say we want to get a list of books. We could represent that list of books with XML.

<books>  
  <book>     
    <title>The Shining</title>     
    <author>Stephen King</author>     
    <ISBN>0743437497</ISBN>     
  </book>     
  <book>     
    <title>Fahrenheit 451</title>     
    <author>Ray Bradbury</author>     
    <ISBN>9506440298</ISBN>     
  </book>     
</books>

From that example, XML should be pretty self explanatory. And that is the real point of XML.

That concludes “AJAX Fast and Easy – part one”. In part two, we will build a basic HTML file
and make an AJAX call to another basic HTML file, leaving the XML part out of the equation.

UPDATE:


Ajax Fast and Easy – part two is now available

 



Tags: , , , , , , , , ,

Trackback URL | Comments RSS

6 Responses to “AJAX Fast and Easy – part one”
 

Very insightful…I feel like I can code!

Matt Levy wrote on February 20th, 2008 at 3:47 pm

 

[…] AJAX Fast and Easy – part one […]

 

[…] AJAX Fast and Easy – part one […]

 

[…] In AJAX Fast and Easy – part one, we defined AJAX and decided it wasn’t really that complicated. In AJAX Fast and Easy – part two, we created an index.html file, a backendHTML.html file and we downloaded the Prototype Javascript framework. We put them all together and made some ajax magic happen. However, in part 2 we left out all the junk about XML, and all we really did was display the ajax results as an alert. Not too useful, but it proved the point and it was pretty fun. […]

 

[…] AJAX Fast and Easy – part one » position:relative – a Web and Now blog Hopefully, if enough people read posts like this, the mystery and glamor will be removed from the term AJAX. So, lets get to the de-mystification. […]

 

[…] AJAX Fast and Easy – part one » position:relative – a Web and Now blog Hopefully, if enough people read posts like this, the mystery and glamor will be removed from the term AJAX. So, lets get to the de-mystification. […]


 




  • hving sex with your wife
  • sweet young teen alone on couch
  • black young angels
  • teen shemale panties vid
  • xxx mature brit wifes
  • you lesbian video
  • mature russian panty model pics
  • asian diamond anal
  • private teen video pass
  • teen girls cum tubes
  • better sex free streaming video
  • masturbating teenage girls
  • cloe pussy hole
  • pregnant girl naked
  • at party
  • pictures women asian nude
  • pissing group sex
  • scene girl tits
  • amateur free video virgin sex
  • petite nude gallerys free
  • fuck hole video
  • high school fuck party
  • lesbian group sex hardcore big tit
  • coed party hardcore
  • sexy boobs tube
  • Teen sandra model mod
  • free wifey tits pics
  • girlfriend handjob videos
  • hairy mature sluts movies
  • Hot sex movies
  • asian girl arms tied
  • cum im mouth movies
  • perfect tits and pussy
  • scott brown naked dick
  • galleries facial abuse
  • petite latina teen video
  • A sexy girl stripping
  • black wet cumming pussy
  • golden sexy mature women
  • drunk girls gangbanged fuck videos
  • free black dick white chick
  • Thick black boobs
  • real shy amateur group sex
  • voyer sex pictures
  • best black pussy in
  • sally struthers breasts picture
  • free live webcam teens
  • amateur wife facesitting
  • Teen beauty advice
  • uk ebony
  • deek that pussy
  • hot teen dick freaky stripping
  • deep throat cumshot movies
  • husband films wife having sex
  • young japaneese girls for sex
  • Julianne moore boogie nights sex scene
  • i want to fuck a girl
  • celebrtie sex videos
  • girls next door flashing
  • galleries free video adult asian
  • girl on girl ass play
  • dug and women sex movies
  • christian young new pictures
  • bikini roundup movie
  • husband riding his wife in video
  • naked girls humiliate guys
  • gang bang caryssa video
  • little girls wet pussy
  • pics stars
  • bid black pussy
  • hot girls canada sex
  • First fuck teens
  • flat butt girls pictures
  • sexs and fuck
  • Black christmas sex
  • girls having oal sex
  • sexy brunet teen fucked nice ass
  • sexy b ack girls
  • classic erotic movie tubes
  • video big nipples
  • glamaour shemale movies
  • marilyn chambers ass fuck free pics
  • naked video share
  • anal sex education video
  • free virgin pounding sex movies
  • homemade lesbian sex
  • wifes first black cock fuck
  • watch movies naked men free
  • mature asshole movies
  • sex with girls named whitney
  • girls showing there pussy videos
  • movies that brought sex out
  • teen girls forced sex
  • drunken college girls sex videos free
  • pussy eat outs
  • sexy big ass teenie
  • Extreme sexy girls
  • tranny ebony pics preview free
  • Huge penis in vagina
  • free vintage sex pics
  • girls softball player pictures
  • all amateur teen
  • free teen anal
  • pucelle video amateur
  • shemale sexmovie galleries
  • cfnm asian handjob videos
  • husband watch wife fuck free stream
  • ass reaming anal sex
  • foxy sexy teen girls
  • young asian girl
  • wifed forced to suck black
  • reverse cow girl sex postion video
  • free voyuer anal movies
  • black girls bigg butts
  • live webcam girls sexy free
  • film amateur cul
  • nudist nudism beach girls
  • brazilian lesbian sex
  • Movies of anal sex
  • free amatur anal movies
  • videos illegal
  • sex teen cartoons
  • Girls fucking aminals
  • mature women nudist naturalist pictures
  • amateur fuck movie
  • kate from first time video girls
  • banana girl pics
  • de young advertisement girl painting
  • anal redheads gapping butt ass
  • College girl fucked
  • free videos interracial xxx
  • herine bell topless pics
  • small blonde pics naked
  • black sluts monsta ass fucking
  • bit black tits
  • pee girl video
  • free mature daily fuck pics
  • non sex brunettes nude pics
  • spread naked butt pics
  • Queer as folk uk sex scene
  • asian girls petite
  • free watch girl fingering herself
  • busty interracial galleries
  • black ebony anal movie gallery
  • real xxx
  • mixed wrestling sex videos
  • free sex pics hairy
  • naked pussy photos video
  • Girl strips then masturbates
  • come on pussy
  • scarlett keeling topless pics
  • young teens japonese models
  • on fuck party
  • big black girl naked
  • Indian girls first time sex
  • wife tube xxx
  • blonde girl by huge dildo
  • Chinese pussy fucking
  • Youngest naked teens
  • naked girls of evony
  • man pays girl for sex
  • sex products for married couples
  • wife large pussy
  • young janet jacme free
  • sexy teens riding cock
  • blonde xxx free women
  • older women sex with young girls
  • group sex
  • tiny little pussy art
  • petite point furniture
  • free sex siories and pics
  • swingers guys with girls
  • wife wants movies recommend
  • Huge boobs small bikini
  • pantyhose free sex pictures
  • old man teen girl sex video
  • scary movie handjob
  • stripping then fingering video
  • young interracial slut training
  • public nudety pussy showing
  • torrent young video girl
  • pussy licking college babes
  • asians gone anal free
  • beautiful teen babes fuck vids
  • Naturism pageant teen
  • japanise nekkid babes
  • threesome sex photo thumbnails
  • videos of young couples having sex
  • shaved tan pussy
  • big black photos
  • Sexy naked beauty
  • asian blowjob pics
  • Girls on girls sex videos
  • slut mature sex
  • granny handjob movie
  • movie entitled american beauty
  • Running nude girls
  • gigantic black pussy
  • online lesbian sex vidos
  • jets halftime girls flashing
  • ebony queens list
  • little teen russian fuck
  • erotic sex storys
  • english anime videos
  • xxx young free
  • videos of young girls defloration
  • Sexy girls having hardcore sex
  • Big clit pussies
  • free videos donkey punch sex
  • Lesbian sex vidieos
  • Teens home made videos
  • Marge simpsons big boobs
  • nude movie
  • Nude married girls
  • lolly hardcore pictures
  • young daughter fuck
  • hot amatuer cowboy couple sex video
  • Shilpa shetty sex movie
  • free amateur teen bra
  • submitted micro bikini pictures
  • gorgeous pussy pics
  • annie wersching ass gallery
  • amateur black powered by phpbb
  • hard core fuck vids xxx
  • hot teen shaved pussy
  • scary movie sex scene
  • lesbian fuck search
  • black ass free
  • girl bathing video hien cam