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. […]


 




  • video
  • free sex videos online preview
  • free online girl fucking guy movies
  • halloween costume hardcore porn
  • video
  • free handjob movies online
  • video
  • online big dick in ass videos
  • free online adult porn movies
  • anal free online porn first time
  • free online video sexy hardcore teens
  • video
  • meet for free online sexy girls
  • black girl online forums
  • porn pics of katie price
  • young buy old mature
  • free online hardcore pussy licking videos
  • video
  • free online tits videos
  • fabulous pussy mgp
  • video streaming katie price jordan porn
  • girls black and white sale oxfords
  • rhinestone chokers bitch sexy wholesale
  • porn online milfs and girls
  • free online hardcore sex illustrated stories
  • video online amateur
  • video
  • free online young sex vidoes
  • Sex and the city full movie online
  • online gystyle sex videos
  • faq pussy pumpimg
  • massage anal online video
  • buy adventures of black beauty dvd
  • Hindi sex movies online
  • free asian movies online
  • sleepimg beauty porn
  • free online school teen sex videos
  • video
  • young buys naked
  • katie price pussy papparazi
  • sexy panties sale for young women
  • video
  • ebony magazine dreamgirls photo
  • online reality porn videos
  • best online free ebony porn
  • plus size sexy farm girl costume
  • online hot teen movies
  • sexy pharaoh girl costume
  • asian mgps free xxx
  • free online full length porn movie
  • coldwater creek petite sale
  • mature porno video online
  • cheap nude teen video
  • latina pussy border bangers
  • sexy blonde licking pussy online
  • free online videos of girls stripping
  • highest quality online porn tubes videos
  • black and white asian border prints
  • sales girl shows tits
  • bbw online porn videos
  • free online young little videos
  • monster ass babes online video
  • free intimate online sex videos
  • cheap petite pants
  • asian porn online free
  • sex online videos
  • video
  • discount designer petite clothes
  • streaming online erotic movies
  • lesbian online sex videos
  • video
  • video
  • large object in pussy free online
  • black girl online forum
  • asian teens for sale
  • free online blacks hardcore fucking videos
  • video
  • mad hatter costumes for teen girls
  • fuck buy sussex
  • white pussy for sale california
  • playboy porn video free online
  • video
  • video
  • the other boleyn girl movie online
  • plug buying guide butt anal
  • video
  • online sex video women
  • blonde youmg teencum
  • free online nude teen sex videos
  • long sex movies free online
  • online videos of sex
  • video
  • video
  • island caprice studio asian videos
  • porn video online
  • amateur online video
  • video
  • video
  • online mature nude videos
  • video
  • girls halloween costume sexy
  • anime ass fuck videos online
  • video
  • video
  • watch free ebony movies online
  • ebony squirting videos online
  • pussy pump for sale
  • halloween costumes fuck party
  • x vids costume sex
  • video
  • youmg teen girls vidoes
  • video
  • free online camle toe sex videos
  • handjob free movie online
  • Megyn price nude photos
  • video
  • video
  • anime porn vids online
  • free online panful crying porn movies
  • anal teens free online
  • video
  • video
  • black girlonline forum
  • costume ideas for teen girls
  • online hollywood erotic movies free
  • Kate beckinsale sex scene video
  • video
  • pearl trim dreamgirl sex adult
  • video
  • video
  • video
  • video
  • young girls lookimg for older men
  • Teens videos online
  • facial abuse free online videos
  • halloween costumes go go young girl
  • rhinestone chokers bitch sexy wholesale
  • online blowjob vids
  • video
  • sex free online video sharing
  • video
  • video
  • big boobs fucking online videos
  • free porn videos online no download
  • suck my dick online
  • video
  • asian models in sexy costumes
  • free online hindi sex movies full
  • online teen girls
  • lindsay price naked pics
  • video
  • free soft core porn movies online
  • shemale anime online free video
  • video
  • mature solo online videos
  • free porn for girls online
  • video
  • sexy xxx teens online
  • costume porn video
  • video
  • free online cheating wife swallows video
  • free sex pics victorian costume
  • free online ametar porn video
  • kate beckinsale underworld evolution naked videos
  • buy hardcore porn dvd films
  • shemale video online
  • hot free lesbian porn online
  • Lesbians online videos
  • teen hardcore porn online for free
  • black online video sex sharing
  • online mind control erotic sex story
  • video
  • video
  • dicks sporting goods black friday sales
  • asian ass young mgp
  • watch free sex videos online
  • free online harcdcore sex black girls
  • hardcore sex free online
  • video
  • video
  • video
  • imgsrc young pussy
  • free online ebony porn videos
  • buy asian girl
  • free boobs videos and movies online
  • japanese girl singing new order
  • valley girl movie online
  • free online sexy blonde girl porn
  • katie price hardcore sex
  • best shemale movies to buy
  • online hardcore porn videos
  • free asian movies online
  • porn backstabbing bitch online videos
  • streaming onlinefree porn video egories
  • video
  • video
  • video
  • pictures of german ethnic costumes
  • watch free sex videos online
  • watch online free porn videos
  • transexual shemale online viewing download
  • costa rican girls with big tits
  • watch blowjob cumshot videos online
  • free online adult softcore romantic movies
  • teens webcam online post
  • cheap petite black separates
  • hot sexy black girls in costumes
  • video
  • free wild online homemade sex movies
  • free porn video streaming online
  • video
  • erotic videos buy shop
  • free online porn videos of teens
  • video
  • good porn video online
  • video
  • new katie price naked pics
  • wifes fuck buy
  • black metal movies online
  • video
  • black girl porn for free online
  • video
  • video
  • video
  • video
  • free online photos mature sexy ladies
  • video
  • dvds to buy shemale fuck videos
  • teens sexy angel costumes
  • video
  • video
  • Sex videos to watch online
  • video
  • petite cowardly lion costume cheap teen
  • video
  • video
  • buying a sex toy for couples
  • free online japanese porn tube
  • Cum shot online
  • porn online free full videos i
  • costumed sex pictures
  • video
  • Sex online video
  • Dress up sexy girls online
  • free online doctor checkup sex videos
  • girl orderd to suck porn
  • pictures of naked costa rica women
  • xxx puss babes img
  • black free videos online
  • ethnic costumes pictures
  • petite jean meats online
  • video
  • asian school girl costume
  • porn cartoon videos online
  • buy victor mature movies
  • best buy movie sex scenes
  • all pussy free movies online
  • Sex movies to watch online
  • pussy cock sex video free online
  • Big boobs online videos
  • cheap sex webcam shows
  • video
  • video
  • mature online sex stories
  • online anal sex pics
  • free online live sex videos
  • school girl twins teen halloween costume
  • costa rica girls sex
  • free online way webcam sex
  • porn videos free online watching
  • buzz bake sale young teens
  • video
  • online shemale asian videos
  • wives online free porn videos
  • sexy costumes for teens halloween
  • kate beckinsale underworld evolution naked videos
  • glamour girls cheap dresses
  • freeonline sex videos
  • blonde youmg teencum
  • video
  • free amateur sex online
  • video
  • black lesbians online videos sex
  • freeonline porn movies
  • video
  • sex with cheap makeup girls
  • online video girls fucking guys
  • free online erotic stories and videos
  • free gang bang porn online
  • full length handjob movies online
  • video
  • free full legnth softcore movies online
  • sexy babes in costumes
  • video
  • free online forced sex porn movies
  • video
  • oral sex for sale
  • video
  • naked online girls with big boobs
  • free swimming costume porn pictures
  • video
  • sex costume party pics
  • free online videos ass fucking
  • hardcore porn online free
  • video
  • video
  • video
  • asian girls in costa rica
  • asian sora aoi movies watch online
  • watch online movie porn
  • indian sex movies online free
  • video
  • video
  • free online adult xxx porn vidoes
  • see free xxx sex online free
  • video
  • free online black teen porn videos
  • girls discount party dresses
  • black man eatimg pussy
  • sexy school girl costume canada
  • online cartoon sex videos
  • video
  • giant ass dildo video free online
  • online video girls eating pussy
  • Live sex movies online
  • video
  • video
  • teen girl fuck buys
  • Sex and lucia movie online
  • video
  • free online young girls videos
  • virtual reality movie for sale
  • share and watch porn movies online
  • video
  • free online interracial sex videos
  • watch free online japanese cartoon porn
  • simpson free online sex videos
  • porn priceless ex girlfriend
  • video
  • girls doning gilrs porn online
  • babes in naughty costumes pictures
  • free full porn videos online
  • asian girls costa rica
  • video
  • buy dalia collection petite pants
  • video
  • rosa acosta porn video
  • hardcore online webcam sex
  • buy big black dicks movie
  • video
  • online shemale asin videos
  • blowjob sex stories online
  • video
  • free online celebrety sex vids
  • erotic hardcore movies watch online free
  • video
  • video
  • buy porn movies in bangkok
  • video
  • fat girl porn for free online
  • video
  • video
  • free online big dick porn
  • buy sexy black dress
  • free online sex movies gang bang
  • erotic boundaries full length movie online
  • online erotic movies free for women
  • watch pirates movie porn online
  • video
  • nude costa rican girls pictures
  • buying pussy in charlotte nc
  • video
  • video
  • girls party dress discount
  • girls costume long black gloves
  • pregnant couples sexual position online photos
  • watch full length erotic movies online
  • Kate beckinsale naked pics
  • video
  • webcam girls online forum
  • buy cartoon porn videos
  • free online xxx lesbian sex
  • free online sex stories with pictures
  • teen porn videos online
  • video
  • free video online sex
  • best ebony online movies xxx
  • boobs to boobs video ckip online
  • facial abuse free online videos
  • lesbian sex free videos online
  • free wet pussy sex pics online
  • sexy wife fuck costume
  • big butt movies online
  • watch free blowjob videos online
  • video
  • video
  • bikini airways movie online
  • naughty teen girls in costumes
  • couples seduce teens in costumes
  • free blowjob movies online