<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>http://www.h3rald.com/</id>
  <title>H3RALD - Tag 'ajax' (Atom Feed)</title>
  <updated>2006-09-18T03:51:00Z</updated>
  <link href="http://www.h3rald.com" rel="alternate"/>
  <link href="http://www.h3rald.com/tags/ajax/atom/" rel="self"/>
  <author>
    <name>Fabio Cevasco</name>
    <uri>http://www.h3rald.com</uri>
  </author>
  <entry>
    <id>tag:www.h3rald.com,2006-09-18:/articles/39/</id>
    <title>Why I like Netvibes</title>
    <published>2006-09-18T03:51:00Z</published>
    <updated>2009-09-06T18:10:55Z</updated>
    <link href="http://www.h3rald.com/articles/39/" rel="alternate"/>
    <category term="web20" scheme="http://www.h3rald.com/tags/web20/"/>
    <category term="ajax" scheme="http://www.h3rald.com/tags/ajax/"/>
    <category term="review" scheme="http://www.h3rald.com/tags/review/"/>
    <content type="html">
<![CDATA[
<p>The so-called &#8220;<span class="caps">AJAX</span> Start Pages&#8221; are not a new concept anymore, and like for almost any other offspring of Web 2.0 there is more than one to chose from. Hence the increasing number of comparative reviews on the Web nowadays (Yes, I&#8217;m guilty of that too). I soon learnt that for any &#8220;good and useful thing&#8221; on the web there are at least <em>n</em> clones: consider for example social bookmarking, community-powered news sites,  php frameworks&#8230;<br />
And no, you can&#8217;t use the word clone because it has a strong negative connotation nowadays so let&#8217;s just say that whenever someone comes up with a new idea, others examine it, process it and in a few weeks (days?) some <em>very, very similar application</em> comes out, and it&#8217;s <em>better</em> than the previous one. <br />
Now, I don&#8217;t know exactly whether <a href="http://www.netvibes.com/">NetVibes</a> was one of the first <span class="caps">AJAX</span> Start Pages created or not, but at any rate &#8211; in my very, very, very humble opinion, is the most advanced and the most usable of <a href="http://www.techcrunch.com/2005/12/07/ajax-desktops-wont-stop/">the lot</a>, and an essential tool for lazy folks like me who want to keep up-to-date with what&#8217;s going on without having to visit dozen of websites everyday.</p>
<p style="float:left;"><img src="http://base--/img/pictures/netvibes.jpg" alt="" /></p>
<p>I can see people jumping up and down shouting &#8220;Pageflakes is better&#8221;, &#8220;Protopage kicks a$$&#8221; etc. etc. Well, yes, probably, as you like: different people like different things, and when it comes to <span class="caps">AJAX</span> Start Pages there&#8217;s really a lot to choose from: 3spots has an excellent  (and complete, I believe) <a href="http://3spots.blogspot.com/2006/03/ajax-or-flash-startpages-or-homepages.html">list</a> of all the start pages currently available on the Net, so yes, you can try them out yourself and make out your mind :)</p>
<p>I made up my mind long ago after experimenting a few of those. Why Netvibes? OK, let&#8217;s see:</p>
<ol>
	<li><strong>Fast to load</strong>: Netvibes is fast. Relatively fast, of course, for sure is not as fast as a plain, old-style html page, but I think it&#8217;s perhaps one of the fastest <span class="caps">AJAX</span> start pages ever created. As they <a href="http://blog.netvibes.com/?2006/08/17/75-the-future-of-netvibes">pointed out</a>, with a 15 million investment performance can only get better&#8230;</li>
	<li><strong>Tabbed pages</strong>: After tabbed browsing, tabs within a single page seem to gain popularity. Netvibes allows you to create more than one page to prevent cluttering and general chaos: you can create a tab for CakePHP feeds, one for some cute <span class="caps">AJAX</span> widgets you&#8217;ll never use, another for al that Web 2.0 rubbish you&#8217;ll never read &#8212; that&#8217;s what I do at least.</li>
	<li><strong>Smart Google Module</strong>: Finally Netvibes has a <em>proper</em> Google search module, which enable users to search with Google and view results <em>on Netvibes</em> instead of opening up a browser tab.</li>
	<li><strong><span class="caps">RSS</span> done right</strong>: Their <span class="caps">RSS</span> reader is nice: by clicking on a feed title it opens up a <em>virtual window</em> inside the page with the whole story and a menu with links to the other stories included in the feed. This is the most convenient way to read whole articles like TechCrunch&#8217;s ones without leaving the page (and without loading the heavy TechCrunch UI).</li>
	<li><strong>Public <span class="caps">API</span> for modules</strong>: For those who &#8211; unlike me &#8211; has some proper free time and would like to develop their own module, the <a href="http://eco.netvibes.com/developers/">Netvibes Mini Module <span class="caps">API</span></a> is public&#8230;</li>
	<li><strong>Ecosystem</strong> : Netvibes <a href="http://eco.netvibes.com/">Ecosystem</a> includes hundreds of modules and podcasts and thousands of feeds and tabs which can be integrated into any Netvibes page with a single click. Some of my favourites: <a href="http://eco.netvibes.com/modules/3492/xe.com-currency-converter">XE</a> Currency Converter, <a href="http://eco.netvibes.com/modules/3709/quick-translator">Quick Translator</a>, <a href="http://eco.netvibes.com/modules/6776/google-map">Google Map</a> <a href="http://eco.netvibes.com/modules/91/daily-cartoons">Daily Cartoons</a> and <a href="http://eco.netvibes.com/modules/6/bitty-browser">Bitty Browser</a>. <br />
CakePHP feeds? <a href="http://eco.netvibes.com/?type=all&amp;q=cakephp">Loads</a>!</li>
</ol>
<p>Enough?</p>]]>
    </content>
  </entry>
  <entry>
    <id>tag:www.h3rald.com,2006-08-28:/articles/google-apps-for-your-domain/</id>
    <title>Google Apps for your domain: a shared hosting killer service?</title>
    <published>2006-08-28T03:51:00Z</published>
    <updated>2009-09-06T18:10:54Z</updated>
    <link href="http://www.h3rald.com/articles/google-apps-for-your-domain/" rel="alternate"/>
    <category term="google" scheme="http://www.h3rald.com/tags/google/"/>
    <category term="internet" scheme="http://www.h3rald.com/tags/internet/"/>
    <category term="ajax" scheme="http://www.h3rald.com/tags/ajax/"/>
    <category term="web20" scheme="http://www.h3rald.com/tags/web20/"/>
    <category term="review" scheme="http://www.h3rald.com/tags/review/"/>
    <content type="html">
