A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: xml driven data-site pleeeeeeeese check it out and comment

  1. #1
    Senior Member
    Join Date
    Mar 2001
    Location
    Location : Location
    Posts
    131

    xml driven data-site pleeeeeeeese check it out and comment

    http://www.homeofsewing.com

    Can you check if this xml/Flash site works for you. If it does I will gladly pass on the details:

    Things to check:

    The four catalogues (to be found under Fabrics, Sewing Machines, Haberdashery and Tuition):

    The change.View option on the catalogue pages:

    Whether your order is passed to the shop (.view order)

    The Fabric keyword search engine(found under the Fabrics menu - try searchung for bridal, denim, satin etc.)

    Thank you

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

    Uhh...

    Impressive - slow but impressive....

    How much of the data that's being represented is stored in XML documents?

    How large are those documents?

    I wish we could get some idea of how you approached the XML.. how it was structured... how you decided to break up the data... or if you did at all...

  3. #3
    Senior Member
    Join Date
    Mar 2001
    Location
    Location : Location
    Posts
    131
    Thanks for that VAYKENT

    tell me .. is the slowness a slowness that makes the movie appear as though it is running at a low framerate or is it slow between pages that use the stored data or is it just slow because it is running on a free server ???

    All the product data is held in individual xml files (these are about 50K in total) but because they are not updated or edited by this site, they are transferred on loading to a series of arrays which can be called on at any time. This may be causing the site to appear slow. What speed is your machine?

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

    Uhh...

    I guess you're right - I was looking at your site on what could be termed "Crap-in-a-box-with-a-keyboard-attached"!!

    It's probably slow 'cause of stupid hardware...

    I think the site's good - a very good use of XML and Flash.

  5. #5
    Junior Member
    Join Date
    Dec 2000
    Posts
    20

    slow, had to abort script

    hey there, i tried to open the site and it cpmpletely froze my mac os9.2, 256K, DSL.
    it asks me to abort the script, otherwise i could crash my computer. hm. how big is the actual xml file? could you choose to get the data from lets say an mySQL_DB in order to increase performance?

    i wish i could help more.

  6. #6
    Senior Member
    Join Date
    Mar 2001
    Location
    Location : Location
    Posts
    131
    The scripts are only about 50K in total: I haven't yet tested it on a mac so the comment is good: There may be an issue here with IE if that's what your running. Although not processing text strings there may be a limit to how far Flash can go within some browsers without hitting the 15 second processing barrier. I'd be interested to hear from anyone else who has had this problem. I've tested it on NN6 and Opera 5.1 and it worked fine. It does sometimes hit a glitch using IE6 and pauses for no good reason before continuing but this was not the case with IE5 on a PC.

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

    Uhh...

    So.. you would save a bit on time if you wrote your XML files differently. Don't use so many childNodes.. use attributes. Not that your XML documents re that large to begin with, but if you check out this post you'll see what I mean...

    http://board.flashkit.com/board/show...hreadid=170326

  8. #8
    Senior Member
    Join Date
    Mar 2001
    Location
    Location : Location
    Posts
    131
    Much of the xml info is stored as attributes rather than child nodes as these are quicker to process.
    Your thread was very interesting and I agree with what you said but most of the xml info is in the form of attributes; only repetitive elements like < colour> are child nodes. I will re-edit them to make them more efficient.

    I have made a slight change elsewhere and things seem to be running faster. If you have time could you check it out again. If it was the cause of the problem I don't really understand why.... I'll wait and see


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

    Uhh...

    Repetitive elements are fine in attributes as well... color1 color2 color3 color4... anyway - I also don't think that will effect the 'speed' issues.. I'm startin to think it was the comp I saw it on...

  10. #10
    Senior Member
    Join Date
    Mar 2001
    Location
    Location : Location
    Posts
    131
    The beauty of xml, for me anyway, is that not only is it highly structured when it comes to being read by different programs and applications, but it is also easily read and understood by people. I try to make all the entries have identical elements and attributes because it makes good sense when both reading and editing to so.

    < fabrics>
    < fabric product="Cotton" cat="craft" width="112" price="4.98" image="no">
    < keywords>
    < keyword>plain< /keyword>
    < keyword>craft< /keyword>
    < keyword>patchwork< /keyword>
    < keyword>quilting< /keyword>
    < /keywords>
    < colours>
    < colour>beige< /colour>
    < colour>black< /colour>
    < colour>yellow (pale)< /colour>
    < /colours>
    < info>100% American craft cotton. Soft cottons in many colours which blend and tone with our extensive range of craft fabrics. Great for borders and backing panels to give that finishing touch to all of your craft projects. The colour list is by no means all of the colours which we stock so please phone if the colour you need is not listed.< /info>
    < /fabric>

    Above is an (slightly) abbreviated xml entry from the fabric data. All enries have the same attributes and elements, only the number of < keyword> and < colour> entries differ. Because I can see clearly what is represented by the xml it is quick and easy to write a bit of ActionScript to load the data into an array. I'm not sure what the speed trade-off is using arrays instead of fumbling up and down the xml tree when i need data, but, for me anyway, it is easier to do it this way rather than any other. I get the feeling that a lot of people spend a lot of time trying to find a general way of reading any xml file rather than concentrating on the one they have. Although it is very commendable spending hours trying to write routines that cater for 'unseen' xml files, surely, as Flash is in the business of presenting information in an attractive and organised manner, it is self defeating to then attempt to write a script to present a load of information you haven't actually seen yourself. Neither I, nor anybody else needs Flash to tell me what is represented by an xml file as I can see for myself by looking at it. That is half of the purpose behind its creation.

    OOPs, wandered off the subject there a bit didn't I.

    Anyway, to VAYKENT, thank you for checking my site. I am going to do some math on the attribute/element question, and also some on the speed trade-off between processing data from an array and an xml file. I don't quite know how I would code the search engine to read directly from an xml file as, at the moment, using an array I can easily check for a fabric turning up twice, and weight the keywords according to their relevance. I can also automatically sort my products and colours into alphabetical order regardless of their order in the original file.

    Onwards and Upwards.........

    TechNoiZ

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

    Uhh...

    Beautiful!! Wonderfull!! Exactly like I think! Too many people waste too much time - they should decide how they want to do their XML then react accordingly in Flash! Well put.

    About 'testing' for load time differences in attribute/childNode configurations.. I really need to release something that everybody can use... maybe I'll stop blabbering here, and get coding there!

    Later!

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