Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old May 10th, 2006, 05:09 PM
mikael_b mikael_b is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 66 mikael_b User rank is Corporal (100 - 500 Reputation Level)mikael_b User rank is Corporal (100 - 500 Reputation Level)mikael_b User rank is Corporal (100 - 500 Reputation Level)mikael_b User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 15 h 8 m 32 sec
Reputation Power: 5
Ajax?

Could anyone tell me what ajax is about and show me a good example?

Regards
Mikael

Reply With Quote
  #2  
Old May 10th, 2006, 05:19 PM
crownjewel82's Avatar
crownjewel82 crownjewel82 is offline
rebel with a cause
Dev Shed God (5000 - 5499 posts)
 
Join Date: May 2004
Location: The Batsh!t Crazy State.
Posts: 5,282 crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 11st Grade (Above 100000 Reputation Level)  Folding Points: 29591 Folding Title: Starter FolderFolding Points: 29591 Folding Title: Starter Folder
Time spent in forums: 2 Months 3 Weeks 2 Days 17 h 14 m 34 sec
Reputation Power: 1719
Ajax actually falls under javascript and google is your friend.
Comments on this post
mikael_b agrees: Yes it is
__________________
Making teachers cry like babies since 2006. --nicky

paper/xerox/staples zine distro/press - Support the first ammendment. Support independent publishing.

Stupid Things I've Done

Reply With Quote
  #3  
Old May 10th, 2006, 05:43 PM
mikael_b mikael_b is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 66 mikael_b User rank is Corporal (100 - 500 Reputation Level)mikael_b User rank is Corporal (100 - 500 Reputation Level)mikael_b User rank is Corporal (100 - 500 Reputation Level)mikael_b User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 15 h 8 m 32 sec
Reputation Power: 5
Do you have any example of pages based on ajax?

Quote:
Asynchronous JavaScript And XML, or its acronym, Ajax (Pronounced A-jacks), is a Web development technique for creating interactive web applications. The intent is to make web pages feel more responsive by exchanging small amounts of data with the server behind the scenes, so that the entire Web page does not have to be reloaded each time the user makes a change. This is meant to increase the Web page's interactivity, speed, and usability.

Reply With Quote
  #4  
Old May 10th, 2006, 06:15 PM
LinuxPenguin's Avatar
LinuxPenguin LinuxPenguin is offline
fork while true;
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: May 2005
Location: England, UK
Posts: 5,535 LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)  Folding Points: 11590 Folding Title: Novice Folder
Time spent in forums: 1 Month 3 Weeks 1 Day 19 h 23 m 58 sec
Reputation Power: 999
There are plenty on the web. Have a google.

Reply With Quote
  #5  
Old May 10th, 2006, 07:04 PM
Adrastea0413 Adrastea0413 is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Dec 2003
Location: Washington, DC Metro
Posts: 1,710 Adrastea0413 User rank is Major General (70000 - 90000 Reputation Level)Adrastea0413 User rank is Major General (70000 - 90000 Reputation Level)Adrastea0413 User rank is Major General (70000 - 90000 Reputation Level)Adrastea0413 User rank is Major General (70000 - 90000 Reputation Level)Adrastea0413 User rank is Major General (70000 - 90000 Reputation Level)Adrastea0413 User rank is Major General (70000 - 90000 Reputation Level)Adrastea0413 User rank is Major General (70000 - 90000 Reputation Level)Adrastea0413 User rank is Major General (70000 - 90000 Reputation Level)Adrastea0413 User rank is Major General (70000 - 90000 Reputation Level)Adrastea0413 User rank is Major General (70000 - 90000 Reputation Level)Adrastea0413 User rank is Major General (70000 - 90000 Reputation Level)Adrastea0413 User rank is Major General (70000 - 90000 Reputation Level)Adrastea0413 User rank is Major General (70000 - 90000 Reputation Level)Adrastea0413 User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 3 Days 21 h 15 m 51 sec
Reputation Power: 744
Facebook
Quote:
Originally Posted by LinuxPenguin
There are plenty on the web. Have a google.


Or just go to Google...

Let's see... Gmail, Personalize Homepage, the new Calendars, Google Maps....
Comments on this post
netytan agrees!
LinuxPenguin agrees: heh, never thought of that

Reply With Quote
  #6  
Old May 11th, 2006, 01:36 AM
mikael_b mikael_b is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 66 mikael_b User rank is Corporal (100 - 500 Reputation Level)mikael_b User rank is Corporal (100 - 500 Reputation Level)mikael_b User rank is Corporal (100 - 500 Reputation Level)mikael_b User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 15 h 8 m 32 sec
Reputation Power: 5
Quote:
Originally Posted by Adrastea0413
Or just go to Google...

Let's see... Gmail, Personalize Homepage, the new Calendars, Google Maps....


Damn, cool this i will have to learn

So do anyone have any link to tutorials where i can learn to move object? like in http://www.google.com/ig

Reply With Quote
  #7  
Old May 11th, 2006, 11:56 AM
LinuxPenguin's Avatar
LinuxPenguin LinuxPenguin is offline
fork while true;
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: May 2005
Location: England, UK
Posts: 5,535 LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)  Folding Points: 11590 Folding Title: Novice Folder
Time spent in forums: 1 Month 3 Weeks 1 Day 19 h 23 m 58 sec
Reputation Power: 999
That's just javascript, not ajax.

It stores the configuration in a cookie too.

Reply With Quote
  #8  
