home australia usa uk china
bodytop
 

Archive for March, 2007

Web 2.0 App – Discover AJAX and Use It Today!!

Here’s a GREAT ARTICLE published in a back issue of DevWebPro that I found explaining the usefulness of Web 2.0 Application called “AJAX” and how to actually install it.

The ability to reduce the need to click is a quantum leap forward on web sites that helps your site stay packed full of the information you want to share, without your site visitor having to scroll for eternity or click through hundreds of times to get what they want!!  It’s a site visitor time saver.

———————————————————————————-

Creating Web2.0 Apps W/ AJAX & Clientside HTTP Requests

genericM2 Web 2.0 App   Discover AJAX and Use It Today!!By Lucas Green

Web2.0 is a term coined to refer to web applications that run without visible page refreshes. A normal website functions by delivering pages of information, with links that allow a user to move from page to page.

A web 2.0 application, or AJAX application, runs on a single web page, and uses clientside javascript to initiate and process additional requests to the server. The additional requests run in the background and are invisible to the user; the end result is that the web application appears very similar to a normal computer program, and the user can continue to manipulate the application and application interface without having to wait for the additional requests sent to the server to complete.

AJAX is an acronym that stands for Asynchronous Javascript and XML. The interesting thing about AJAX is that the XML component is actually unnecessary, or rather optional. The important component is asynchronous javascript — this is the meat of how web2.0 applications work and the XML component is just one possible format for sending and receiving the additional data requests to the server. However, since this processing happens in the background and is invisible to the end user, you can actually build a web2.0 application using any format for the data requests that you wish.

The key to implementing an AJAX web2.0 application is in the XMLHTTP Object. The XMLHTTP objects exists in many forms, both server-side and client-side, and the purpose of it is to allow retrieval and processing of external web pages from within the coding application. Since we are trying to build a client-side web2.0 application, and since Javascript is the most widely available scripting application for web browsers, AJAX is the ideal implementation, and a good cross-browser Javascript code for instantiating the XMLHTTP Object is as follows:

au16 Web 2.0 App   Discover AJAX and Use It Today!!

When creating a web2.0 application, the idea is that whenever you would normally send data to the server and receive a response in return by submitting a form, or using a link to an external page, instead you implement it by using the XMLHTTP object to send the request or form in the background, and process the resulting data without causing the browser to reload. The XMLHTTP Object allows you to send requests synchronously or asynchronously, but since we are creating an AJAX application you will use asynchronous mode in almost all cases. When submitting form data, you can use either the GET or POST method, but in this article I will show you how to use POST with the XMLHTTP Object as that allows you the widest possible uses.

Once you instantiate the XMLHTTP object, there are four simple commands to creating a web2.0 application. The “onreadystatechange” property is used for asynchronous mode to define a function that is executed whenever the state of the request changes (such as when it completes). The “open” method creates the request and the “send” method send the request. Also, the “setRequestHeader” method is used to specify the format of the data that is being submitted. Here is some example code that shows how a basic AJAX application would work:

au16b Web 2.0 App   Discover AJAX and Use It Today!!

In this example, “/ajax.asp” is the page that is being retrieved, and “ajaxProcess()” is the function that is executed once the page is retrieved. The variables “p1″ and “p2″ are sent to the page as form data. You can of course send whatever data you wish according to what you need to do; just make sure that the ajax.asp file processes them correctly and returns the results. Define the ajaxProcess() function so that it processes the returned results, and updates the user interface to indicate that the request has been completed and updates the appropriate variables and/or the user with the new data. If you would like to see an AJAX web2.0 application in action, you can check out the web2.0 RPG I created, Apocalypse, found at www.apocrpg.com .

Using these methods, you can in fact send whatever data you want to the server and process the results, just as if you had used a normal HTTP request. The difference is that when done normally, the end user has to wait for each page to be loaded, which can be unacceptable if the user is on dialup and there are a large number of actions to be performed independently (multiple page reloads). By using AJAX in a web2.0 application, you can execute these actions in the background, and the user never notices the delays as he is able to continue manipulating your user interface while the page requests are processing in the background, invisible.

This type of web application wasn’t possible in the past, for two reasons. Primarily, the XMLHTTP object wasn’t available until recently, and also Javascript was not widely supported by almost all browsers as it is today. Now that background page requests are possible, it is likely that in the future all web applications will be converted or migrated to web2.0 / clientside AJAX applications. There are also innumerable web applications that simply weren’t possible or feasible under the old model, that we will undoubtedly be see appearing in the next few years, that could potentially be very successful. Your website could be one of these, so get started!

About the Author:
This article was written by Lucas Green, a professional private web developer who lives off his internet income. To visit his website and learn more about how he is creating multiple streams of passive income using the internet, please visit www.lucasgreen.com !

As soon as we understood the power of using AJAX on our web sites (including www.JennieArmato.com), I got our webmasters on to using AJAX on all our sites wherever possible.

Enjoy and improve your web business today!

Jen

Rate This Post

1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 5.00 out of 5)
Loading ... Loading ...

Leave Your Comment



A Business to Live For! … ARE YOU KIDDING ME???

Yep!  It IS true, a business to live for

 * A business that breaks away from conventional, traditional ideas & binds of ownership. 

* A business that cuts throw the glass ceiling for women in the workforce too. 

In fact, the days of women sacrificing personal life for professional pursuits and vice versa are over. 

And the days of men having to leave the family home to generate income are over too.

Every Woman(and Man)CAN Have Everything You've Ever Wanted ... thanks to the power of the internet

I’m going to prove it’s possible … I’m putting MY MONEY and MY TIME on the line to show you how!

I’m willing to fly to a capital city near you, rent a meeting room, share my blueprint for web business success (The 6 BIG SECRETS to Web Success) … and I’m doing it all for FREE! 

What’s the catch? 

Well you tell me – what is your catch right now? 

x  What vice or force is controlling and dictating the terms of your income earning?

x  What is trapping you from living the life you desire … and deserve? 

x  What strangle-hold does your debt have on your lifestyle? 

x  How many ‘hopeful’ ideas have you tried on the net?

THE TIME IS NOW FOR YOU START A BUSINESS THAT WORKS!!

- Do you want to develop income with minimal risk and uncapped upside?

- Do you wish for a clear plan & pathway to achieve your goals, before Dec 2007?

- Do you like the idea of being able to work around your other life commitments?

- Do you  dream about the day your debts are all paid?

- Do you believe you really CAN have it all … you just need the right vehicle?

You simply must grab this rare opportunity to see Jennie present her blueprint mini-workshop “The 6 BIG SECRETS TO WEB SUCCESS” – delivered over 3 full hours of intense, insightful and enjoyable information, ideas and opportunities that are available to you right now!  Register while there’s still seats available.

—————————————————————————

Discover how one woman in massive debt and no work prospects turned one daggy product into a world-wide business of 10,000+ products – and she did it all in a bathrobe -  from her home and hotels where she holidays … all around the world!

If you love the idea of Business Owner Happiness, – A BUSINESS TO LIVE FOR, you’ll love learning the 6 BIG SECRETS TO WEB SUCCESS with Jen.  No promises on seats as meeting room seating is limited - so, book your seat right now

THESE LIVE, FREE EVENTS WILL ‘SELL OUT’.

Rate This Post

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
Loading ... Loading ...

Leave Your Comment






You are invited to ‘meet’ Jen and follow her work online. (Choose your favorite Social Media sites):


Facebook icon       Twitter icon       You Tube icon      RSS Feed icon        Google icon        Flickr icon        Digg icon        Delicious icon        LinkedIn icon      Kiva icon        iTunes icon        FriendFeed icon

 
bodybot
 
bothomebotbreakbotjenbotbreakboteventsbotbreakbotclipsbotbreakbotwebsitesbotbreakbottestbotbreakblogbotbreakcontact jen
Site Map