|
Mailing Lists
|
Home /
Groups /
Ajax
iframe vs XMLHTTP
Author: Rob
Short Link: http://www.houseoffusion.com/groups/ajax/thread.cfm/threadid:546#1588
----- Excess quoted text cut - see Original Post for more -----
Yeah, at that point it's more of how you design the application to
function - there are ways of doing it so you minimize things, but once
you start multi threading the UI you can get some odd things going on
- especially if you're not used to multi threaded apps, and double so
with JS where you have no built in synchronize type mechinizim.
However, you can still pull it off with XMLHTTP and you cant with
iframe (unless you have several iframes I suppose...)
--
~Blog~
http://www.robrohan.com
~The cfml plug-in for eclipse~
http://cfeclipse.tigris.org
~open source xslt IDE~
http://treebeard.sourceforge.net
Author: Thomas Chiverton
Short Link: http://www.houseoffusion.com/groups/ajax/thread.cfm/threadid:546#1587
> iframe though, and I think that's what he meant. Thats how
> http://www.pengoworks.com/index.cfm?action=articles:gatewayApi
that
> used to (or does) work
Yeah, the problem there is that it is single threaded - if you have a request
prossing through Gateway, and the user clicks another button you have to
manage the 'wait till current request completes', which rapidly becomes a
queue.
We're finding the Gateway a big bottle neck for that reason.
I'm not sure XMLHTTP would fix this, as it then becomes a problem of
maintaining state if the 2nd action assumes a consistant state, but action 1
is still changing things (or waiting on the request).
--
Tom Chiverton
Advanced ColdFusion
Programmer
Author: Robyn
Short Link: http://www.houseoffusion.com/groups/ajax/thread.cfm/threadid:546#1585
I've just started playing in the AJAX world, and used to do most of this
kind of stuff through IFrames. I can tell you that AJAX is so, so much
easier than using IFrames. It doesn't have to be a lot of code, and
it's *much* easier to manage. That said, it does mean that you need to
know a bit about how how HTTP protocol to get around.
-Robyn
Adam Haskell wrote:
----- Excess quoted text cut - see Original Post for more -----
Author: Adam Haskell
Short Link: http://www.houseoffusion.com/groups/ajax/thread.cfm/threadid:546#1584
Good answers so far...I've only reacently used XMLHTTP and it was in a
kix script so I am still learning about it, I've used iframes in
webpages to do these tasks for a while though. Only problem now is
that people in my work place say XMLHTTP is better but they don't use
any of the state bonuses for xmlhttp...just donig what I did with an
iframe a few years ago...heh.
Adam H
----- Excess quoted text cut - see Original Post for more -----
Author: Adam Haskell
Short Link: http://www.houseoffusion.com/groups/ajax/thread.cfm/threadid:546#1583
No not apples and oragnes..I can do most of that with an
Iframe...hidden Iframe and it is a standard unlike XMLHTTP....
----- Excess quoted text cut - see Original Post for more -----
Author: Rob
Short Link: http://www.houseoffusion.com/groups/ajax/thread.cfm/threadid:546#1582
There is a technique to load xml (or other types of data) via an
iframe though, and I think that's what he meant. Thats how
http://www.pengoworks.com/index.cfm?action=articles:gatewayApi
that
used to (or does) work
----- Excess quoted text cut - see Original Post for more -----
Author: Marc Campeau
Short Link: http://www.houseoffusion.com/groups/ajax/thread.cfm/threadid:546#1581
I have used both and you can achieve similar results with both. I
prefer to use xmlHttp if I am expecting a result back from a call,
that way I don't have to pass a callback function name in the IFrame
call to tie both windows together upon return from the request. I've
used Iframes when the app doesn't care about the result of the call or
at least it's not expecting data to be returned from the call.
Marc
> Ik now most people use xmlhttp but I want some reason why to use this
> over just using n Iframe...I am looking for solid explanations not
> just..you have better control...how is that I have better control?
>
> Adam H
Author: Marlon Moyer
Short Link: http://www.houseoffusion.com/groups/ajax/thread.cfm/threadid:546#1580
If you're wanting to play around with xmlhttp calls, I would suggest
using the Sarissa project from sourceforge.
> Ik now most people use xmlhttp but I want some reason why to use this
> over just using n Iframe...I am looking for solid explanations not
> just..you have better control...how is that I have better control?
>
> Adam H
Author: Rob
Short Link: http://www.houseoffusion.com/groups/ajax/thread.cfm/threadid:546#1578
That's a pretty good question.
I would say the main reason is that iframe is a hack, where
xmlhttprequest was made for doing what it does.
You can get status codes from the request (i.e. 404, 500s)
You can get the http headers out of the request - and set them as well.
You can do the process in a separate "thread" (asynchronous)
... I can't do to many more or my presentation at the portland UG wont
have much content :-D
> Ik now most people use xmlhttp but I want some reason why to use this
> over just using n Iframe...I am looking for solid explanations not
> just..you have better control...how is that I have better control?
>
> Adam H
Author: Marlon Moyer
Short Link: http://www.houseoffusion.com/groups/ajax/thread.cfm/threadid:546#1579
The one benefit I've seen is that you get a ready state change. It
ranges from 0~4 with 4 being completed. Even if your called function
errors out, you'll still get a completed readystate.
> Ik now most people use xmlhttp but I want some reason why to use this
> over just using n Iframe...I am looking for solid explanations not
> just..you have better control...how is that I have better control?
>
> Adam H
Author: Steve Brownlee
Short Link: http://www.houseoffusion.com/groups/ajax/thread.cfm/threadid:546#1577
Apples and oranges, Adam.
An XMLHTTP request/response model is a transaction wherein you request
another page via HTTP, receive a response, check that response for success or
failure and then do XYZ with the data received via Javascript (sometimes very
complex Javascript).
An IFRAME is simply an inline frame that you can specify as a target for
links.
----- Excess quoted text cut - see Original Post for more -----
Author: Adam Haskell
Short Link: http://www.houseoffusion.com/groups/ajax/thread.cfm/threadid:546#1575
Ik now most people use xmlhttp but I want some reason why to use this
over just using n Iframe...I am looking for solid explanations not
just..you have better control...how is that I have better control?
Adam H
|
May 16, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||