|
I think the content of what should be returned depends on the scenario. Brad, in your case you probably have full control over the entire application so you can make the decision to use HTML (which I agree is best in your situation). But if one doesn't have control over every aspect and a server side service is providing data for many different pages, I can see XML being of great use to make the data coming back down to the client blatantly described with xml markup. Then the browser/client can parse that xml and do with it what it needs to do (i.e. update a <div>, update a named table, etc). If the data is not described via xml in that latter example then you start relying on positional locations for data (i.e. third column in is the item price) which can be dangerous if someone decides to change that column to be number four. Those are my thoughts. I think each has its place. Aaron Bartell http://mowyourlawn.com -----Original Message----- From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Brad Stone Sent: Thursday, September 21, 2006 5:42 PM To: Web Enabling the AS400 / iSeries Subject: Re: [WEB400] AJAX... So, do you return XML and then convert that to HTML? Seems like extra work to me. :) Have you found any ways to debug AJAX such as view the source returned on the page, etc? IT stinks that you can't even save the page with the dynamic information inserted and see the *ML that was sent back from the app. That's the main thing that's holding me back on implementing it more. I had a huge shopping application for a customer set up with AJAX but decided to go back to standard scripts because I was finding debugging a pain. Not that I insert any bugs into code mind you. :) Brad On Thu, 21 Sep 2006 17:18:15 -0400 "Bob Cozzi" <cozzi@xxxxxxxxx> wrote:
Brad, Yes, Ajax, i.e., the XMLHttpRequest object supports receiving "data". The "default" or "normal" or "usual" or "original" intent was to return XML to the browser, but it allows you to return anything, including HTML, raw data, Javascript or XML. I tend to use XML in my AJAX apps, but that' doesn't mean everyone does or should. Sorry for being a be too specific, I tend to do that lately. <tic> -Bob Cozzi www.iSeriesTV.com Ask your Manager to watch iSeriesTV.com -----Original Message----- From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Brad Stone Sent: Thursday, September 21, 2006 2:43 PM To: Web Enabling the AS400 / iSeries Subject: Re: [WEB400] AJAX... On Thu, 21 Sep 2006 11:14:16 -0500 Robert Cozzi <cozzi@xxxxxxxxx> wrote:In a CGI library the AJAX pieces really need to be sent as XML. So you need to build the XML using whatever you want.Bob, I've only used AJAX in a few projects now, but I've always returned HTML and I am curious as to this statement that it should be XML. In fact, I found AJAX was what I've wanted for years. It's fairly easy to convert your dymamic SSI to AJAX and make the pages more seamless (as SSI was the closest to AJAX that I could get before, and I use it for almost everything). AJAX really is just returning data to the page, so making XML then converting that to HTML really seems like an extra unneeded step in most web applications, but I am interested in hearing the whos, whats and whys behind this statement. :) But, I'm shying away from AJAX the more I use it. It seems to make debugging and error tracking, not to mention flow a little more difficult. But it's still pretty cool. -- This is the Web Enabling the AS400 / iSeries (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400. -- This is the Web Enabling the AS400 / iSeries (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.
Bradley V. Stone BVS.Tools www.bvstools.com -- This is the Web Enabling the AS400 / iSeries (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.