Old May 11th, 2006, 12:05 PM
mikael_b mikael_b is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 66 mikael_b User rank is Corporal (100 - 500 Reputation Level)mikael_b User rank is Corporal (100 - 500 Reputation Level)mikael_b User rank is Corporal (100 - 500 Reputation Level)mikael_b User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 15 h 8 m 32 sec
Reputation Power: 5
Hmm, so what can i do with ajax that i can't with javascript?

Reply With Quote
  #9  
Old May 11th, 2006, 12:12 PM
LinuxPenguin's Avatar
LinuxPenguin LinuxPenguin is offline
fork while true;
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: May 2005
Location: England, UK
Posts: 5,535 LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)  Folding Points: 11590 Folding Title: Novice Folder
Time spent in forums: 1 Month 3 Weeks 1 Day 19 h 23 m 58 sec
Reputation Power: 999
Okay, let me explain what ajax is

you have a javascript on your page. then you click a link with a url like "javascript:query('blah');"

That calls your function 'query' which uses ajax. what ajax does here is make a connection to a specified page, and returns the result to your script. you can then use that result, for example, to modify the content on the page apropriately via script.

The special thing is that instead of loading a whole new page, the work is done in the background and you can still view the page.

Reply With Quote
  #10  
Old May 11th, 2006, 12:21 PM
Conundrum's Avatar
Conundrum Conundrum is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jan 2004
Posts: 1,108 Conundrum User rank is First Lieutenant (10000 - 20000 Reputation Level)Conundrum User rank is First Lieutenant (10000 - 20000 Reputation Level)Conundrum User rank is First Lieutenant (10000 - 20000 Reputation Level)Conundrum User rank is First Lieutenant (10000 - 20000 Reputation Level)Conundrum User rank is First Lieutenant (10000 - 20000 Reputation Level)Conundrum User rank is First Lieutenant (10000 - 20000 Reputation Level)Conundrum User rank is First Lieutenant (10000 - 20000 Reputation Level)Conundrum User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 12 h 46 m 55 sec
Reputation Power: 123
AJAX is primarily about making HTTP requests from inside the webpage without having the entire webpage refresh. This way you can send smaller amounts of information back and forth and have webpages dynamically change.

Before AJAX, people would use hidden frames to send background HTTP requests. I think Gmail may do this b/c it uses a hidden frame. With AJAX, instead of just refreshing the entire hidden frame, you can use the hidden frame as a large session scratch pad since you can store a lot more information there than in a cookie.

You can do AJAX by calling XMLHttpRequest yourself or by using an AJAX JS library. Some popular libraries include:I've used Prototype which is nice but I'm looking into moving to Dojo because it has built-in JSON support (nicer than hacking it on to Prototype). Prototype drops the response into a specified element's innerHTML which is quick and dirty but designed to update just one client object so you may end up with more AJAX requests than you need/want. JSON stands for JavaScript Object Notation and lets you send multiple data items to the client in a format JavaScript understands.

Yahoo! Mail beta also an interesting application of AJAX. It's like using MS Outlook in a web browser. Instead of clicking through pages of mail (like Gmail) you scroll through the entire list, kind of like how Google Maps lets you scroll around a map.
__________________
Dev411 | Grokbase | Compare CPAN Modules

Last edited by Conundrum : May 11th, 2006 at 12:36 PM.

Reply With Quote
  #11  
Old May 11th, 2006, 12:27 PM
LinuxPenguin's Avatar
LinuxPenguin LinuxPenguin is offline
fork while true;
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: May 2005
Location: England, UK
Posts: 5,535 LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)  Folding Points: 11590 Folding Title: Novice Folder
Time spent in forums: 1 Month 3 Weeks 1 Day 19 h 23 m 58 sec
Reputation Power: 999
Quote:
Originally Posted by Conundrum
AJAX is primarily about making HTTP requests from inside the webpage without having the entire webpage refresh. This way you can send smaller amounts of information back and forth and have webpages dynamically change.

Before AJAX, people would use hidden frames to make "hidden" HTTP requests. I think Gmail may do this b/c it uses a hidden frame. With AJAX, instead of just refreshing the entire hidden frame, you could use it for a large session scratch pad since you can store a lot more information there than in a cookie.

You can do AJAX by calling XMLHttpRequest yourself or by using an AJAX JS library. Some popular libraries include:I've used Prototype which is nice but I'm looking into moving to Dojo because it has built-in JSON support (nicer thank hacking it on to Prototype).

Yahoo! Mail beta also an interesting application of AJAX. It's like using MS Outlook via the web. Instead of clicking through pages of mail (like Gmail) you scroll through the entire list, kind of like how Google Maps lets you scroll around a map.
Mochikit also features JSON support

Reply With Quote
  #12  
Old May 11th, 2006, 12:41 PM
Conundrum's Avatar
Conundrum Conundrum is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jan 2004
Posts: 1,108 Conundrum User rank is First Lieutenant (10000 - 20000 Reputation Level)Conundrum User rank is First Lieutenant (10000 - 20000 Reputation Level)Conundrum User rank is First Lieutenant (10000 - 20000 Reputation Level)Conundrum User rank is First Lieutenant (10000 - 20000 Reputation Level)Conundrum User rank is First Lieutenant (10000 - 20000 Reputation Level)Conundrum User rank is First Lieutenant (10000 - 20000 Reputation Level)Conundrum User rank is First Lieutenant (10000 - 20000 Reputation Level)Conundrum User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 12 h 46 m 55 sec
Reputation Power: 123
Quote:
Originally Posted by LinuxPenguin
Mochikit also features JSON support
It does. Do you know what the main differences between Dojo and Mochikit are? For some reason, Dojo seems to have more mindshare among the developers I'm around.

Reply With Quote
  #13