A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: Interested in WDDX? ...better wait

  1. #1
    Junior Member
    Join Date
    Mar 2001
    Posts
    27
    I've done a bit of programming using the flash WDDX parser available at Macro. exchange. While the module is complete in terms of functionality, it is FAR TOO SLOW to handle even moderate amounts of data.

    WDDX messages are by nature larger than normal XML messages because the include information on variable data types (something a scripting language could care less about). Parsing these larger messages really slows things down on an already inefficient parser.

    A more efficient strategy would be to establish your own protocol and send smaller messages.

    I thought I would save some of you flashers out there a week or so if you're thinking about using WDDX with flash. My advice is dont waste you time until the parser gets faster.



  2. #2
    Senior Member
    Join Date
    Feb 2001
    Location
    Provo, Utah
    Posts
    1,112

    Uhh...

    So if there is a lot of data about variable types that you don't need.. why don't you toss the data out? - or would that be too hard?

    P.s. - I'm not trying to be critical.. just trying to be curious...

    Oh.. and to show that I'm just being curious... maybe you could also save me hours on the web by answering this: What is WDDX anyway? : ) - (Short version pls!)

  3. #3
    Junior Member
    Join Date
    Mar 2001
    Posts
    27
    WDDX is a module that creates an xml in a particular document format. If a WDDX parser receives a mal-formed document (ie w/o data types) the parser will fail.

  4. #4
    Junior Member
    Join Date
    Aug 2000
    Posts
    1
    I disagree with your statement saying WDDX packets are larger. I program mostly in the windows world and do flash work for fun, so I parse many different flavors of XML. WDDX is definately more compact than most, if not the best. Take a look at a SOAP envelope(message), that is an example of a bloated implementation. It also saves time mapping XML to simple data structures in most languages.

  5. #5
    Junior Member
    Join Date
    Mar 2001
    Posts
    27

    Still not the answer

    I still believe XML really does not have much of a future. There are worse protocols out there but it's not the best solution. I know it's really been paraded around in the Microsoft world as the best thing since sliced bread but I think it is over hyped. Wddx does not do well, especially with complex data structures. Case in point...

    To keep it very simple:
    A WDDX representation of just a simple array:

    <wddxPacket version='0.9'>
    <header/>
    <data>
    <array length='2'>
    <number>10</number>
    <string>second element</string>
    </array>
    </data>
    </wddxPacket>

    Here you only have approx 15 bytes of salient data and approx 150 bytes of formating data -- thats a 10:1 ratio! Now make this example with multidimensional arrays and objects and the ratio only gets higher.

    I'm working on a new, more efficient, standardized, extensible, protocol that would reduce message size substantially.

    Bandwidth is limited, efficiency is the key.

  6. #6
    Junior Member
    Join Date
    Mar 2001
    Posts
    27

    Still not the answer

    Sorry, xml interpreted...

    &lt;wddxPacket version='0.9'&gt;
    &nbsp;&lt;header/&gt;
    &nbsp;&lt;data&gt;
    &nbsp;&nbsp;&lt;array length='2'&gt;
    &nbsp;&nbsp;&nbsp;&lt;number&gt;10&lt;/number&gt;
    &nbsp;&nbsp;&nbsp;&lt;string&gt;second element&lt;/string&gt;
    &nbsp;&nbsp;&lt;/array&gt;
    &nbsp;&lt;/data&gt;
    &lt;/wddxPacket&gt;


  7. #7
    Senior Member vevmesteren's Avatar
    Join Date
    Sep 2001
    Location
    Montréal, Québec
    Posts
    566

    WDDX

    Ok my jumpy little Flash-heart did a leap as I saw that there was some WDDX stuff in the forums, so hooray for that. I stumbled over WDDX this week and have been trying my luck with it. I took chapter 26 from the "Flash 5 Dynamic Studio" book to help.

    Everything seems to be working quite nicely, until, I try parsing some actual data, I checked by tracing it and the data (the WDDX packet) arrives in Flash, but then when I stick in the converter.deserialize function in, Flash get's a hick-up?! I get 'a script in the flash movie is making the projector run slow....abort the script

    I don't get it. Am i doing something wrong or is there a certain hardware requirement tied to using the wddx.as script....

    So....what is my question....hmmm, maybe this'll help:

    #include "wddx.as"

    function recievedResults(goodXML){
    _root.results = this.toString();
    if (goodXML){
    _root.queryResults = converter.deserialize(this);
    _root.play();
    }
    }

    converter = new WDDX();
    remoteData = new XML();
    remoteData.onLoad = recievedResults;
    test = "";
    stop();

  8. #8
    Senior Member vevmesteren's Avatar
    Join Date
    Sep 2001
    Location
    Montréal, Québec
    Posts
    566

    NOT FAIR!

    I was cut of there!

    ok to continue the prev. message

    look at the code and tell me

    what's wrong with the picture?

    if anyone has any tips for WDDX ressources that woud be deeply apreciated as well. Any, any input is...I read about the capabilities, and, yeah maybe it's hipe, but still it sounds like a little beauty this script, If I only could USE IT!!!!

  9. #9
    Senior Member vevmesteren's Avatar
    Join Date
    Sep 2001
    Location
    Montréal, Québec
    Posts
    566

    NOT FAIR!

    I was cut of there!

    ok to continue the prev. message

    look at the code and tell me

    what's wrong with the picture?

    if anyone has any tips for WDDX ressources that woud be deeply apreciated as well. Any, any input is...I read about the capabilities, and, yeah maybe it's hipe, but still it sounds like a little beauty this script, If I only could USE IT!!!!

  10. #10
    Senior Member vevmesteren's Avatar
    Join Date
    Sep 2001
    Location
    Montréal, Québec
    Posts
    566

    WDDX

    Ok my jumpy little Flash-heart did a leap as I saw that there was some WDDX stuff in the forums, so hooray for that. I stumbled over WDDX this week and have been trying my luck with it. I took chapter 26 from the "Flash 5 Dynamic Studio" book to help.

    Everything seems to be working quite nicely, until, I try parsing some actual data, I checked by tracing it and the data (the WDDX packet) arrives in Flash, but then when I stick in the converter.deserialize function in, Flash get's a hick-up?! I get 'a script in the flash movie is making the projector run slow....abort the script

    I don't get it. Am i doing something wrong or is there a certain hardware requirement tied to using the wddx.as script....

    So....what is my question....hmmm, maybe this'll help:

    #include "wddx.as"

    function recievedResults(goodXML){
    _root.results = this.toString();
    if (goodXML){
    _root.queryResults = converter.deserialize(this);
    _root.play();
    }
    }

    converter = new WDDX();
    remoteData = new XML();
    remoteData.onLoad = recievedResults;
    test = "";
    stop();

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center