1 Reply Latest reply on Mar 6, 2008 9:16 PM by anirudhs

    AJAX vs. RemoteObject

    er1
      I have a Flex AIR app that uses mx:HTML to get a server-side page (CF).
      That page needs to post data back to the server and I'm debating:
      a) using AJAX
      or
      b) having JS call an mx:RemoteObject method via the window.runtime... (air.) object.

      (naturally, I'm assuming that (b) is even possible; it seems like it should be, but I haven't tried it yet or even know how it would work).
      As an idealist, I'd kinda like to do (b) just for the "fun" of it; I also think it may help down the road if I want to change to Blaze DS and/or do some other funcky AIR things with the data on the local filesystem (haven't gotten that far yet).

      Any pros or cons for using one method over the other?
      Any other thoughts on this?

      Thanks!
        • 1. Re: AJAX vs. RemoteObject
          anirudhs Level 2
          Hi,

          Both (a) and (b) sounds appropriate for a HTML AIR app. But since you're using mx:HTML in a Flex AIR app, I'm assuming you need some HTML rendered and in that HTML page, you need to post data back.

          In such a case, it would be easier to go with (a). (b) should be possible though you'd have to use the script tag to include rpc.swc to get access to remoteobject.