2 Replies Latest reply on Dec 29, 2009 8:02 PM by colorado_hick

    best XML technology to use?

    colorado_hick

      Newbie question here-

       

      I am working on replacing a complex Excel spreadsheet with lots of VBA macros with an AIR app.  The first step is to hook the spreadsheet up to a database, then I can work on rewriting it in flex.  I am leaning towards PHP/Apache/Mysql for the server.  I want to set up the client/server communication so it will work for both the Excel and the Flex.

      I was originally thinking of doing a SOAP implementation but I am wondering if that would be overkill.  We will not be sharing the content with other apps so I suspect the whole web-services approach is overkill.  Should I just use well formed XML requests between the client and the web server and not worry about SOAP?  Is PHP on Apache a reasonable choice for this type of application?   There isn’t going to be any HTML.

      Thanks in advance for your help!

      Jon

        • 1. Re: best XML technology to use?
          Yozef0 Level 1

          Hello colorado_hick,

           

              For the backend, I would strongly encourage using AMFPHP... it is much easier than XML, and Much, much faster.

           

           

          Ever tried populating a Datagrid with about 4000 rows of complex objects (10 key/values each).
          Thats a lot to convert from XML to Actionscript Objects; Even yet, you shouldn’t blame your browser if it crashes.
          James Ward has given a perfect example of the speed differences between XML, JSON and AMF.
          It’s pretty and easy to connect to an AMFPHP back end. The advantages of this are many, one of them is the size of the data itself, AMF sends ByteArray data, plus, there is no need to convert XML nodes into Objects, AMFPHP hands them to you as objects!
          
          
          private var _gatewaySitesDD:NetConnection = new NetConnection();                   // create a NetConnection
          private var _responser:Responder = new Responder(onResultSitesCB, onFault);        // create a responder for the NetConnection
          
          _gatewaySitesDD.connect("http://your-domain.com/scripts/amfphp/gateway.php");      // php gateway URL
          _gatewaySitesDD.call("AMF3Query.query", _responser, "name=lookup_sites");          // NetConnection.call(Class.method:String, responder:Responder, ... arguments)
          
          private function onResultSitesCB(response:Object):void {
             trace ("Result received: " + Objectutils.toString(response));
             siteData = response as Array;  // See that! Returns them as Array, as in Array of Objects!
          }
          
          private function onFault(response:Object):void {
             trace ("Error receiving data);
          }
          
          
          
          1 person found this helpful
          • 2. Re: best XML technology to use?
            colorado_hick Level 1

            AMFPHP looks like a great choice if I was starting from scratch-  thanks for the tip.  However my first iteration of the server has to support Excel spreadsheets with VBA code, not just flex.  thats why i am leaning towards XML.  I just do not know enough about XML to know if there is a specific standard (like the SOAP specification) that would be best suited.