Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Re: Help getting tree working!

Expand Messages
  • Eric Miraglia
    ... Felix, Your dissertation makes good sense, yes. And I think the paragraph above highlights the key factors you need to account for in making your
    Message 1 of 10 , Jan 2, 2007
    • 0 Attachment
      On Jan 1, 2007, at 12:57 PM, Felix Rabinovich wrote:

      I hope my little dissertation makes sense. Maybe even somebody already
      discussed it (but I couldn't find it). Obviously, a lot depends on the
      size of the tree and latency of the server. With 100-node tree first
      approach is just fine; with million node product database on a fast
      Intranet server the third approach looks most appealing.

      Felix,

      Your dissertation makes good sense, yes.  And I think the paragraph above highlights the key factors you need to account for in making your decision.  

      I would just add one item, though, to the mix: In a fully dynamic tree where all data lives on the server side, when you expand a node you will go to the server to get a list of children for that node.  This is the "classic" usage pattern.  However, you can ask the server, when returning child nodes for an expanding node, to also return a child count for each new child.  New children who themselves have no children can be created as leaf nodes, dynamic loading can be turned off for those nodes, etc.

      Beyond that, I think your analysis is quite thorough.  There won't be a single answer that works for everyone.  However, an array even of several thousand nodes, depending on usage and data, should perform well in most browsers; full rendering of a TreeView at page load when there are more than 100 nodes is probably a bad idea in most cases.   And doing some user testing to determine how often a user will interact with the tree and how many clicks per interaction will help guide your decisions as well.

      Regards,
      Eric

      ______________________________________________
      Eric Miraglia
      Yahoo! User Interface Library



    • Felix Rabinovich
      I can second that! It seems to me that creating TextNode in handleSuccess() doesn t do anything on the screen. I haven t done a stand-alone snippet (my code is
      Message 2 of 10 , Jan 2, 2007
      • 0 Attachment
        I can second that! It seems to me that creating TextNode in
        handleSuccess() doesn't do anything on the screen.

        I haven't done a stand-alone snippet (my code is in tpl files talking
        to PHP on the server), but FireBug shows that the values in the new
        YAHOO.widget.TextNode() call are all good. In fact, I just call

        var tmpNode = new YAHOO.widget.TextNode(
        { label: "Success", href: "main.php"}, tree.getRoot(), false);

        I see that the code gets executed - but there is nothing on the screen :(

        Is there any example that has TreeView/Connection Manager combination?

        --- In ydn-javascript@yahoogroups.com, "smeep2k4" <wilsondr@...> wrote:
        > The only problem I found overall is that I had to learn alot about how
        > the YUI components work because there is absolutely no documentation
        > anywhere that shows a TreeView/Connection Manager combination. Sure,
        > there are articles that talk about it and how cool it is to have both
        > in the same application, but try actually finding example code. Nada!
      • Alan Pinstein
        Thanks for this idea... I just figured out how to do this part in practice. I ve posted a live example if others are interested:
        Message 3 of 10 , Feb 9 3:59 PM
        • 0 Attachment
          Thanks for this idea... I just figured out how to do this part in practice. I've posted a live example if others are interested:


          The key is setting:

          node.dynamicLoadComplete = true;

          On nodes that you're certain have no kids.

          This *greatly* improves the interface! Thanks for pointing me in the right direction.

          Thanks,
          Alan

          On Jan 2, 2007, at 11:03 AM, Eric Miraglia wrote:

          I would just add one item, though, to the mix: In a fully dynamic tree where all data lives on the server side, when you expand a node you will go to the server to get a list of children for that node.  This is the "classic" usage pattern.  However, you can ask the server, when returning child nodes for an expanding node, to also return a child count for each new child.  New children who themselves have no children can be created as leaf nodes, dynamic loading can be turned off for those nodes, etc.


        Your message has been successfully submitted and would be delivered to recipients shortly.