<![CDATA[
<p>A while ago Google started offering services like <a href="http://mail.google.com/mail/">Google Mail</a> (Gmail) and <a href="http://www.google.com/calendar/">Google Calendar</a> to domain owners. Sure everyone likes Gmail, but one of the few bad things about it is that it never feels &#8220;unique&#8221;: your email address is always gonna be <something><code>gmail.com or &lt;something&gt;</code>googlemail.com. Not a big deal? Well, sure, not really, but it really depends on the people using the service and how fussy they are:</p>
<ul>
	<li>small/medium business wouldn&#8217;t like this: @gmail.com gives farless credibility than @domain.com</li>
	<li>When using Gmail with the Send As feature, messages will be sent &#8220;on behalf of&#8221;, and this can potentially mess things up as some spam filters don&#8217;t like it.</li>
</ul>
<p>Now it seems to be <a href="http://seattlepi.nwsource.com/business/1700AP_Google_Business_Applications.html">official</a>: Google is starting to offer customizable services to anyone who wish to sign up for it, not only as a restricted beta service.<br />
What does this mean? Well, it can be the (free and easy) definitive web solution for small business, kids, grandmas and everyone who wants to establish a presence on the web by paying only the annual domain renewal fees&#8230;</p>
<h3>Included applications</h3>
<p>Note the title: <a href="https://www.google.com/a/">Google Apps</a> for your domain, not only Gmail. Here&#8217;s what you get:</p>
<ul>
	<li><a href="http://mail.google.com/">Gmail</a> &#8211; You know what it offers: a state-of-the art <span class="caps">AJAX</span> interface, speed, reliability, very effective spam filter, loads of space, tagging (labels) stars and all the rest.</li>
	<li><a href="http://www.google.com/calendar/">Google Calendar</a> &#8211; One of the best online calendar available. Features and <span class="caps">AJAX</span> interface, full integration with Gmail, ability to create private and public calendars, reminders,</li>
	<li><em>Google Chat</em> &#8211; Google&#8217;s instant messenger, available through <a href="http://www.google.com/talk/">Google Talk</a> desktop application or online, seamlessly integrated in your Gmail interface.</li>
	<li><a href="http://pages.google.com/">Google Web Pages</a> &#8211; aka Google&#8217;s page creator, easily create webpages using Google&#8217;s <span class="caps">WYSIWYG</span> online editor.</li>
</ul>
<p>Now, try imagining these four services combined and (almost) fully customizable&#8230; Still no idea? Well, keep reading for a list of all the included features.</p>
<h3>Included Features</h3>
<p>In order to use Google Apps for your domain, you must of course own a domain. The next step involves changing your domain&#8217;s MX entry to &#8220;<span class="caps">ASPMX</span>.L.<span class="caps">GOOGLE</span>.<span class="caps">COM</span>&#8221;, and follow the instructions to create an administration account for your Google applications, and after a while every email sent to your domain&#8217;s accounts will be routed to your new Google-powered inbox. Similarly, in order to use Google Page Creator on your domain, you&#8217;re required to change the <span class="caps">CNAME</span> record of your <span class="caps">DNS</span> to &#8220;ghs.google.com&#8221;.</p>
<blockquote>
<p>Note: in order to avoid inconveniences especially if a lot of users use your domain&#8217;s email, it is recommended that you pay attention on Google&#8217;s instructions on how to set the whole thing up. For further information refer to the official <a href="https://www.google.com/a/FAQ"><span class="caps">FAQ</span></a>. In order to be able to use Google Page Creator on your domain, you must setup an <span class="caps">URL</span> to publish your webpages: of course do <span class="caps">NOT</span> set this to &#8220;www.yourdomain.com&#8221; or any subdomain currently in use or your visitors will access the pages you created with Google Page Creator.</p>
</blockquote>
<p>Here&#8217;s what you get:<br />
<img src="/img/pictures/gmail-hosted/gmail.png" alt="" /> <br />
For a bigger image click <a href="/img/pictures/gmail-hosted/gmail_full.png">here</a>. Let&#8217;s now have a look at what are the main differences from the standard Gmail.</p>
<p><u><em><strong>Include your own logo</strong></em></u><br />
<img src="/img/pictures/gmail-hosted/logo.png" alt="" /></p>
<p>Your own logo will be displayed on the upper left corner of every page. And this is truly sweet. All you have to do to change it is uploading a 143&#215;59 <span class="caps">PNG</span> or <span class="caps">GIF</span> image from your domain management panel (see below).</p>
<p><u><em><strong>Use your company name instead of Google&#8217;s</strong></em></u><br />
<img src="/img/pictures/gmail-hosted/links.png" alt="" /></p>
<p>Besides a custom logo, it is possible to set a company name to be used instead of &#8220;Google&#8221; or &#8220;Gmail&#8221; in page titles and links. I chose &#8220;H3RALD.com Mail&#8221; and that&#8217;s displayed everywhere, including on the sign-in page.</p>
<p><u><em><strong>Control Panel</strong></em></u><br />
All the custom settings can easily be managed through an easy-to use control panel:</p>
<p><img src="/img/pictures/gmail-hosted/options_panel.png" alt="" /></p>
<p>It&#8217;s really easy to use and has wizards to setup all the included services and options like setting up user accounts, settings etc.</p>
<p><img src="/img/pictures/gmail-hosted/domain.png" alt="" /></p>
<p><u><em><strong>User Accounts</strong></em></u><br />
Through the control panel you can add new users and modifying existing user accounts to access your services. You can create administrators who are able to access administrative domain-wide settings, and standard users. Every user gets 2048MB of space for their emails, and that&#8217;s pretty generous considering that it seems that you&#8217;re able to create around 25 user accounts.</p>
<p>Already have a list of users you&#8217;re like to import? Just save them in <span class="caps">CSV</span> format and upload them.</p>
<p>Would you like to be able to contact all your users at once, e.g. via a newsletter? Google thought about this as well, and you can create your own personal newsletters which can be sent out automatically to your @yourdomain.com email accounts.</p>
<p><u><em><strong>Internal Messaging System</strong></em></u><br />
But there&#8217;s more. We all know Google Talk: yes it&#8217;s nice, but probably <span class="caps">MSN</span> has more features, smileys and all the rest but it still remains a perfectly usable instant manager, which also allows file transfer. Your users can use Google Talk to communicate with each other <em>or</em> simply chat through their webmail interface, More features? Well, for example <a href="https://www.google.com/support/hosted/bin/answer.py?answer=34143">you can setup Google Talk to work on federated networks</a>.</p>
<p><u><em><strong>Appointments/Projects management</strong></em></u><br />
Google Calendar is an excellent online calendar, and now you can use it within your own domain as well. This means, for example, that it can be used to set your company&#8217;s appointments, reminder, project deadlines by creating an unlimited number of custom calendars to share with your collaborators.</p>
<p><u><em><strong>Design your own site</strong></em></u><br />
I know a lot of restaurants, shops and people who would like to have a small site for their business or activity, but they can&#8217;t develop web application themselves. So the most obvious solution is to hire some professional web developer to rip them off&#8230; erhm, to create a website for them. Now it is not necessary: by setting the correct <span class="caps">DNS</span> parameters, you can allow users to create their own webpages using a foolproof and advanced web editor powered by Google: <a href="http://pages.google.com/">Google Page Creator</a>. <br />
I didn&#8217;t set it up on my own domain, but a preview of what you can do with Google Page Creator is available <a href="http://h3rald.googlepages.com/home">here</a>.</p>
<h3>Scenario</h3>
<p>After considering all this, I came to the conclusion that what Google did can help a lot of people and at the same time prevent some evil webmaster to charge them hundreds of Euro (they really get away with it!) for basic &#8220;websites&#8221; with &#8220;three or more static pages&#8221;.<br />
All you have to do is buy your own domain, and that can be as cheap as 8$ per year, the rest comes for free, from Google:</p>
<ul>
	<li>The best webmail interface you can possibly imagine</li>
	<li>Nearly unlimited space for everything</li>
	<li>A truly effective spam filter</li>
	<li>About 25 fully-featured user account, possibly more if you ask nicely</li>
	<li>Your own &#8220;corporate instant messenger&#8221;</li>
	<li>Your own calendar to manage appointments, meetings etc.</li>
	<li>An intuitive and advanced web page creator &#8211; not like Geocities</li>
</ul>
<p>All this for free. Yes, with ads (I&#8217;m not here to discuss <a href="http://www.gmail-is-too-creepy.com/">privacy concerns</a>), but after all they&#8217;re not displayed on your main site.</p>
<p><em>What about Server Side technologies for my sites?</em></p>
<p>OK kid, now that would be a little bit too much, even if I can foresee some possible &#8220;Google Web Widgets&#8221; at some point. &#8220;Create your <em>interactive and dinamic</em> website within minutes, no programming knowledge required&#8221;&#8230; that would be great (for Google) and bad (for freelance web developers). One thing at a time, after all G(od|oogle) has the whole eternity to fulfill his Goals.</p>]]>
    </content>
  </entry>
  <entry>
    <id>tag:www.h3rald.com,2006-01-12:/articles/what-is-ajax/</id>
    <title>What is AJAX?</title>
    <published>2006-01-12T06:30:08Z</published>
    <updated>2009-09-06T18:10:53Z</updated>
    <link href="http://www.h3rald.com/articles/what-is-ajax/" rel="alternate"/>
    <category term="internet" scheme="http://www.h3rald.com/tags/internet/"/>
    <category term="web20" scheme="http://www.h3rald.com/tags/web20/"/>
    <category term="ajax" scheme="http://www.h3rald.com/tags/ajax/"/>
    <category term="webdevelopment" scheme="http://www.h3rald.com/tags/webdevelopment/"/>
    <content type="html">
<![CDATA[
<em>"The Web is changing. The 30-year-old terminal-like technology it was originally is gradually giving way to new ways of doing things. The power of AJAX allows for rich user interaction without the trouble that has bugged traditional web applications."</em>This is the introduction to the script.aculo.us[1] website, and regardless your opinion about the so-called AJAX <em>programming technique</em>, they are fundamentally right: the web is changing.  AJAX is at least one way to do things in a different way, enhancing - although arguably, in some cases -  users' browsing experience.<br />
<br />
<strong>Application examples</strong><br />
What is AJAX then? Nothing too new, but not too old either. I'd define AJAX as the <em>rebirth of Javascript</em>, for example, it's not only Javascript we're talking about. The acronym stands for Asynchronous Javascript And XML and it already gives an idea of the fundamentals of the technology: something build on <em>asynchronous server requests and responses </em>. This may be clear to coders, but the best way to try explaining this to everyday internet users is showing some famous applications:<br />
<br />
<em>Gmail[2]</em>: The first example? The most famous? The most used? Perhaps. Google aimed to impress both end users and geeks with it's free, long awaited email service. What's so unusual in this webmail application?<br />
<ul><br />
<li>An innovative and intuitive interface, more similar to a desktop application than a traditional webpage.<br />
</li><li>Rich formatting through an effective, easy-to-use editor.<br />
</li><li>Online spell checker.<br />
</li><li>Instant </li>(one click) email tagging, labels, contact groups etc.<br />
<li>Email auto save.<br />
</li></ul><br />
<br />
<em>Kiko[3]</em>: This is a very neat online calendar, free to use and customizable. Features include:<br />
<ul><br />
<li>Multiple user/contacts/events administration.<br />
</li><li>Personalization of the right click menu </li>(it overrides your browser's default behavior).<br />
<li>Drag and drop events across the calendar.<br />
</li><li>Easily switch through different calendar views without any page refresh.<br />
-	</li></ul><br />
<br />
<em>Writely[4]</em>: An online word processor. Although it is not as advanced as its desktop's cousins, this is a truly admirable effort to port a desktop application to the web. The service is free for now and it allows users to create, edit, share and export text documents. Among its features there are:<br />
<ul><br />
<li>High degree of document formatting - modify font size, style, colors, alignment, insert images and links etc.<br />
</li><li>Enhanced exporting options - it can create html documents, Word documents, zip files etc.<br />
</li><li>Online spell-checker.<br />
</li><li>Ability to easily share and publish your work.<br />
</li></ul><br />
<br />
This list can continue[5], as new "AJAX-powered" applications are created nearly every day. <br />
<fieldset><blockquote>AJAX provides the web developer the ability to create web applications that look and feel like applications that run on the desktop. It does this by solving the 'partial update' problem. AJAX makes it possible for a web application to request data from the server (usually in response to a button click or other java script 'event') and change a part of the current page to reflect the result of the query. Prior to AJAX, if the web developer wanted to retrieve any information from the server a full page update was required. This may mean a full page load when the user clicks a help icon, spell checks a document or performs a drag and drop operation that changes data on the server. AJAX solves this problem and opens the door for a host of AJAX-powered web applications<br />
There were some unconventional solutions to this problem prior to AJAX. I have ignored them for the purpose of this article as they were hacky or relied on a feature in a particular browser </blockquote></fieldset><br />
<br />
<strong>How does it work?</strong><br />
Ajax[7] is fundamentally the union of various technologies - not something new by itself:<br />
<ul><br />
<li> </li>(X)HTML, CSS, etc., used as presentation layer and format the information retrieved by the server: nothing special here.<br />
<li>The XMLHttpRequest</li>[8] object, which allows data exchange between client and server "silently", in an asynchronous way, without the need of refreshing and reloading a whole web page<br />
<li>The Dom Object Model </li>(DOM)[9], a Object-Oriented way to represent and access HTML or XML.<br />
<li>XML and XSLT used for data interchange and manipulation<br />
</li></ul><br />
<br />
The magic is undoubtedly in the XMLHttpRequest object, originally invented by Microsoft as an ActiveX object and then made available as a standard Javascript class by Mozilla-based browsers. At least something which <em>seems</em> to be compatible with <em>most</em> browsers then.<br />
<br />
A necessary step in any Javascript script using the XMLHttpRequest object would be something like:<br />
<br />
<code><br />
if (window.XMLHttpRequest) { // Mozilla, Safari, ...<br />
    http_request = new XMLHttpRequest();<br />
} else if (window.ActiveXObject) { // IE<br />
    http_request = new ActiveXObject("Microsoft.XMLHTTP");<br />
}<br />
</code><br />
<br />
In order to have an http_request object to use later on which is independent from the browser type.<br />
<br />
Let's now examine an example of elementary Ajax application[10]. The following code is broken into different parts and commented, the uncommented source and a demo is available on degraeve.com[10].<br />
<br />
For this simple example we need to create a simple server-side script which will be called by our Ajax application. The script can be in any language, this one is in Perl.<br />
<br />
<code><br />
#!/usr/bin/perl -w<br />
use CGI;<br />
<br />
$query = new CGI;<br />
<br />
$secretword = $query-param('w');<br />
$remotehost = $query-remote_host();<br />
<br />
print $query-header;<br />
print "&lt;p&gt;The secret word is &lt;b&gt;$secretword&lt;/b&gt; and your IP is &lt;b&gt;$remotehost&lt;/b&gt;.<br />
 </code><br />
<br />
Basically it creates a new CGI object named $query, used to access the parameter which will be passed by our submission form, "w", and get the user's IP address.<br />
The script will then print a the page header and a phrase containing the word entered in our form and the user's IP address.<br />
<br />
And here's the simple Ajax application:<br />
<br />
<code><br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Simple Ajax Example&lt;/title&gt;<br />
<br />
&lt;script language="Javascript"&gt;<br />
</code><br />
<br />
<em>Comment: Just the first HTML tags of the page, and the beginning of the script</em><br />
<br />
<code><br />
function xmlhttpPost(strURL) {<br />
    var xmlHttpReq = false;<br />
    var self = this;<br />
    // Mozilla/Safari<br />
    if (window.XMLHttpRequest) {<br />
        self.xmlHttpReq = new XMLHttpRequest();<br />
    }<br />
    // IE<br />
    else if (window.ActiveXObject) {<br />
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");<br />
    }<br />
</code><br />
<br />
<em>Comment: First of all we create a function named xmlhttpPost, which takes the parameter strURL, i.e. the web address of the script we created earlier. In the first part of the function, we create the HTMLHttpRequest object independently of the browser, which in this case is called self.xmlHttpReq. </em><br />
<code><br />
 <br />
    self.xmlHttpReq.open('POST', strURL, true);<br />
<br />
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');<br />
</code><br />
<br />
<em>Comment: with the method open we initialize the connection, specifying that we want to send a POST request to the page "strURL" and that the connection is asynchronous (true). The third parameter is actually true by default and could have been omitted in this case. <br />
As we want to use the POST method, we need to set the content-type header for our request, in this case "application/x-www-form-urlencoded". </em><br />
<br />
<code><br />
    self.xmlHttpReq.onreadystatechange = function() {<br />
        if (self.xmlHttpReq.readyState == 4) {<br />
            updatepage(self.xmlHttpReq.responseText);<br />
        }<br />
    }<br />
    self.xmlHttpReq.send(getquerystring());<br />
}<br />
</code><br />
<br />
<br />
<em>Comment: This is the crucial part, as we need to send the request and also define the behavior of our application once the response is received. The request is sent using the "send" method, which sends a properly formatted query string (see below), but before that we need to setup a "listener" to monitor what happens to our request.<br />
The readyState variables is updated according to the status of the connection, and can assume the following values:<br />
<ul><br />
<li>0 - Uninitialised<br />
</li><li>1 - Loading<br />
</li><li>2 - Loaded<br />
</li><li>3 - Interactive<br />
</li><li>4 - Completed<br />
</li></ul><br />
<br />
We want to update our page once we are sure that the connection with the script has been established, therefore we setup a listener (onreadystatechange) to update the page via the function update page defined below only if the connection's state is "Completed" (self.xmlHttpReq.readyState == 4). The  self.xmlHttpReq.responseText variable which is sent to the update page function contains the response generated by our CGI script. </em><br />
<br />
<code><br />
function getquerystring() {<br />
    var form     = document.forms['f1'];<br />
    var word = form.word.value;<br />
    qstr = 'w=' + escape(word);  // NOTE: no '?' before querystring<br />
    return qstr;<br />
}<br />
</code><br />
<br />
<em>Comment: This function simply formats the parameter sent to the script as "w=typedword" where "typedword" is the word typed in the form of our application. </em><br />
<br />
<code><br />
function updatepage(str){<br />
    document.getElementById("result").innerHTML = str;<br />
}<br />
</code><br />
<br />
<em>Comment: Finally, this function inserts the response we got from the CGI script into an HTML element with id=result, through the method innerHTML. </em><br />
<br />
<code><br />
&lt;/script&gt;<br />
&lt;/head&gt;<br />
<br />
&lt;form name="f1"&gt;<br />
  &lt;pword: &lt;input name="word" type="text"  &gt;<br />
  &lt;input value="Go" type="button" &gt;onclick='JavaScript:xmlhttpPost("/cgi-bin/simple-ajax-example.cgi")'&lt;/p&gt;<br />
  &lt;div id="result"&gt;&lt;/div&gt;<br />
&lt;/form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
</code><br />
<br />
<em>Comment: This is the final part of the application, which defines our form containing a text field and a submit button. Note that our xmlhttpPost function is called once the button is clicked, through the on click attribute. </em><br />
<br />
That's it. <br />
The first reaction after reading so far would probably be "Ajax is not easy at all", well, I never said it was. To create a simple application which just prints something on the screen we had to go through a lot of code, and we could have done something similar with much less hassle. This was just a trivial example, very different from those large scale applications available online.<br />
<br />
There's good news though, there are plenty of frameworks and toolkits which makes life easier for developers interested in using this programming technique. There are in particular various libraries built upon the Prototype[11] framework such as the already mentioned Script.aculo.us[1] and Rico[12] for examples, and various frameworks which integrate Ajax in some way in any server side language, like Ruby on Rails[13] or CakePHP[14], for example.<br />
<br />
<strong>Conclusion</strong><br />
Undoubtedly Ajax can be used to create really powerful and innovative applications, but it shouldn't be abused or mis-used. There are a few things to keep in mind, when developing an Ajax application:<br />
<ul><br />
<li>It requires Javascript to be enable on the client browser, and the developer obviously can't control that<br />
</li><li>The application may not compatible with all browsers, in particular older browsers will definitely not be able to access it.<br />
</li><li>It can be too much of a surprise for the user who never used an Ajax application before: it may experience delays in responses, some basic functionalities like the "Back" button might not work as expected etc.<br />
</li></ul><br />
<br />
There are actually many more things to consider [15] before even start planning to develop an application, and can basically be summarized as follows:<br />
<br />
<em>"Do not use Ajax in your web application unless you know what you're doing"</em><br />
<br />
Luckily, there are a lot of articles and resources[16] out there, waiting for you.<br />
<br />
<br />
<strong>Notes and Resources</strong><br />
[small]<br />
[1] Script.aculo.us AJAX toolkit: <a href="http://www.script.aculo.us ">http://www.script.aculo.us </a><br />
[2] Gmail - Google's online webmail: <a href="http://mail.google.com/mail">http://mail.google.com/mail</a><br />
[3] Kiko  - Online calendar: <a href="http://www.kiko.com/">http://www.kiko.com/</a><br />
[4] Writely - Online word processor: <a href="http://www.writely.com/">http://www.writely.com/</a> <br />
[5] A venture forth Blog - Top 10 Ajax applications: <a href="http://www.aventureforth.com/?p=13">http://www.aventureforth.com/?p=13</a><br />
[6] HTTP - Webopedia entry: <a href="http://www.webopedia.com/TERM/H/HTTP.html">http://www.webopedia.com/TERM/H/HTTP.html</a><br />
[7] AJAX - Wikipedia Page: <a href="http://en.wikipedia.org/wiki/AJAX">http://en.wikipedia.org/wiki/AJAX</a><br />
[8] XMLHTTP Wikipedia Page: <a href="http://en.wikipedia.org/wiki/XMLHTTP">http://en.wikipedia.org/wiki/XMLHTTP</a><br />
<br />
[9] Dom Object Model - Wikipedia Page: <a href="http://en.wikipedia.org/wiki/Document_Object_Model">http://en.wikipedia.org/wiki/Document_Object_Model</a><br />
[10] degraeve.com - Simple Ajax Example: <a href="http://www.degraeve.com/reference/simple-ajax-example.php">http://www.degraeve.com/reference/simple-ajax-example.php</a><br />
[11] Prototype Javascript Framework: <a href="http://prototype.conio.net/">http://prototype.conio.net/</a><br />
[12] Rico open-source Javascript library: <a href="http://openrico.org/">http://openrico.org/</a><br />
[13] Ruby on Rails: <a href="http://www.rubyonrails.org">http://www.rubyonrails.org</a><br />
[14] CakePHP framework: <a href="http://www.cakephp.org">http://www.cakephp.org</a><br />
[15] Alex Bosworth's Weblog: Ajax Mistakes: <a href="http://sourcelabs.com/ajb/archives/2005/05/ajax_mistakes.html">http://sourcelabs.com/ajb/archives/2005/05/ajax_mistakes.html</a><br />
[16] AjaxMatters.com: <a href="http://www.ajaxmatters.com/r/welcome">http://www.ajaxmatters.com/r/welcome</a><br />
[/small]]]>
    </content>
  </entry>
</feed>
