Make AJAX degradable

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved

Join Date: Aug 2009
Posts: 12
Reputation: dangari is an unknown quantity at this point 
Solved Threads: 0
dangari dangari is offline Offline
Newbie Poster

Make AJAX degradable

 
0
  #1
Oct 26th, 2009
I have already implemented AJAX (DWR) in a web application.My concern is that I don't want the users to lose the efficiency of AJAX simply because browser settings have disabled javascript.Already I have seen someone who has hinted on using degradable AJAX to implement AJAX regardless of whether javascript is enabled or not.Problem is, I didn't get enough material on this.Anyone please assist and be sure your help is much appreciated
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 524
Reputation: Will Gresham is on a distinguished road 
Solved Threads: 86
Sponsor
Will Gresham's Avatar
Will Gresham Will Gresham is offline Offline
Posting Pro
 
0
  #2
Oct 26th, 2009
You cannot use AJAX if JavaScript is disabled.

Always try to write your code for non-JavaScript clients and then add AJAX afterwords.

AJAX should be used to enhance the page, it should not be the core of it.
AJAX is not a programming language, scripting language or any other sort of language.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 12
Reputation: dangari is an unknown quantity at this point 
Solved Threads: 0
dangari dangari is offline Offline
Newbie Poster
 
0
  #3
Oct 26th, 2009
Originally Posted by xan View Post
You cannot use AJAX if JavaScript is disabled.

Always try to write your code for non-JavaScript clients and then add AJAX afterwords.

AJAX should be used to enhance the page, it should not be the core of it.
Thanks xan.Your point is both valid and most welcome. I just need the material on degradable AJAX for my personal web apps...please if you have any urls that could help to this end, just let me know man.Thanks!
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 864
Reputation: Airshow is on a distinguished road 
Solved Threads: 122
Airshow's Avatar
Airshow Airshow is offline Offline
Practically a Posting Shark
 
0
  #4
Oct 27th, 2009
Dangari,

I've not heard the term "degradable AJAX" and can only guess at what it might mean.

As Will G says, AJAX simply won't work at all if Javascript is turned off.

However, you may choose to cater for (rare?) browsers with low capability Javascript that doesn't support the HTTPRequest object necessary for AJAX. The strategy (I've never needed to use it) would be always to try making an AJAX request then, if AJAX fails, make a regualr HTTP request (with suitable GET or POST parameters) to reload the whole page (with necessary additions/modifications). You would generally choose to do this only for essential functionality - not some "fancy-waistcoats" visual effect.

Airshow
Last edited by Airshow; Oct 27th, 2009 at 10:19 am.
50% of the solution lies in accurately describing the problem!
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 12
Reputation: dangari is an unknown quantity at this point 
Solved Threads: 0
dangari dangari is offline Offline
Newbie Poster
 
0
  #5
Oct 27th, 2009
Originally Posted by Airshow View Post
Dangari,

I've not heard the term "degradable AJAX" and can only guess at what it might mean.

As Will G says, AJAX simply won't work at all if Javascript is turned off.

However, you may choose to cater for (rare?) browsers with low capability Javascript that doesn't support the HTTPRequest object necessary for AJAX. The strategy (I've never needed to use it) would be always to try making an AJAX request then, if AJAX fails, make a regualr HTTP request (with suitable GET or POST parameters) to reload the whole page (with necessary additions/modifications). You would generally choose to do this only for essential functionality - not some "fancy-waistcoats" visual effect.

Airshow
Thanks a lot Airshow.I have just realised that I should have clarified that I needed help with making a graceful degradation to AJAX code(in case JS isn't supported application still works albeit in a less fancy way)...In short, you hit the nail on the head with your post.If you could give me any url to this end, I would be very grateful.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 864
Reputation: Airshow is on a distinguished road 
Solved Threads: 122
Airshow's Avatar
Airshow Airshow is offline Offline
Practically a Posting Shark
 
0
  #6
Oct 27th, 2009
You might want to research "HIJAX" which is an approach (like "AJAX" neither a product nor a language).

HIJAX gets a mention (but no more than that) in one of my reference books - "Beginning Javascript with DOM Scripting and AJAX" by Christine Heilmann (Apress, 2006), ISBN 1-59059-680-3. Apparantly HIJAX was coined by a Jeremy Keith, so it may also be worth searching for publications that bear his name.

Sorry I can't be of any more help but, like many if not most AJAX programmers I suspect, I am guilty of having not handled failure cases as robustly as I could have. Your question is a prompt for me to learn more. You may look forward to answering my questions some time in the future!

Airshow
50% of the solution lies in accurately describing the problem!
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 12
Reputation: dangari is an unknown quantity at this point 
Solved Threads: 0
dangari dangari is offline Offline
Newbie Poster
 
0
  #7
Oct 28th, 2009
Originally Posted by Airshow View Post
You might want to research "HIJAX" which is an approach (like "AJAX" neither a product nor a language).

HIJAX gets a mention (but no more than that) in one of my reference books - "Beginning Javascript with DOM Scripting and AJAX" by Christine Heilmann (Apress, 2006), ISBN 1-59059-680-3. Apparantly HIJAX was coined by a Jeremy Keith, so it may also be worth searching for publications that bear his name.

Sorry I can't be of any more help but, like many if not most AJAX programmers I suspect, I am guilty of having not handled failure cases as robustly as I could have. Your question is a prompt for me to learn more. You may look forward to answering my questions some time in the future!

Airshow
Thanks Airshow.
Actually you've helped me more than you think because I believe in being pointed in the right direction as opposed to being spoon-fed.I still consider the post as being solved by you.Just make a reply and I'll mark it as solved.Jeremy Keith's material on the web is indeed what I need.Thanks again!
Last edited by dangari; Oct 28th, 2009 at 4:38 am.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 864
Reputation: Airshow is on a distinguished road 
Solved Threads: 122
Airshow's Avatar
Airshow Airshow is offline Offline
Practically a Posting Shark
 
0
  #8
Oct 28th, 2009
Pleased to be of help Dangari. It seems that sometimes the blind can lead the blind. I will follow up "Jeremy Keith" myself.

Airshow
50% of the solution lies in accurately describing the problem!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC